@@ -35,15 +35,10 @@ spec:
35
35
value : .
36
36
- name : build-platforms
37
37
value :
38
- - linux/x86_64
39
- - linux/s390x
40
- - linux/ppc64le
41
- - linux/arm64
42
- - name : build-args
43
- value :
44
- - " RELEASE_VERSION=v1.15.2"
45
- - " COMMIT_SHA={{revision}}"
46
- - " SOURCE_URL={{source_url}}"
38
+ - linux/x86_64
39
+ - linux/s390x
40
+ - linux/ppc64le
41
+ - linux/arm64
47
42
- name : prefetch-input
48
43
value : ' {"type": "gomod", "path": "cert-manager"}'
49
44
pipelineSpec :
@@ -189,6 +184,38 @@ spec:
189
184
workspaces :
190
185
- name : basic-auth
191
186
workspace : git-auth
187
+ - name : fetch-repository-details
188
+ runAfter :
189
+ - clone-repository
190
+ taskSpec :
191
+ results :
192
+ - name : release_version
193
+ description : " release version of the component"
194
+ - name : commit_sha
195
+ description : " latest commit hash of the component repository"
196
+ - name : source_url
197
+ description : " source url of the component repository"
198
+ - name : parent_commit_sha
199
+ description : " latest commit hash of the parent repository hosting the component"
200
+ - name : parent_source_url
201
+ description : " source url of the parent repository hosting the component"
202
+ steps :
203
+ - name : store-repo-details
204
+ image : quay.io/konflux-ci/appstudio-utils@sha256:28d4a7609b7e1b11a6c273dad4aabc24f90f2e79ff4b0b2852822da1ab53204a
205
+ script : |
206
+ #!/usr/bin/env bash
207
+ set -e
208
+
209
+ cd cert-manager
210
+ git remote get-url origin | tr -d '\n' | tee "$(results.source_url.path)"
211
+ git rev-parse HEAD | tr -d '\n' | tee "$(results.commit_sha.path)"
212
+ cd -
213
+ git remote get-url origin | tr -d '\n' | tee "$(results.parent_source_url.path)"
214
+ git rev-parse HEAD | tr -d '\n' | tee "$(results.parent_commit_sha.path)"
215
+ cat cert-manager-release-version | tr -d '\n' | tee "$(results.release_version.path)"
216
+ workspaces :
217
+ - name : basic-auth
218
+ workspace : git-auth
192
219
- name : prefetch-dependencies
193
220
params :
194
221
- name : input
@@ -200,7 +227,7 @@ spec:
200
227
- name : ociArtifactExpiresAfter
201
228
value : $(params.image-expires-after)
202
229
runAfter :
203
- - clone -repository
230
+ - fetch -repository-details
204
231
taskRef :
205
232
params :
206
233
- name : name
@@ -238,7 +265,11 @@ spec:
238
265
value : $(tasks.clone-repository.results.commit)
239
266
- name : BUILD_ARGS
240
267
value :
241
- - $(params.build-args[*])
268
+ - " RELEASE_VERSION=$(tasks.fetch-repository-details.results.release_version)"
269
+ - " COMMIT_SHA=$(tasks.fetch-repository-details.results.commit_sha)"
270
+ - " SOURCE_URL=$(tasks.fetch-repository-details.results.source_url)"
271
+ - " PARENT_COMMIT_SHA=$(tasks.fetch-repository-details.results.parent_commit_sha)"
272
+ - " PARENT_SOURCE_URL=$(tasks.fetch-repository-details.results.parent_source_url)"
242
273
- name : BUILD_ARGS_FILE
243
274
value : $(params.build-args-file)
244
275
- name : SOURCE_ARTIFACT
0 commit comments