diff --git a/build/Jenkinsfile b/build/Jenkinsfile index b5f1d155..7b17a350 100644 --- a/build/Jenkinsfile +++ b/build/Jenkinsfile @@ -1,5 +1,8 @@ pipeline { + /* Parameters are commented out to prevent trouble when using this file with different Jenkins builds.defaultValue + Uncomment to more easily create a new dev jenkins build + parameters { string(name: 'APPTAG', defaultValue: 'teatest', description: '') @@ -43,7 +46,7 @@ pipeline { string(name: 'DOMAIN_CERT_ARN', defaultValue: 'arn:aws:acm:us-east-1:117169578524:certificate/1f3945cf-cac7-4d75-ad8d-b8920534fea2', description: '') string(name: 'COOKIE_DOMAIN', defaultValue: '.asf.alaska.edu', description: '') - } + }*/ // Environment Setup environment { @@ -165,7 +168,7 @@ pipeline { sh "cp ${WORKSPACE}/${CODE_ARCHIVE_FILENAME} ${WORKSPACE}/terraform/lambda.zip" sh "cp ${WORKSPACE}/${DEPENDENCYLAYERFILENAME} ${WORKSPACE}/terraform/dependencylayer.zip" sh "cp ./cloudformation/thin-egress-app.yaml ${WORKSPACE}/terraform/thin-egress-app.yaml" - sh "cd ${WORKSPACE}/terraform && zip ../${TF_ZIP_FILENAME} *.tf thin-egress-app.yaml lambda.zip" + sh "cd ${WORKSPACE}/terraform && zip ../${TF_ZIP_FILENAME} *.tf thin-egress-app.yaml lambda.zip dependencylayer.zip" } } } @@ -182,6 +185,7 @@ pipeline { sh "echo '>> Pushing code to ASF Bucket'" sh "${AWS_BIN} s3 cp ./${CODE_ARCHIVE_FILENAME} s3://${CODE_BUCKET}${CODE_BUCKET_SUFFIX}/${CODE_DIR}/" sh "${AWS_BIN} s3 cp ./cloudformation/thin-egress-app.yaml s3://${CODE_BUCKET}${CODE_BUCKET_SUFFIX}/${CODE_DIR}/${CF_TEMPLATE_FILENAME}" + sh "${AWS_BIN} s3 cp ${WORKSPACE}/${TF_ZIP_FILENAME} s3://${CODE_BUCKET}${CODE_BUCKET_SUFFIX}/${CODE_DIR}/terraform_packages/" // Clarify in description that this stack is deployed by Jenkins, diff --git a/build/dependency_builder.sh b/build/dependency_builder.sh index 6e8cfbee..f1d1de47 100755 --- a/build/dependency_builder.sh +++ b/build/dependency_builder.sh @@ -24,7 +24,7 @@ pip3 install -r ${WORKSPACE}/lambda/requirements.txt --target . # get rid of unneeded things to make code zip smaller rm -rf ./*.dist-info -rm -rf pip +# rm -rf pip # commented out because https://snyk.io/vuln/SNYK-PYTHON-PIP-609855 rm -rf docutils rm -rf chalice/cli # cli in lambda? No way! rm -rf botocore # included with lambda, just takes up space here diff --git a/lambda/requirements.txt b/lambda/requirements.txt index e45bf6ba..4fc56d98 100644 --- a/lambda/requirements.txt +++ b/lambda/requirements.txt @@ -10,3 +10,5 @@ pyjwt==1.7.1 pyOpenSSL==19.1.0 # maybe not necessary python-jose==3.2.0 PyYAML==5.3.1 + +pip>=19.2 # not directly required, pinned by Snyk to avoid a vulnerability \ No newline at end of file