This repository has been archived by the owner on Apr 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
screwdriver.yaml
72 lines (68 loc) · 2.98 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
shared:
image: node:8
jobs:
main:
# ~sd@235:publish executor-k8s-vm https://cd.screwdriver.cd/pipelines/235/
# ~sd@13:publish screwdriver-executor-docker https://cd.screwdriver.cd/pipelines/13
# ~sd@19:publish screwdriver-executor-jenkins https://cd.screwdriver.cd/pipelines/19
# ~sd@28:publish screwdriver-executor-k8s https://cd.screwdriver.cd/pipelines/28
# ~sd@202:publish screwdriver-executor-router https://cd.screwdriver.cd/pipelines/202
# requires: [~pr, ~commit, ~sd@235:publish, ~sd@13:publish, ~sd@28:publish, ~sd@202:publish, ~sd@19:publish]
requires: [~pr, ~commit]
steps:
- install: npm install
- test: npm test
environment:
SD_SONAR_OPTS: "-Dsonar.sources=. -Dsonar.inclusions=*.js -Dsonar.exclusions=test/*,**/node_modules/** -Dsonar.javascript.lcov.reportPath=artifacts/coverage/lcov.info"
# Publish the package to GitHub and build docker image
publish:
requires: [main]
template: screwdriver-cd/semantic-release
steps:
- postpublish: git clone https://github.com/screwdriver-cd/toolbox.git ci && ./ci/git-latest.sh && DOCKER_TAG=`cat VERSION` ./ci/docker-trigger.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:
requires: [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: echo Put acceptance tests here
environment:
DOCKER_REPO: screwdrivercd/queue-worker
K8S_CONTAINER: screwdriver-rabbitmq-scheduler
K8S_IMAGE: screwdrivercd/queue-worker
K8S_HOST: kubernetes
K8S_DEPLOYMENT: rabbitmq-scheduler-beta
secrets:
# Talking to Kubernetes
- K8S_TOKEN
# Deploy to our prod environment and run tests
prod:
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: echo Put acceptance tests here
environment:
DOCKER_REPO: screwdrivercd/queue-worker
K8S_CONTAINER: screwdriver-rabbitmq-scheduler
K8S_IMAGE: screwdrivercd/queue-worker
K8S_HOST: kubernetes
K8S_DEPLOYMENT: rabbitmq-scheduler
secrets:
# Talking to Kubernetes
- K8S_TOKEN