-
Notifications
You must be signed in to change notification settings - Fork 76
/
config.yml
59 lines (54 loc) · 1.51 KB
/
config.yml
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
version: 2
references:
set_environment_variables: &set_environment_variables
run:
name: Set Environment Variables
command: |
echo 'export CI_SHA1=$CIRCLE_SHA1' >> ${BASH_ENV}
echo 'export CI_BRANCH=$CIRCLE_BRANCH' >> ${BASH_ENV}
echo 'export CI_BUILD_NUM=$CIRCLE_BUILD_NUM' >> ${BASH_ENV}
echo 'export CI_TAG=$CIRCLE_TAG' >> ${BASH_ENV}
echo 'export ROK8S_INSTALL_PATH=${HOME}' >> ${BASH_ENV}
build_image: &build_image
run:
name: Build Docker Image
command: |
docker login quay.io -u="${quay_robot}" -p="${quay_token}"
docker-pull -f deploy/production.config
docker-build -f deploy/production.config
deploy_to_kube: &deploy_to_kube
run:
name: Deploy to Production
command: |
docker-push -f deploy/production.config
prepare-kubectl
k8s-deploy-and-verify -f deploy/production.config
jobs:
build_image:
docker:
- image: quay.io/reactiveops/ci-images:v11.3-stretch
steps:
- checkout
- setup_remote_docker
- *set_environment_variables
- *build_image
deploy:
docker:
- image: quay.io/reactiveops/ci-images:v11.3-stretch
steps:
- checkout
- setup_remote_docker
- *set_environment_variables
- *build_image
- *deploy_to_kube
workflows:
version: 2
build:
jobs:
- build_image
- deploy:
requires:
- build_image
filters:
branches:
only: master