-
Notifications
You must be signed in to change notification settings - Fork 169
/
screwdriver.yaml
120 lines (116 loc) · 4.88 KB
/
screwdriver.yaml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
cache:
event: [ $SD_SOURCE_DIR/node_modules ]
shared:
environment:
DOCKER_REPO: screwdrivercd/screwdriver
DOCKER_MULTI_PLATFORM_BUILDS_ENABLED: 1
jobs:
main:
image: node:18
annotations:
screwdriver.cd/ram: TURBO
screwdriver.cd/cpu: TURBO
requires:
- ~pr
- ~commit
- ~sd@73:publish #artifact-bookend https://cd.screwdriver.cd/pipelines/73
- ~sd@9:publish #models https://cd.screwdriver.cd/pipelines/9
- ~sd@529:publish #workflow-parser https://cd.screwdriver.cd/pipelines/529
steps:
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
- install: npm install
- duplicate: NPM_FILTER=screwdriver- ./ci/npm-dups.sh
- test: npm test
- teardown-coverage: ./ci/coverage.sh
- teardown-cp-coverage-to-artifacts: cp -rf artifacts/coverage $SD_ARTIFACTS_DIR
environment:
SD_SONAR_OPTS: "-Dsonar.sources=lib,plugins -Dsonar.tests=test -Dsonar.javascript.lcov.reportPaths=artifacts/coverage/lcov.info -Dsonar.testExecutionReportPaths=artifacts/report/test.xml"
NODE_OPTIONS: "--max_old_space_size=4096"
secrets:
# Uploading coverage information to coveralls
- COVERALLS_REPO_TOKEN
publish:
image: node:18
requires: [main]
steps:
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
- install-ci: npm install npm-auto-version
- publish-npm-and-git-tag: ./ci/publish.sh
secrets:
# Publishing to NPM
- NPM_TOKEN
# Pushing tags to Git
- GIT_KEY
docker-publish:
annotations:
screwdriver.cd/dockerEnabled: true
screwdriver.cd/dockerCpu: HIGH
screwdriver.cd/dockerRam: HIGH
requires: publish
template: sd/[email protected]
# Deploy to our beta environment and run tests
beta:
requires: [docker-publish]
image: node:18
environment:
K8S_CONTAINER: screwdriver-api
K8S_IMAGE: screwdrivercd/screwdriver
K8S_HOST: kubernetes.default.svc
K8S_DEPLOYMENT: sdapi-beta
SD_API_HOST: beta.api.screwdriver.cd
K8S_ENV_KEY: DATASTORE_DYNAMODB_PREFIX
K8S_ENV_VALUE: beta_rc2_
TEST_USERNAME: sd-buildbot-functional
TEST_USERNAME_X1: sd-buildbot-functional-X1
TEST_ORG: screwdriver-cd-test
secrets:
# Access key for functional tests
- SD_API_TOKEN_BETA
# Git access token
- GIT_TOKEN_BETA
# Access key for functional tests
- SD_API_TOKEN_BETA_X1
# Git access token
- GIT_TOKEN_X1
# Talking to Kubernetes
- K8S_TOKEN
steps:
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
- wait-docker: DOCKER_TAG=`meta get docker_tag` ./ci/docker-wait.sh
- deploy-k8s: K8S_TAG=`meta get docker_tag` ./ci/k8s-deploy.sh
- npm-install: npm install
- test: GIT_TOKEN=${GIT_TOKEN_BETA} SD_API_TOKEN=${SD_API_TOKEN_BETA} npm run functional-beta
- test-parallel: GIT_TOKEN=${GIT_TOKEN_BETA} SD_API_TOKEN=${SD_API_TOKEN_BETA} npm run functional-beta-parallel
- test-x1-parallel: TEST_USERNAME=${TEST_USERNAME_X1} GIT_TOKEN=${GIT_TOKEN_X1} SD_API_TOKEN=${SD_API_TOKEN_BETA_X1} npm run functional-beta-x1-parallel
# Deploy to our prod environment and run tests
prod:
image: node:18
requires: [beta]
steps:
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
- wait-docker: DOCKER_TAG=`meta get docker_tag` ./ci/docker-wait.sh
- deploy-k8s: K8S_TAG=`meta get docker_tag` ./ci/k8s-deploy.sh
- npm-install: npm install
- test: TEST_USERNAME=${TEST_USERNAME_X1} GIT_TOKEN=${GIT_TOKEN_X1} SD_API_TOKEN=${SD_API_TOKEN_PROD_X1} npm run functional
environment:
K8S_CONTAINER: screwdriver-api
K8S_IMAGE: screwdrivercd/screwdriver
K8S_HOST: kubernetes.default.svc
K8S_DEPLOYMENT: sdapi
SD_API_HOST: api.screwdriver.cd
K8S_ENV_KEY: DATASTORE_DYNAMODB_PREFIX
K8S_ENV_VALUE: rc2_
TEST_USERNAME: sd-buildbot-functional
TEST_USERNAME_X1: sd-buildbot-functional-X1
TEST_ORG: screwdriver-cd-test
secrets:
# Access key for functional tests
- SD_API_TOKEN_PROD
# Git access token
- GIT_TOKEN_PROD
# Talking to Kubernetes
- K8S_TOKEN
# Access key for functional tests
- SD_API_TOKEN_PROD_X1
# Git access token
- GIT_TOKEN_X1