You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 21, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,7 @@ listed in the changelog.
13
13
14
14
- Stream Buildah and Aqua log output ([#596](https://github.com/opendevstack/ods-pipeline/issues/596))
15
15
- Update skopeo (1.6 to 1.8) and buildah (1.24 to 1.26) ([#598](https://github.com/opendevstack/ods-pipeline/issues/598))
16
+
- Support running different pipelines on different webhook events (current `ods.yaml` format still supported for the moment, but will be deprecated and removed in upcoming releases) ([#562](https://github.com/opendevstack/ods-pipeline/issues/562))
Copy file name to clipboardExpand all lines: docs/add-to-repository.adoc
+26-26Lines changed: 26 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,32 +27,32 @@ environments:
27
27
stage: dev
28
28
29
29
pipeline:
30
-
tasks:
31
-
- name: backend-build-go
32
-
taskRef:
33
-
kind: Task
34
-
name: ods-build-go-v0-6-0
35
-
workspaces:
36
-
- name: source
37
-
workspace: shared-workspace
38
-
- name: backend-package-image
39
-
taskRef:
40
-
kind: Task
41
-
name: ods-package-image-v0-6-0
42
-
runAfter:
43
-
- backend-build-go
44
-
workspaces:
45
-
- name: source
46
-
workspace: shared-workspace
47
-
- name: backend-deploy
48
-
taskRef:
49
-
kind: Task
50
-
name: ods-deploy-helm-v0-6-0
51
-
runAfter:
52
-
- backend-package-image
53
-
workspaces:
54
-
- name: source
55
-
workspace: shared-workspace
30
+
- tasks:
31
+
- name: backend-build-go
32
+
taskRef:
33
+
kind: Task
34
+
name: ods-build-go-v0-6-0
35
+
workspaces:
36
+
- name: source
37
+
workspace: shared-workspace
38
+
- name: backend-package-image
39
+
taskRef:
40
+
kind: Task
41
+
name: ods-package-image-v0-6-0
42
+
runAfter:
43
+
- backend-build-go
44
+
workspaces:
45
+
- name: source
46
+
workspace: shared-workspace
47
+
- name: backend-deploy
48
+
taskRef:
49
+
kind: Task
50
+
name: ods-deploy-helm-v0-6-0
51
+
runAfter:
52
+
- backend-package-image
53
+
workspaces:
54
+
- name: source
55
+
workspace: shared-workspace
56
56
----
57
57
58
58
The only Go specific task is `ods-build-go-v0-6-0`, if you use another technology, exchange the task for another one such as `ods-build-gradle-v0-5-1`.
Copy file name to clipboardExpand all lines: docs/authoring-tasks.adoc
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,17 +24,17 @@ Normally, a Tekton task is a Kubernetes resource in your OpenShift project. Howe
24
24
[source,yaml]
25
25
----
26
26
pipeline:
27
-
tasks:
28
-
- name: hello-world
29
-
taskSpec:
30
-
steps:
31
-
- name: say-hello
32
-
image: busybox
33
-
script: |
34
-
echo hello world
35
-
workspaces:
36
-
- name: source
37
-
workspace: shared-workspace
27
+
- tasks:
28
+
- name: hello-world
29
+
taskSpec:
30
+
steps:
31
+
- name: say-hello
32
+
image: busybox
33
+
script: |
34
+
echo hello world
35
+
workspaces:
36
+
- name: source
37
+
workspace: shared-workspace
38
38
----
39
39
40
40
== Creating your own task
@@ -66,11 +66,11 @@ Your `ods.yaml` file would reference this task like this:
66
66
[source,yaml]
67
67
----
68
68
pipeline:
69
-
tasks:
70
-
- name: hello-world
71
-
taskRef:
72
-
kind: Task
73
-
name: hello-world
69
+
- tasks:
70
+
- name: hello-world
71
+
taskRef:
72
+
kind: Task
73
+
name: hello-world
74
74
----
75
75
76
76
Of course this doesn't do anything useful in the CI pipeline. Typically, you'd need to mount a workspace (containing the Git repository you are working in) and maybe offer some parameters to the user of this task. Have a look at the official ODS tasks for more sophisticated examples of existing tasks. Later on in this document we'll look at some example tasks you could create.
Copy file name to clipboardExpand all lines: docs/convert-quickstarter-component.adoc
+26-26Lines changed: 26 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,32 +97,32 @@ environments:
97
97
stage: dev
98
98
99
99
pipeline:
100
-
tasks:
101
-
- name: backend-build-go
102
-
taskRef:
103
-
kind: Task
104
-
name: ods-build-go-v0-6-0
105
-
workspaces:
106
-
- name: source
107
-
workspace: shared-workspace
108
-
- name: backend-package-image
109
-
taskRef:
110
-
kind: Task
111
-
name: ods-package-image-v0-6-0
112
-
runAfter:
113
-
- backend-build-go
114
-
workspaces:
115
-
- name: source
116
-
workspace: shared-workspace
117
-
- name: backend-deploy
118
-
taskRef:
119
-
kind: Task
120
-
name: ods-deploy-helm-v0-6-0
121
-
runAfter:
122
-
- backend-package-image
123
-
workspaces:
124
-
- name: source
125
-
workspace: shared-workspace
100
+
- tasks:
101
+
- name: backend-build-go
102
+
taskRef:
103
+
kind: Task
104
+
name: ods-build-go-v0-6-0
105
+
workspaces:
106
+
- name: source
107
+
workspace: shared-workspace
108
+
- name: backend-package-image
109
+
taskRef:
110
+
kind: Task
111
+
name: ods-package-image-v0-6-0
112
+
runAfter:
113
+
- backend-build-go
114
+
workspaces:
115
+
- name: source
116
+
workspace: shared-workspace
117
+
- name: backend-deploy
118
+
taskRef:
119
+
kind: Task
120
+
name: ods-deploy-helm-v0-6-0
121
+
runAfter:
122
+
- backend-package-image
123
+
workspaces:
124
+
- name: source
125
+
workspace: shared-workspace
126
126
----
127
127
128
128
What has been done in Jenkins in `stageCheckFormat`, `stageLint`, `stageUnitTest`, `stageBuild` and `odsComponentStageScanWithSonar` is now done by the `ods-build-go-v0-6-0` task. If you have modified how the application is tested and built, or added further steps, you will need to create your own Tekton tasks reflecting those changes. See the link:authoring-tasks.adoc[authoring tasks] guide.
Copy file name to clipboardExpand all lines: docs/design/software-design-specification.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -426,7 +426,7 @@ Upgrades (or installs) a Helm chart.
426
426
427
427
| SDS-PIPELINE-MANAGER-4
428
428
| `pipeline-manager` binary
429
-
a| The pipeline manager parses the JSON payload and handles `repo:refs_changed` and `pr:opened` events. Other events are dropped.
429
+
a| The pipeline manager parses the JSON payload and triggers a pipeline run dependent on the events received.
430
430
431
431
For Git commits of which the commit message instructs skipping CI, no pipelines are triggered. Instructions may be anywhere in the commit message and may be one of (case-insensitive):
Copy file name to clipboardExpand all lines: docs/example-project.adoc
+60-60Lines changed: 60 additions & 60 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,32 +29,32 @@ environments:
29
29
stage: dev
30
30
31
31
pipeline:
32
-
tasks:
33
-
- name: build
34
-
taskRef:
35
-
kind: Task
36
-
name: ods-build-go-v0-6-0
37
-
workspaces:
38
-
- name: source
39
-
workspace: shared-workspace
40
-
- name: package
41
-
taskRef:
42
-
kind: Task
43
-
name: ods-package-image-v0-6-0
44
-
runAfter:
45
-
- build
46
-
workspaces:
47
-
- name: source
48
-
workspace: shared-workspace
49
-
- name: deploy
50
-
taskRef:
51
-
kind: Task
52
-
name: ods-deploy-helm-v0-6-0
53
-
runAfter:
54
-
- package
55
-
workspaces:
56
-
- name: source
57
-
workspace: shared-workspace
32
+
- tasks:
33
+
- name: build
34
+
taskRef:
35
+
kind: Task
36
+
name: ods-build-go-v0-6-0
37
+
workspaces:
38
+
- name: source
39
+
workspace: shared-workspace
40
+
- name: package
41
+
taskRef:
42
+
kind: Task
43
+
name: ods-package-image-v0-6-0
44
+
runAfter:
45
+
- build
46
+
workspaces:
47
+
- name: source
48
+
workspace: shared-workspace
49
+
- name: deploy
50
+
taskRef:
51
+
kind: Task
52
+
name: ods-deploy-helm-v0-6-0
53
+
runAfter:
54
+
- package
55
+
workspaces:
56
+
- name: source
57
+
workspace: shared-workspace
58
58
----
59
59
60
60
todo-frontend/.ods.yaml
@@ -70,32 +70,32 @@ environments:
70
70
stage: dev
71
71
72
72
pipeline:
73
-
tasks:
74
-
- name: build
75
-
taskRef:
76
-
kind: Task
77
-
name: ods-build-npm-v0-6-0
78
-
workspaces:
79
-
- name: source
80
-
workspace: shared-workspace
81
-
- name: package
82
-
taskRef:
83
-
kind: Task
84
-
name: ods-package-image-v0-6-0
85
-
runAfter:
86
-
- build
87
-
workspaces:
88
-
- name: source
89
-
workspace: shared-workspace
90
-
- name: deploy
91
-
taskRef:
92
-
kind: Task
93
-
name: ods-deploy-helm-v0-6-0
94
-
runAfter:
95
-
- package
96
-
workspaces:
97
-
- name: source
98
-
workspace: shared-workspace
73
+
- tasks:
74
+
- name: build
75
+
taskRef:
76
+
kind: Task
77
+
name: ods-build-npm-v0-6-0
78
+
workspaces:
79
+
- name: source
80
+
workspace: shared-workspace
81
+
- name: package
82
+
taskRef:
83
+
kind: Task
84
+
name: ods-package-image-v0-6-0
85
+
runAfter:
86
+
- build
87
+
workspaces:
88
+
- name: source
89
+
workspace: shared-workspace
90
+
- name: deploy
91
+
taskRef:
92
+
kind: Task
93
+
name: ods-deploy-helm-v0-6-0
94
+
runAfter:
95
+
- package
96
+
workspaces:
97
+
- name: source
98
+
workspace: shared-workspace
99
99
----
100
100
101
101
Both pipelines are almost identical, only the build task differs. Both repositories have a webhook configured, pointing to the event listener in the `todo-cd` namespace.
@@ -130,14 +130,14 @@ environments:
130
130
stage: qa
131
131
132
132
pipeline:
133
-
tasks:
134
-
- name: deploy
135
-
taskRef:
136
-
kind: ClusterTask
137
-
name: ods-deploy-helm-v0-6-0
138
-
workspaces:
139
-
- name: source
140
-
workspace: shared-workspace
133
+
- tasks:
134
+
- name: deploy
135
+
taskRef:
136
+
kind: ClusterTask
137
+
name: ods-deploy-helm-v0-6-0
138
+
workspaces:
139
+
- name: source
140
+
workspace: shared-workspace
141
141
----
142
142
143
143
When a commit is pushed into the `release/1.0.0` branch, a deploy is triggerd into the `todo-qa` project. The deployment uses the chart defined in the `chart` directory of the `todo-app` repository. That chart does not contain any resource templates itself, as all Kubernetes resources are defined in the charts in the components `todo-backend` and `todo-frontend`. However, the umbrella chart has to supply values which are specific to the "qa" environment. This can be done via a `values.qa.yaml` file. Values in that file can set values for dependencies (like the `backend` component) by nesting the values under the respective key, as shown in the following example. Assume we have the following `values.yaml` file in the `todo-backend` application:
0 commit comments