forked from screwdriver-cd/queue-worker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screwdriver.yaml
65 lines (60 loc) · 2.16 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
workflow:
- publish
- beta
- prod
shared:
image: node:6
jobs:
main:
steps:
- install: npm install
- test: npm test
# Publish the package to GitHub and build docker image
publish:
template: screwdriver-cd/semantic-release
steps:
- postpublish: git clone https://gist.github.com/3d2388b2a7ba658cdcdaffa8cd874e50.git ci && ./ci/docker.sh
environment:
# Docker hub repo
DOCKER_REPO: screwdrivercd/queue-worker
secrets:
# Publishing to NPM
- NPM_TOKEN
# Pushing tags to Git
- GH_TOKEN
# Trigger a Docker Hub build
- DOCKER_TRIGGER
# Deploy to beta environment
beta:
steps:
- setup-ci: git clone https://gist.github.com/3d2388b2a7ba658cdcdaffa8cd874e50.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: echo Put acceptance tests here
environment:
DOCKER_REPO: screwdrivercd/queue-worker
K8S_CONTAINER: screwdriver-redis-worker
K8S_IMAGE: screwdrivercd/queue-worker
K8S_HOST: api.k8s.screwdriver.cd
K8S_DEPLOYMENT: redis-worker-beta
secrets:
# Talking to Kubernetes
- K8S_TOKEN
# Deploy to our prod environment and run tests
prod:
steps:
- setup-ci: git clone https://gist.github.com/3d2388b2a7ba658cdcdaffa8cd874e50.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: echo Put acceptance tests here
environment:
DOCKER_REPO: screwdrivercd/queue-worker
K8S_CONTAINER: screwdriver-redis-worker
K8S_IMAGE: screwdrivercd/queue-worker
K8S_HOST: api.k8s.screwdriver.cd
K8S_DEPLOYMENT: redis-worker
secrets:
# Talking to Kubernetes
- K8S_TOKEN