-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
43 lines (38 loc) · 982 Bytes
/
.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
image: $CI_REGISTRY/server/server-node-docker/node-docker-ci-16:latest
.base_job:
interruptible: true
variables:
VAULT_SERVER_URL: https://auth.dashlane.com:8200/
.base_protected_job:
extends: .base_job
variables:
VAULT_AUTH_ROLE: ci_server_prod
stages:
- deploy
# Playground deployment
pages:
stage: deploy
script:
- mkdir .public
- cp -r docs/* .public
- mv .public public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
# Publication of some bindings on NPM
npm_publish:
extends: .base_protected_job
stage: deploy
secrets:
NPM_TOKEN_FILE:
vault: ci/server/global/prod/npm/npm_token@kv
interruptible: false
script:
- export NPM_TOKEN="$(cat ${NPM_TOKEN_FILE})"
- npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
- ./npmPublish.sh
rules:
- if: '$CI_COMMIT_REF_PROTECTED == "true" && $CI_COMMIT_TAG =~ /^v\d+.\d+.\d+$/'