forked from demoyuw/docker-devops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.rancher-pipeline.yml
44 lines (44 loc) · 1.42 KB
/
.rancher-pipeline.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
stages:
- name: build sonarqube runner image
steps:
- publishImageConfig:
dockerfilePath: ./sonarqube/sonar-runner/Dockerfile
buildContext: .
tag: devops-sonarrunner:${CICD_EXECUTION_SEQUENCE}
- name: run sonarqube runner
steps:
- applyYamlConfig:
path: ./sonarqube/sonar-runner/k8s-yaml/sonar-runner-deployment.yaml
- name: Publish flask image
steps:
- publishImageConfig:
dockerfilePath: ./flask/dockerfile/Dockerfile
buildContext: .
tag: demoyuw/devops-flask:${CICD_EXECUTION_SEQUENCE}
- name: deploy dev flask-${CICD_GIT_BRANCH} environment
steps:
- applyYamlConfig:
path: ./flask/k8s-yaml/Development/flask-deployment.yaml
- applyYamlConfig:
path: ./flask/k8s-yaml/Development/flask-service.yaml
when:
branch:
exclude: [ master ]
- name: deploy staging flask-${CICD_GIT_BRANCH} environment
steps:
- applyYamlConfig:
path: ./flask/k8s-yaml/Staging/flask-deployment.yaml
- applyYamlConfig:
path: ./flask/k8s-yaml/Staging/flask-service.yaml
when:
branch:
exclude: [ master ]
- name: deploy production flask-${CICD_GIT_BRANCH} environment
steps:
- applyYamlConfig:
path: ./flask/k8s-yaml/Production/flask-deployment.yaml
- applyYamlConfig:
path: ./flask/k8s-yaml/Production/flask-service.yaml
when:
branch: master
event: [ push ]