-
Notifications
You must be signed in to change notification settings - Fork 1
/
.rancher-pipeline.yml
61 lines (61 loc) · 1.39 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
stages:
- name: Publish image
steps:
- publishImageConfig:
dockerfilePath: ./Dockerfile
buildContext: .
tag: caesarteam/caesar-web-client:${CICD_GIT_BRANCH}
pushRemote: true
registry: index.docker.io
when:
branch:
include:
- develop
- hotfix/*
- publishImageConfig:
dockerfilePath: ./Dockerfile
buildContext: .
tag: caesarteam/caesar-web-client:${CICD_GIT_TAG}
pushRemote: true
registry: index.docker.io
when:
event:
include:
- tag
- name: Deploy
steps:
- applyYamlConfig:
path: ./deploy/deployment.yaml
when:
branch:
include:
- develop
- hotfix/*
- name: Webhook
steps:
- runScriptConfig:
image: caesarteam/alpine-curl
shellScript: |-
curl -X POST -H "Content-Type: application/json" \
--header "Authorization: Basic ${!WEBHOOK_TOKEN}" \
-d '{"name": "caesarteam/caesar-web-client","tag": "${!CICD_GIT_TAG}"}' \
${WEBHOOK_URL}
envFrom:
- sourceName: build-webhook
sourceKey: WEBHOOK_URL
targetKey: WEBHOOK_URL
- sourceName: build-webhook
sourceKey: WEBHOOK_TOKEN
targetKey: WEBHOOK_TOKEN
when:
event:
include:
- tag
notification:
recipients:
- recipient: '#pipeline'
notifier: c-qzkvv:n-qqrqq
condition:
- Success
- Changed
- Failed