From 33687b2a006e550d055196093839e7ff77ee81ff Mon Sep 17 00:00:00 2001 From: Dominik Sigmund <dominik.sigmund@br.de> Date: Fri, 28 Feb 2020 14:27:11 +0100 Subject: [PATCH] Added publish stuff --- .gitlab-ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e138929..65b8ecc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,6 +11,9 @@ include: variables: SONAR_PROJECT_KEY: config SONAR_TOKEN: 11922a8e774494f51e1d2f0e695949e4073e7df8 + NPM_USERNAME: git + NPM_PASSWORD: git + NPM_EMAIL: git@git.de cache: paths: @@ -42,6 +45,15 @@ test: publish to local npm: stage: publish before_script: - - echo '//it-devops-01:4873/:_authToken="ZMh1NzlklUTNNvt573Imgw=="' > .npmrc + - apt-get install expect + - | + /usr/bin/expect <<EOD + spawn npm adduser --registry https://it-devops-01:4873 + expect { + "Username:" {send "$NPM_USERNAME\r"; exp_continue} + "Password:" {send "$NPM_PASSWORD\r"; exp_continue} + "Email: (this IS public)" {send "$NPM_EMAIL\r"; exp_continue} + } + EOD script: - npm publish --registry https://it-devops-01:4873 \ No newline at end of file -- GitLab