Skip to content

Commit

Permalink
Fix logical error in download stage (download was only running on mas…
Browse files Browse the repository at this point in the history
…ter branch)
  • Loading branch information
justaddcoffee committed May 12, 2020
1 parent 2802ee0 commit 08d449e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ pipeline {
steps {
dir('./gitrepo') {
script {
def run_py_dl = sh(
script: '. venv/bin/activate && python3.7 run.py download', returnStatus: true
)
if (env.BRANCH_NAME != 'master') {
echo "Will not push if not on correct branch."
if (run_py_dl == 0) { // upload raw to s3
echo "Will not push if not on correct branch."
}
} else {
def run_py_dl = sh(
script: '. venv/bin/activate && python3.7 run.py download', returnStatus: true
)
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'
if (run_py_dl == 0) { // upload raw to s3
Expand Down

0 comments on commit 08d449e

Please sign in to comment.