From 805dfb6ec12d958524609f4aa481f6d01cd6a331 Mon Sep 17 00:00:00 2001 From: Justin Reese Date: Mon, 18 May 2020 12:59:09 -0700 Subject: [PATCH 1/2] Removed gitkeep file before uploading transformed files --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index eeab677f..f738623c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -85,6 +85,7 @@ pipeline { echo "Will not push if not on correct branch." } else { withCredentials([file(credentialsId: 's3cmd_kg_hub_push_configuration', variable: 'S3CMD_JSON')]) { + sh 'rm -fr data/transformed/.gitkeep' sh 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text --cf-invalidate put -r data/transformed s3://kg-hub-public-data/' } } From 627ae4bc7f740dfea8e3454e90f65a6e3961d01b Mon Sep 17 00:00:00 2001 From: Justin Reese Date: Mon, 18 May 2020 13:53:11 -0700 Subject: [PATCH 2/2] Logical error when checking brance before pushing transformed files - should env.BRANCH_NAME != 'master' --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f738623c..6cb320a8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -81,7 +81,7 @@ pipeline { script: '. venv/bin/activate && python3.7 run.py transform', returnStatus: true ) if (run_py_transform == 0) { // upload transformed to s3 if we're on correct branch - if (env.BRANCH_NAME == 'master') { + if (env.BRANCH_NAME != 'master') { echo "Will not push if not on correct branch." } else { withCredentials([file(credentialsId: 's3cmd_kg_hub_push_configuration', variable: 'S3CMD_JSON')]) {