Skip to content

Commit 0478915

Browse files
committed
testing new changes
1 parent 4501a88 commit 0478915

5 files changed

+94
-23
lines changed

.tekton/jetstack-cert-manager-1-15-pull-request.yaml

+42-11
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,10 @@ spec:
3535
value: .
3636
- name: build-platforms
3737
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
4742
- name: prefetch-input
4843
value: '{"type": "gomod", "path": "cert-manager"}'
4944
pipelineSpec:
@@ -189,6 +184,38 @@ spec:
189184
workspaces:
190185
- name: basic-auth
191186
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
192219
- name: prefetch-dependencies
193220
params:
194221
- name: input
@@ -200,7 +227,7 @@ spec:
200227
- name: ociArtifactExpiresAfter
201228
value: $(params.image-expires-after)
202229
runAfter:
203-
- clone-repository
230+
- fetch-repository-details
204231
taskRef:
205232
params:
206233
- name: name
@@ -238,7 +265,11 @@ spec:
238265
value: $(tasks.clone-repository.results.commit)
239266
- name: BUILD_ARGS
240267
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)"
242273
- name: BUILD_ARGS_FILE
243274
value: $(params.build-args-file)
244275
- name: SOURCE_ARTIFACT

.tekton/jetstack-cert-manager-1-15-push.yaml

+42-11
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,10 @@ spec:
3232
value: .
3333
- name: build-platforms
3434
value:
35-
- linux/x86_64
36-
- linux/s390x
37-
- linux/ppc64le
38-
- linux/arm64
39-
- name: build-args
40-
value:
41-
- "RELEASE_VERSION=v1.15.2"
42-
- "COMMIT_SHA={{revision}}"
43-
- "SOURCE_URL={{source_url}}"
35+
- linux/x86_64
36+
- linux/s390x
37+
- linux/ppc64le
38+
- linux/arm64
4439
- name: prefetch-input
4540
value: '{"type": "gomod", "path": "cert-manager"}'
4641
pipelineSpec:
@@ -186,6 +181,38 @@ spec:
186181
workspaces:
187182
- name: basic-auth
188183
workspace: git-auth
184+
- name: fetch-repository-details
185+
runAfter:
186+
- clone-repository
187+
taskSpec:
188+
results:
189+
- name: release_version
190+
description: "release version of the component"
191+
- name: commit_sha
192+
description: "latest commit hash of the component repository"
193+
- name: source_url
194+
description: "source url of the component repository"
195+
- name: parent_commit_sha
196+
description: "latest commit hash of the parent repository hosting the component"
197+
- name: parent_source_url
198+
description: "source url of the parent repository hosting the component"
199+
steps:
200+
- name: store-repo-details
201+
image: quay.io/konflux-ci/appstudio-utils@sha256:28d4a7609b7e1b11a6c273dad4aabc24f90f2e79ff4b0b2852822da1ab53204a
202+
script: |
203+
#!/usr/bin/env bash
204+
set -e
205+
206+
cd cert-manager
207+
git remote get-url origin | tr -d '\n' | tee "$(results.source_url.path)"
208+
git rev-parse HEAD | tr -d '\n' | tee "$(results.commit_sha.path)"
209+
cd -
210+
git remote get-url origin | tr -d '\n' | tee "$(results.parent_source_url.path)"
211+
git rev-parse HEAD | tr -d '\n' | tee "$(results.parent_commit_sha.path)"
212+
cat cert-manager-release-version | tr -d '\n' | tee "$(results.release_version.path)"
213+
workspaces:
214+
- name: basic-auth
215+
workspace: git-auth
189216
- name: prefetch-dependencies
190217
params:
191218
- name: input
@@ -197,7 +224,7 @@ spec:
197224
- name: ociArtifactExpiresAfter
198225
value: $(params.image-expires-after)
199226
runAfter:
200-
- clone-repository
227+
- fetch-repository-details
201228
taskRef:
202229
params:
203230
- name: name
@@ -235,7 +262,11 @@ spec:
235262
value: $(tasks.clone-repository.results.commit)
236263
- name: BUILD_ARGS
237264
value:
238-
- $(params.build-args[*])
265+
- "RELEASE_VERSION=$(tasks.fetch-repository-details.results.release_version)"
266+
- "COMMIT_SHA=$(tasks.fetch-repository-details.results.commit_sha)"
267+
- "SOURCE_URL=$(tasks.fetch-repository-details.results.source_url)"
268+
- "PARENT_COMMIT_SHA=$(tasks.fetch-repository-details.results.parent_commit_sha)"
269+
- "PARENT_SOURCE_URL=$(tasks.fetch-repository-details.results.parent_source_url)"
239270
- name: BUILD_ARGS_FILE
240271
value: $(params.build-args-file)
241272
- name: SOURCE_ARTIFACT

Containerfile.cert-manager

+8-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ FROM registry.redhat.io/rhel9-4-els/rhel:9.4
1919
# Values for below ARGs will passed from tekton configs for konflux builds.
2020
## Release version of the cert-manager source code used in the build.
2121
ARG RELEASE_VERSION
22-
## Commit hash that considered for the image build.
22+
## Commit hash of the cert-manager repository that is considered for the image build.
2323
ARG COMMIT_SHA
2424
## github URL of the cert-manager source repository.
2525
ARG SOURCE_URL
26+
## Commit hash of the cert-manager-release repository that is considered for the image build.
27+
ARG PARENT_COMMIT_SHA
28+
## github URL of the cert-manager-release source repository.
29+
ARG PARENT_SOURCE_URL
2630
ARG SOURCE_DIR="/go/src/github.com/openshift/jetstack-cert-manager"
2731

2832
COPY --from=builder $SOURCE_DIR/_output/acmesolver /app/cmd/acmesolver/acmesolver
@@ -42,7 +46,10 @@ LABEL com.redhat.component="jetstack-cert-manager-container" \
4246
io.openshift.expose-services="" \
4347
io.openshift.tags="data,images,cert-manager" \
4448
io.openshift.build.commit.id="${COMMIT_SHA}" \
49+
io.openshift.build.parent.commit.id="${PARENT_COMMIT_SHA}" \
4550
io.openshift.build.source-location="${SOURCE_URL}" \
51+
io.openshift.build.parent.source-location="${PARENT_SOURCE_URL}" \
4652
io.openshift.build.commit.url="${SOURCE_URL}/commit/${COMMIT_SHA}" \
53+
io.openshift.build.parent.commit.url="${PARENT_SOURCE_URL}/commit/${PARENT_COMMIT_SHA}" \
4754
io.k8s.display-name="cert-manager-controller" \
4855
io.k8s.description="jetstack-cert-manager-container"

cert-manager-operator-release-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.15.0

cert-manager-release-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v1.15.2

0 commit comments

Comments
 (0)