forked from screwdriver-cd/guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
screwdriver.yaml
46 lines (43 loc) · 1.4 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
shared:
image: ruby:2
jobs:
main:
requires: [~pr, ~commit]
steps:
- bundle_install: bundle install
- build: bundle exec jekyll build --source docs --destination _site
publish:
requires: [main]
environment:
DOCKER_REPO: screwdrivercd/guide
RELEASE_FILE: guide.tgz
secrets:
- DOCKER_TRIGGER
- GIT_KEY
- GITHUB_TOKEN
steps:
- setup-ci: git clone https://github.com/screwdriver-cd/toolbox.git ci
- install: bundle install
- build: bundle exec jekyll build --source docs --destination _site
- package: tar -C _site -cvzf $RELEASE_FILE .
- tag: ./ci/git-tag.sh
- publish: ./ci/git-release.sh
- docker: |
./ci/git-latest.sh
export DOCKER_TAG=`cat VERSION`
./ci/docker-trigger.sh
deploy:
requires: [publish]
environment:
DOCKER_REPO: screwdrivercd/guide
K8S_CONTAINER: guide
K8S_IMAGE: screwdrivercd/guide
K8S_HOST: kubernetes
K8S_DEPLOYMENT: sdguide
secrets:
- K8S_TOKEN
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