-
Notifications
You must be signed in to change notification settings - Fork 53
/
screwdriver.yaml
90 lines (86 loc) · 2.57 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
cache:
pipeline: [ ~/.npm ]
shared:
environment:
DOCKER_REPO: screwdrivercd/ui
DOCKER_MULTI_PLATFORM_BUILDS_ENABLED: 1
annotations:
screwdriver.cd/ram: HIGH
jobs:
main:
image: node:18
environment:
COVERAGE: "true"
SD_SONAR_OPTS: "-Dsonar.sources=app -Dsonar.javascript.lcov.reportPaths=coverage/lcov.info"
steps:
- install: npm install
- install-browsers: ./bin/setup_chrome.sh
- test: npm test
requires:
- ~pr
- ~commit
# Publish the package to GitHub and build docker image
publish:
image: node:18
annotations:
screwdriver.cd/ram: TURBO
environment:
RELEASE_FILE: sdui.tgz
DOCKER_REPO: screwdrivercd/ui
steps:
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
- install: npm install
- build: ./node_modules/.bin/ember build --environment production
- package: tar -C dist -cvzf $RELEASE_FILE .
- tag: ./ci/git-tag.sh
- publish: ./ci/git-release.sh
secrets:
# Pushing tags to Git
- GIT_KEY
# Pushing releases to GitHub
- GITHUB_TOKEN
requires:
- main
docker-publish:
requires: publish
template: sd/dind@latest
# Deploy to our beta environment and run tests
beta:
image: node:18
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 30; curl --silent --fail -o /dev/null https://beta.cd.screwdriver.cd
environment:
K8S_CONTAINER: screwdriver-ui
K8S_IMAGE: screwdrivercd/ui
K8S_HOST: kubernetes.default.svc
K8S_DEPLOYMENT: sdui-beta
SD_UI: beta.cd.screwdriver.cd
secrets:
# Talking to Kubernetes
- K8S_TOKEN
requires:
- docker-publish
# Deploy to our prod environment and run tests
prod:
image: node:18
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 30; curl --silent --fail -o /dev/null https://cd.screwdriver.cd
environment:
K8S_CONTAINER: screwdriver-ui
K8S_IMAGE: screwdrivercd/ui
K8S_HOST: kubernetes.default.svc
K8S_DEPLOYMENT: sdui
SD_UI: cd.screwdriver.cd
secrets:
# Talking to Kubernetes
- K8S_TOKEN
requires:
- beta