-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
104 lines (95 loc) · 2.33 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
image: $DOCKER_URL/node:6
stages:
- test
- package
- publish
- notify
test_node4:
image: $DOCKER_URL/node:4
tags:
- docker-executor
stage: test
except:
- triggers
script:
- npm install --global npm@5.10.0
- npm install --registry ${NPM_REGISTRY} @f5devcentral/f5-cloud-libs@beta
- npm install --registry ${NPM_REGISTRY}
- npm install mocha@5.2.0
- npm install nyc@11.1.0
- npm run lint
- npm test
test_node6:
tags:
- docker-executor
stage: test
except:
- triggers
script:
- npm install --registry ${NPM_REGISTRY} @f5devcentral/f5-cloud-libs@beta
- npm install --registry ${NPM_REGISTRY}
- npm install mocha@5.2.0
- npm install nyc@14.0.0
- npm run lint
- npm test
test_node8:
image: $DOCKER_URL/node:8
tags:
- docker-executor
stage: test
except:
- triggers
script:
- npm install --registry ${NPM_REGISTRY} @f5devcentral/f5-cloud-libs@beta
- npm install --registry ${NPM_REGISTRY}
- npm run lint
- npm test
# audit packages for vulnerabilities
test_audit:
image: $DOCKER_URL/node:8
stage: test
script:
# npm audit - uses custom audit processor wrapper
- npm install
- npm run audit --production
tags:
- cm-official-docker-executor
except:
- triggers
package:
tags:
- docker-executor
stage: package
only:
- /^release-.*/
- /^hf-.*/
script:
- npm run package -- --production
artifacts:
name: ${CI_PROJECT_NAME}-${CI_BUILD_REF}
paths:
- dist/
- doc/
publish:
tags:
- docker-executor
stage: publish
only:
- master
script:
- npm install npm@latest -g --registry ${NPM_REGISTRY}
- echo '//registry.npmjs.org/:_authToken="${NPM_TOKEN}"' > ./.npmrc
- npm publish --access public --tag experimental
notify:
tags:
- docker-executor
stage: notify
except:
- master
script:
- if [[ "$AUTO_NOTIFY" == true ]]; then
- echo 'Running notifyProjects.sh'
- ./build/notifyProjects.sh
- else
- echo AUTO_NOTIFY is off, skipping notification.
- fi