-
Notifications
You must be signed in to change notification settings - Fork 16
/
screwdriver.yaml
66 lines (63 loc) · 2.42 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
shared:
environment:
DOCKER_REPO: screwdrivercd/store
DOCKER_MULTI_PLATFORM_BUILDS_ENABLED: 1
jobs:
main:
image: node:18
environment:
SD_SONAR_OPTS: "-Dsonar.sources=lib,plugins,helpers -Dsonar.tests=test -Dsonar.javascript.lcov.reportPaths=artifacts/coverage/lcov.info -Dsonar.testExecutionReportPaths=artifacts/report/test.xml"
requires: [~pr, ~commit]
steps:
- install: npm install
- test: npm test
# Publish the package to GitHub and build Docker image
publish:
requires: [main]
template: screwdriver-cd/semantic-release
secrets:
# Publishing to NPM
- NPM_TOKEN
# Pushing tags to Git
- GH_TOKEN
docker-publish:
requires: publish
template: sd/dind@latest
# Deploy to beta environment and run tests
beta:
image: node:18
requires: [docker-publish]
steps:
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
- get-tag: ./ci/git-latest.sh
- wait-docker: DOCKER_TAG=`cat VERSION` ./ci/docker-wait.sh
- deploy-k8s: K8S_TAG=`cat VERSION` ./ci/k8s-deploy.sh
- test: sleep 20 && curl --silent --fail -o /dev/null https://beta.store.screwdriver.cd/v1/status
environment:
K8S_CONTAINER: screwdriver-store
K8S_IMAGE: screwdrivercd/store
K8S_HOST: kubernetes.default.svc
K8S_DEPLOYMENT: sdstore-beta
SD_STORE: beta.store.screwdriver.cd
secrets:
# Talking to Kubernetes
- K8S_TOKEN
# Deploy to prod environment and run tests
prod:
image: node:18
requires: [beta]
steps:
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
- get-tag: ./ci/git-latest.sh
- wait-docker: DOCKER_TAG=`cat VERSION` ./ci/docker-wait.sh
- deploy-k8s: K8S_TAG=`cat VERSION` ./ci/k8s-deploy.sh
- test: sleep 20 && curl --silent --fail -o /dev/null https://store.screwdriver.cd/v1/status
environment:
K8S_CONTAINER: screwdriver-store
K8S_IMAGE: screwdrivercd/store
K8S_HOST: kubernetes.default.svc
K8S_DEPLOYMENT: sdstore
SD_STORE: store.screwdriver.cd
secrets:
# Talking to Kubernetes
- K8S_TOKEN