diff --git a/concourse/pipeline.yml b/concourse/pipeline.yml index 2787513b8..7f09f95e5 100644 --- a/concourse/pipeline.yml +++ b/concourse/pipeline.yml @@ -850,6 +850,8 @@ jobs: file: tasks/concourse/tasks/publish-theia-releases.yml input_mapping: sts4: tasks + params: + npm_token: ((npm_token)) on_failure: put: slack-notification params: diff --git a/concourse/set-pipeline.py b/concourse/set-pipeline.py index 7493d19fb..5655b9c14 100755 --- a/concourse/set-pipeline.py +++ b/concourse/set-pipeline.py @@ -11,7 +11,7 @@ def replace(infile, outfile, findword, replaceword): branch = os.popen("git rev-parse --abbrev-ref HEAD").read().strip() if branch == 'master': - os.system('fly -t tools set-pipeline --load-vars-from ${HOME}/.sts4-concourse-credentials.yml '+ + os.system('fly -t tools set-pipeline --load-vars-from ${HOME}/git/sts4-concourse-build-credentials/.sts4-concourse-credentials.yml '+ ' --var "branch=' + branch + '" ' + ' -p sts4-'+ branch +' -c pipeline.yml') else: @@ -19,7 +19,7 @@ else: replace("pipeline.yml", "pipeline-"+branch+".yml", "snapshot", branch) with open(fname, 'r') as fin: print fin.read() - cmd = ('fly -t tools set-pipeline --load-vars-from ${HOME}/.sts4-concourse-credentials.yml ' + + cmd = ('fly -t tools set-pipeline --load-vars-from ${HOME}/git/sts4-concourse-build-credentials/.sts4-concourse-credentials.yml ' + '--var "branch=' + branch + '" ' + '-p sts4-' +branch+' -c '+fname) print cmd os.system(cmd) diff --git a/concourse/tasks/publish-theia-releases.sh b/concourse/tasks/publish-theia-releases.sh index 1b321d12c..c8f1f646e 100755 --- a/concourse/tasks/publish-theia-releases.sh +++ b/concourse/tasks/publish-theia-releases.sh @@ -2,6 +2,10 @@ set -e workdir=`pwd` +envsubst > ~/.npmrc << XXXXXX +//registry.npmjs.org/:_authToken=${npm_token} +XXXXXX + theia_tgz_files=`ls ${workdir}/s3-*-theia-*/theia-*.tgz` for theia_tgz_file in $theia_tgz_files diff --git a/concourse/tasks/publish-theia-releases.yml b/concourse/tasks/publish-theia-releases.yml index 7be130324..ff9e9545c 100755 --- a/concourse/tasks/publish-theia-releases.yml +++ b/concourse/tasks/publish-theia-releases.yml @@ -11,4 +11,5 @@ image_resource: type: docker-image source: repository: kdvolder/sts4-build-env - \ No newline at end of file +params: + npm_token: npm-auth-token-for-publishing \ No newline at end of file