1 | version: 2
|
2 | jobs:
|
3 | build:
|
4 | machine: true
|
5 | working_directory: ~/build-tools
|
6 | steps:
|
7 | - checkout
|
8 | - restore_cache:
|
9 | key: dependency-cache-{{ checksum "package.json" }}
|
10 | - restore_cache:
|
11 | key: yarn-cache-{{ checksum "package.json" }}
|
12 | - restore_cache:
|
13 | key: dont-break-cache-v1
|
14 | - run:
|
15 | name: initial-steps
|
16 | command: |
|
17 | ./scripts/ci/upgrade-node.sh
|
18 | ./scripts/ci/upgrade-yarn.sh
|
19 | - run:
|
20 | name: pre-deps
|
21 | command: |
|
22 | sudo chmod -R a+w /usr/local
|
23 | yarn config set cache-folder ~/.cache/yarn
|
24 | if [ "${NPM_TOKEN}" == "" ]; then rm .npmrc; fi
|
25 | - run:
|
26 | name: install-deps
|
27 | command: |
|
28 | npm run setup
|
29 | if [ "${NPM_TOKEN}" != "" ]; then
|
30 | ./scripts/install-dont-break.sh
|
31 | cp -f .npmrc ~
|
32 | yarn global add "@egis/egis-ui-test-utils@^2.28.1-pre.1"
|
33 | update-chrome
|
34 | fi
|
35 | - save_cache:
|
36 | key: dependency-cache-{{ checksum "package.json" }}
|
37 | paths:
|
38 | - node_modules
|
39 | - yarn.lock
|
40 | - run:
|
41 | name: post-deps
|
42 | command: |
|
43 | mkdir ci-artifacts
|
44 | OUT_DIR=ci-artifacts ./scripts/ci/collect-deps-versions.sh
|
45 | cp yarn.lock ci-artifacts/
|
46 | when: always
|
47 | - store_artifacts:
|
48 | path: ci-artifacts/
|
49 | - run:
|
50 | name: test
|
51 | environment:
|
52 | KEEP_MODIFIED_PACKAGE: true
|
53 | command: |
|
54 | npm test
|
55 | merge-build-tools-deps && git checkout -- package.json
|
56 | if [ "${NPM_TOKEN}" != "" ]; then
|
57 | dont-break --timeout 600
|
58 | fi
|
59 | - save_cache:
|
60 | key: yarn-cache-{{ checksum "package.json" }}
|
61 | paths:
|
62 | - ~/.cache/yarn
|
63 | - save_cache:
|
64 | key: dont-break-cache-v1
|
65 | paths:
|
66 | - /tmp/egis-build-tools-v-0-0-0-semantic-release-against-egis-egis-ui
|
67 | - /tmp/egis-build-tools-v-0-0-0-semantic-release-against-egis-esign
|
68 | - /tmp/egis-build-tools-v-0-0-0-semantic-release-against-egis-portal-app
|
69 | - /tmp/egis-build-tools-v-0-0-0-semantic-release-against-egis-bulk-capture
|
70 | - run:
|
71 | name: deploy
|
72 | command: ./scripts/semantic-release.sh
|