Skip to content

Commit

Permalink
Merge pull request #256 from asfadmin/devel
Browse files Browse the repository at this point in the history
Fix Dependency layer in last build
  • Loading branch information
bbuechler authored Oct 8, 2020
2 parents b130f2f + e1dd82e commit 6b28bfb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions build/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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: '')
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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"
}
}
}
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion build/dependency_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions lambda/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6b28bfb

Please sign in to comment.