-
Notifications
You must be signed in to change notification settings - Fork 12
/
pipelines.yaml
131 lines (131 loc) · 3.37 KB
/
pipelines.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: pipeline-build-deploy
spec:
params:
- name: git-repository
description: the git repo
- name: git-branch
description: the branch for the git repo
- name: schematics-workspace-id
- name: target-region
- name: registry-namespace
- name: image-name
- name: registry-region
- name: fail-on-scanned-issues
workspaces:
- name: pipeline-ws
tasks:
- name: git-repo-changes
workspaces:
- name: task-workspace
workspace: pipeline-ws
params:
- name: toolchain-dirs
value: ".tekton .bluemix scripts"
- name: app-dirs
value: "app"
- name: generic-dirs
value: mapfile.txt
- name: git-repository
value: $(params.git-repository)
- name: git-branch
value: $(params.git-branch)
taskRef:
name: detect-change-task
- name: build
# ENABLE to only build on app changes
# when:
# - input: "$(tasks.git-repo-changes.results.is_app)"
# operator: in
# values: ["true"]
taskRef:
name: icr-containerize
params:
- name: path-to-context
value: "app"
- name: path-to-dockerfile
value: "app"
- name: additional-tags
value: "latest"
- name: properties-file
value: "build.properties"
- name: registry-region
value: $(params.registry-region)
- name: registry-namespace
value: $(params.registry-namespace)
- name: image-name
value: $(params.image-name)
workspaces:
- name: source
workspace: pipeline-ws
- name: va-scan
taskRef:
name: icr-check-va-scan
runAfter: [build]
params:
- name: scan-report-file
value: "secure-file-storage-va-report.json"
- name: image-url
value: $(tasks.build.results.image-repository)
- name: image-digest
value: $(tasks.build.results.image-digest)
- name: fail-on-scanned-issues
value: $(params.fail-on-scanned-issues)
workspaces:
- name: artifacts
workspace: pipeline-ws
- name: deploy-to-kubernetes
taskRef:
name: deploy-app
runAfter: [va-scan]
workspaces:
- name: task-workspace
workspace: pipeline-ws
params:
- name: schematics-workspace-id
value: $(params.schematics-workspace-id)
- name: target-region
value: $(params.target-region)
- name: image-repository
value: $(tasks.build.results.image-repository)
---
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: pipeline-uninstall
spec:
workspaces:
- name: pipeline-workspace
params:
- name: schematics-workspace-id
- name: target-region
- name: git-repository
- name: git-branch
- name: registry-namespace
- name: image-name
- name: registry-region
tasks:
- name: uninstall-app
workspaces:
- name: task-workspace
workspace: pipeline-workspace
params:
- name: schematics-workspace-id
value: $(params.schematics-workspace-id)
- name: target-region
value: $(params.target-region)
- name: git-repository
value: $(params.git-repository)
- name: git-branch
value: $(params.git-branch)
- name: registry-namespace
value: $(params.registry-namespace)
- name: image-name
value: $(params.image-name)
- name: registry-region
value: $(params.registry-region)
taskRef:
name: task-uninstall-app