From 7fcd41b16c0e559379ff0f9d0a47f64b667d8f45 Mon Sep 17 00:00:00 2001 From: Justin Reese Date: Tue, 12 May 2020 17:25:49 -0700 Subject: [PATCH] Remove s3cmd variable --- Jenkinsfile | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 63203335..95075b6f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -58,16 +58,14 @@ pipeline { echo "Will not push if not on correct branch." } else { withCredentials([file(credentialsId: 's3cmd_kg_hub_push_configuration', variable: 'S3CMD_JSON')]) { - def s3cmd_with_args = 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text' - sh '${s3cmd_with_args} --cf-invalidate put -r data/raw s3://kg-hub-public-data/' + sh 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text --cf-invalidate put -r data/raw s3://kg-hub-public-data/' } } } else { // 'run.py download' failed - let's try to download last good copy of raw/ from s3 to data/ withCredentials([file(credentialsId: 's3cmd_kg_hub_push_configuration', variable: 'S3CMD_JSON')]) { - def s3cmd_with_args = 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text' sh 'rm -fr data/raw || true;' sh 'mkdir -p data/raw || true' - sh '${s3cmd_with_args} get -r s3://kg-hub-public-data/raw/ data/raw/' + sh 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text' get -r s3://kg-hub-public-data/raw/ data/raw/' } } } @@ -87,16 +85,14 @@ pipeline { echo "Will not push if not on correct branch." } else { withCredentials([file(credentialsId: 's3cmd_kg_hub_push_configuration', variable: 'S3CMD_JSON')]) { - def s3cmd_with_args = 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text' - sh '${s3cmd_with_args} --cf-invalidate put -r data/transformed s3://kg-hub-public-data/' + sh 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text --cf-invalidate put -r data/transformed s3://kg-hub-public-data/' } } } else { // 'run.py transform' failed - let's try to download last good copy of transformed/ from s3 to data/ withCredentials([file(credentialsId: 's3cmd_kg_hub_push_configuration', variable: 'S3CMD_JSON')]) { - def s3cmd_with_args = 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text' sh 'rm -fr data/transformed || true;' sh 'mkdir -p data/transformed || true' - sh '${s3cmd_with_args} get -r s3://kg-hub-public-data/transformed/ data/transformed/' + sh 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text get -r s3://kg-hub-public-data/transformed/ data/transformed/' } } } @@ -130,9 +126,8 @@ pipeline { echo "Will not push if not on correct branch." } else { withCredentials([file(credentialsId: 's3cmd_kg_hub_push_configuration', variable: 'S3CMD_JSON')]) { - def s3cmd_with_args = 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text' - sh '${s3cmd_with_args} --cf-invalidate put merged-kg.nt.gz s3://kg-hub-public-data/kg-covid-19.nt.gz' - sh '${s3cmd_with_args} --cf-invalidate put merged-kg.tar.gz s3://kg-hub-public-data/kg-covid-19.tar.gz' + sh 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text --cf-invalidate put merged-kg.nt.gz s3://kg-hub-public-data/kg-covid-19.nt.gz' + sh 's3cmd -c $S3CMD_JSON --acl-public --mime-type=plain/text --cf-invalidate put merged-kg.tar.gz s3://kg-hub-public-data/kg-covid-19.tar.gz' // Should now appear at: // https://kg-hub.berkeleybop.io/[artifact name] }