-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.cirrus.yml
59 lines (54 loc) · 1.92 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
env:
CIRRUS_CLONE_DEPTH: "20"
ARTIFACTORY_URL: VAULT[development/kv/data/repox data.url]
ARTIFACTORY_DEPLOY_REPO: sonarsource-npm-public-qa
# Use bash (instead of sh on linux or cmd.exe on Windows)
CIRRUS_SHELL: bash
eks_container_definition: &CONTAINER_DEFINITION
image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:nodejs-j21-0.1
cluster_name: ${CIRRUS_CLUSTER_NAME}
region: eu-central-1
namespace: default
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- arm64
docker_arguments:
CIRRUS_AWS_ACCOUNT: ${CIRRUS_AWS_ACCOUNT}
build_task:
auto_cancellation: $CIRRUS_BRANCH != 'master' && $CIRRUS_BRANCH != 'stable'
eks_container:
<<: *CONTAINER_DEFINITION
cpu: 2
memory: 2G
env:
ARTIFACTORY_DEPLOY_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-qa-deployer access_token]
SONAR_HOST_URL: VAULT[development/kv/data/sonarcloud data.url]
SONAR_TOKEN: VAULT[development/kv/data/sonarcloud data.token]
DEPLOY_PULL_REQUEST: "true" # Deploy or not PR builds to Repox
# (reminder: PRs builds goes to sonarsource-npm-public-dev / long living branches sonarsource-npm-public-builds)
node_modules_cache:
folder: node_modules
reupload_on_changes: "false"
fingerprint_script:
- echo $CIRRUS_OS
- node --version
- cat package-lock.json
populate_script:
- npm ci
build_script:
- source cirrus-env BUILD
- npm_build_deploy_analyze
promote_task:
depends_on:
- build
eks_container:
<<: *CONTAINER_DEFINITION
cpu: 2
memory: 2G
env:
ARTIFACTORY_PROMOTE_ACCESS_TOKEN: VAULT[development/artifactory/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-promoter access_token]
GITHUB_TOKEN: VAULT[development/github/token/${CIRRUS_REPO_OWNER}-${CIRRUS_REPO_NAME}-promotion token]
script: cirrus_promote_npm