-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
80 lines (70 loc) · 1.79 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
image: ${GITLAB_REGISTRY}/metrichor-ui/node-cypress-runner/master:node16
variables:
GITLAB_REGISTRY: '$CI_REGISTRY'
stages:
- versiontrack
- test
- pages
- publish
- deploy
# .package: &package_common |
# source ./PATCH_VERSION
# curl -sL https://deb.nodesource.com/setup_12.x | bash -
# apt-get update
# apt-get install -y --force-yes nodejs ont-ca-certs build-essential git xvfb jq
# git config --global url.https://github.com/.insteadOf git://github.com/
# echo "cafile=/usr/local/share/ca-certificates/ont/npm-bundle.pem" >> .npmrc
versiontrack:
stage: versiontrack
script:
- echo "export PATCH=$CI_BUILD_ID" > PATCH_VERSION
artifacts:
paths:
- ./PATCH_VERSION
unit-test:
stage: test
script:
- npm i
- npm run test.spec
.npm-publish-external: &npm_publish_external
stage: publish
script:
- npm i
- source ./PATCH_VERSION
- echo "Patching report versions to $PATCH"
- npm run package:version
- npm run build:docs
- echo $NPM_TOKEN
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> ./.npmrc
- npm publish --verbose --access public --tag ${TAG}
publish_dev:
<<: *npm_publish_external
only:
- develop
variables:
TAG: 'develop'
publish_master:
<<: *npm_publish_external
only:
- master
variables:
TAG: 'next'
publish_release:
<<: *npm_publish_external
only:
- tags
variables:
TAG: 'latest'
pages:
stage: pages
script:
- npm i
- npm run build:app
- sed -i'_orig' -E 's/http:\/\/localhost:[0-9]+/https:\/\/metrichor-reports.git.oxfordnanolabs.local/g' ./www/cronkite/examples/reports/*
- mv www/cronkite public
- npm run build:docs
- mkdir -p public/docs
- cp -rf src/components src/datastreams public/docs/.
artifacts:
paths:
- public