PT #164169543: Theia publish npm token

This commit is contained in:
BoykoAlex
2019-03-18 16:01:43 -04:00
parent 8d27d83dae
commit 3805e19450
4 changed files with 10 additions and 3 deletions

View File

@@ -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:

View File

@@ -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)

View File

@@ -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

View File

@@ -11,4 +11,5 @@ image_resource:
type: docker-image
source:
repository: kdvolder/sts4-build-env
params:
npm_token: npm-auth-token-for-publishing