-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpipeline.gocd.yaml
78 lines (78 loc) · 2.25 KB
/
pipeline.gocd.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
73
74
75
76
77
78
format_version: 10
pipelines:
blog-build:
group: ztec.fr
materials:
blog-ztec:
git: ssh://[email protected]:22023/ztec/blog.git
shallow_clone: false
auto_update: true
branch: main
stages:
- build:
fetch_materials: true
keep_artifacts: false
clean_workspace: true
approval:
type: success
allow_only_on_success: false
jobs:
build:
timeout: 0
resources:
- hugo
tasks:
- exec:
arguments:
- -c
- docker build -t git2.riper.fr/ztec/blog:$GO_PIPELINE_LABEL .
command: /bin/bash
run_if: passed
artifacts:
- external:
id: blog-img
store_id: ztec
configuration:
options:
Image: git2.riper.fr/ztec/blog
Tag: ${GO_PIPELINE_LABEL}
blog-deploy:
group: ztec.fr
materials:
blog-build:
ignore_for_scheduling: false
pipeline: blog-build
stage: build
blog-ztec:
git: ssh://[email protected]:22023/ztec/blog.git
shallow_clone: false
auto_update: true
branch: main
stages:
- deploy:
fetch_materials: true
keep_artifacts: false
clean_workspace: true
approval:
type: success
allow_only_on_success: false
jobs:
helm-update:
timeout: 0
resources:
- docker
- kubectl
tasks:
- fetch:
artifact_id: blog-img
pipeline: blog-build
stage: build
job: build
artifact_origin: external
run_if: passed
- exec:
arguments:
- -c
- helm3 upgrade --wait --install --set-string image.name="$ARTIFACT_IMAGE" blog ./helm -f helm/values.yaml --wait
command: /bin/bash
run_if: passed