-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.gitlab-ci.yml
executable file
·151 lines (135 loc) · 2.77 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
image: $ECR_REGISTRY/signageos/docker-node:16-alpine-build
services:
- docker:dind
stages:
- prepare
- test
- build
- publish
- release
cache:
untracked: true
key: '$CI_PROJECT_ID'
paths:
- node_modules/
before_script:
- export VERSION=`cat ./VERSION`
- export TAG=`cat ./PRERELEASE`
- cp .npmrc.template .npmrc
- npx --userconfig ./.npmrc @signageos/lib version-upgrade $VERSION
- mkdir -p dist
- npm install
prepare:
image: $ECR_REGISTRY/signageos/docker:master
stage: prepare
before_script: []
script:
- ci-prepare
artifacts:
when: on_success
paths:
- ./VERSION
- ./PRERELEASE
test:general:
stage: test
except:
- tags
script:
- npm test
test:lint:
stage: test
except:
- tags
script:
- npm run lint
test:changelog:
image: $ECR_REGISTRY/signageos/docker:master
stage: test
except:
- tags
allow_failure: true
script:
- ci-test-changelog
test:check:
stage: test
except:
- tags
allow_failure: true
variables:
TZ: Europe/Prague
script:
- npm run check
build:
stage: build
dependencies:
- prepare
script:
- npm run prepare --production
- npm run escheck
artifacts:
when: on_success
paths:
- dist/
publish:npm:
stage: publish
dependencies:
- prepare
- build
script:
- npm publish --ignore-scripts
publish:npm-public:
stage: publish
only:
- tags
- master
dependencies:
- prepare
- build
script:
- export NPM_REGISTRY_URL=https://registry.npmjs.org/
- export NPM_REGISTRY_HOST=registry.npmjs.org
- export NPM_AUTH_TOKEN=$PUBLIC_NPM_AUTH_TOKEN
- tools/prepare-npm-public.js
- npm publish --ignore-scripts
release:tag:
image: $ECR_REGISTRY/signageos/docker:master
stage: release
only:
- master
when: manual
allow_failure: false
before_script: []
script:
- ci-release-tag
release:notes:
image: $ECR_REGISTRY/signageos/docker:master
stage: release
only:
- tags
script:
- ci-release-notes
.upstream:documentation:
stage: release
when: on_success
needs:
- prepare
- build
- publish:npm
trigger:
project: signageos/services/documentation
strategy: depend
branch: master
upstream:check:documentation:
extends:
- .upstream:documentation
except:
- tags
variables:
SMIL_PLAYER_PRERELEASE_TAG: $CI_COMMIT_REF_SLUG
upstream:deploy:documentation:
extends:
- .upstream:documentation
only:
- tags
variables:
FORCE_DEPLOY: production