-
Notifications
You must be signed in to change notification settings - Fork 72
/
.cirrus.yml
68 lines (63 loc) · 2.57 KB
/
.cirrus.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
gcp_credentials: ENCRYPTED[!149d4005ecdba4cdd78bb5ba22756ebb98bf8e3367ee2e9ab08c5a1608c0d3e3b501904b67a1d67c0b63085e469d7dde!]
env:
GITHUB_TOKEN: ENCRYPTED[!f458126aa9ed2ac526f220c5acb51dd9cc255726b34761a56fc78d4294c11089502a882888cef0ca7dd4085e72e611a5!]
SONAR_TOKEN: ENCRYPTED[!4e5894b7b32f763db69e70fb56188d3f42539db36374b1f97c425f37a7ecd441c28a9da267c461b9cc8fb53124f14c22!]
REPOX_CLI_CONFIG_QA_DEPLOYER: ENCRYPTED[!b52b55df9afe3117bfa59ea8084e7f724a55816557dfb9838626d10dc7df63116900c4d0d0cc74c5d10aedce12d5ce7a!]
REPOX_CLI_CONFIG_BUILD_PROMOTER: ENCRYPTED[!906c4d977477eb00bd4cbd4f46bd8508fcdd29c74c2ca39191511bb5407d209c98b6ef308136f09663762f61ba3cd792!]
# Use bash (instead of sh on linux or cmd.exe on windows)
CIRRUS_SHELL: bash
only_sonarsource_qa: &ONLY_SONARSOURCE_QA
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && $CIRRUS_TAG == "" && ($CIRRUS_PR != "" || $CIRRUS_BRANCH == "master" || $CIRRUS_BRANCH =~ "branch-.*" || $CIRRUS_BRANCH =~ "dogfood-on-.*")
container_definition: &CONTAINER_DEFINITION
builder_image_project: release-engineering-ci-prod
builder_image_name: family/docker-builder
cluster_name: cirrus-ci
zone: europe-west4-b
namespace: default
use_in_memory_disk: true
build_task:
<<: *ONLY_SONARSOURCE_QA
gke_container:
matrix:
- dockerfile: .cirrus/nodejs-12.Dockerfile
- dockerfile: .cirrus/nodejs-14.Dockerfile
- dockerfile: .cirrus/nodejs-16.Dockerfile
- dockerfile: .cirrus/nodejs-18.Dockerfile
<<: *CONTAINER_DEFINITION
cpu: 3
memory: 8G
env:
CIRRUS_CLONE_DEPTH: 10
SONARSOURCE_QA: true
script:
- jfrog config import $REPOX_CLI_CONFIG_QA_DEPLOYER
- jfrog rt npm-config --repo-resolve npm --repo-deploy sonarsource-npm-public-qa
- init_git_submodules -r
- jfrog rt npm-ci
- npm run typecheck
- npm run build
- ./scripts/test-ci.sh
- npm run check-format
- npm run lint
- npm run ruling
- ./scripts/analyze_and_publish.sh
ws_scan_task:
depends_on:
- build
gke_container:
dockerfile: .cirrus/nodejs-12.Dockerfile
<<: *CONTAINER_DEFINITION
cpu: 2
memory: 2G
# run only on master and long-term branches
only_if: $CIRRUS_USER_COLLABORATOR == 'true' && ($CIRRUS_BRANCH == "master" || $CIRRUS_BRANCH =~ "branch-.*")
env:
WS_APIKEY: ENCRYPTED[!3929c6148b9dfc751a2d17c590b15d755f82cd9c108f2de5f24a5b32f2a0c26144e921fab7e2c959fc2824d6d6d1550d!]
maven_cache:
folder: ${CIRRUS_WORKING_DIR}/.m2/repository
whitesource_script:
- ./scripts/run_ws_scan.sh
allow_failures: "true"
always:
ws_artifacts:
path: "whitesource/**/*"