-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
67 lines (62 loc) · 2.16 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
env:
CIRRUS_CLONE_DEPTH: '20'
CIRRUS_SHELL: bash
ARTIFACTORY_URL: https://repox.jfrog.io/artifactory
ARTIFACTORY_DEPLOY_REPO: sonarsource-npm-public-qa
eks_container_definition: &CONTAINER_DEFINITION
image: ${CIRRUS_AWS_ACCOUNT}.dkr.ecr.eu-central-1.amazonaws.com/base:node20-yarn2.4.3
cluster_name: ${CIRRUS_CLUSTER_NAME}
region: eu-central-1
namespace: default
docker_arguments:
CIRRUS_AWS_ACCOUNT: ${CIRRUS_AWS_ACCOUNT}
yarn_cache_template: &YARN_CACHE_TEMPLATE
yarn_cache:
folder: '.yarn'
fingerprint_script: cat yarn.lock
build_task:
auto_cancellation: $CIRRUS_BRANCH != 'master' && $CIRRUS_BRANCH != 'stable'
<<: *YARN_CACHE_TEMPLATE
eks_container:
<<: *CONTAINER_DEFINITION
cpu: 8
memory: 10G
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/next data.url]
SONAR_TOKEN: VAULT[development/kv/data/next 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)
build_script:
- source cirrus-env BUILD
- yarn_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:
- source cirrus-env PROMOTE
- cirrus_promote_npm
mend_scan_task:
only_if: $CIRRUS_BRANCH == "main" || $CIRRUS_BRANCH =~ "branch-.*"
timeout_in: 30m
eks_container:
<<: *CONTAINER_DEFINITION
cpu: 2
memory: 4Gb
env:
WS_APIKEY: VAULT[development/kv/data/mend data.apikey]
WS_WSS_URL: VAULT[development/kv/data/mend data.url]
WS_USERKEY: VAULT[development/kv/data/mend data.userKey]
mend_script:
- .cirrus/cirrus-mend-scan.sh
allow_failures: 'true'
always:
ws_artifacts:
path: 'whitesource/**/*'