-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.gitlab-ci.yml
59 lines (52 loc) · 1.61 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
variables:
SSH_REPO_URL: [email protected]:ergosign/web/ergosign-storybook-pseudo-state.git
stages:
- publish
.publish: &publish_base
stage: publish
image: extdockerregistry.ergosign-projects.com:5000/ergosign-node-image:0.0.20
script:
- echo "building project with ID $CI_BUILD_REF"
- echo > ~/.npmrc
- echo @ergosign-external:registry=https://nexus.ergosign-projects.com/repository/es-npm-external/ >> ~/.npmrc
- echo //nexus.ergosign-projects.com/repository/es-npm-external/:_authToken=$NPM_AUTH_TOKEN >> ~/.npmrc
- echo email = $NPM_EMAIL >> ~/.npmrc
- eval $(ssh-agent -s)
- echo "$JENKINS_PRIVATE_SSH_KEY" | tr -d '\r' | ssh-add - > /dev/null
- git config --global user.email "[email protected]"
- git config --global user.name "Jenkins - Gitlab CI"
- git remote set-url origin $SSH_REPO_URL || true
- git checkout master
- npm ci
- npm run build
- npm run $RELEASE_IT_TASK
- npm run prepack-package
- npm publish dist
tags:
- docker
except:
variables:
- $GITLAB_USER_EMAIL== "[email protected]"
publish_master:
<<: *publish_base
only:
- master
variables:
RELEASE_IT_TASK: release-it-beta
publish_patch_version:
<<: *publish_base
when: manual
variables:
RELEASE_IT_TASK: release-it-patch
publish_minor_version:
<<: *publish_base
when: manual
variables:
RELEASE_IT_TASK: release-it-minor
publish_major_version:
<<: *publish_base
when: manual
variables:
RELEASE_IT_TASK: release-it-major