Skip to content

Commit f1abcdd

Browse files
committed
enable hermetic builds and update containerfile labels
Signed-off-by: Anand Kumar Singh <[email protected]>
1 parent dcae3c6 commit f1abcdd

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.tekton/gitops-operator-pull-request.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ spec:
2828
value: 5d
2929
- name: dockerfile
3030
value: Containerfile.plugin
31+
- name: hermetic
32+
value: true
33+
- name: prefetch-input
34+
value: '{"type": "gomod", "path": "."}'
3135
pipelineSpec:
3236
finally:
3337
- name: show-sbom
@@ -228,6 +232,8 @@ spec:
228232
- $(params.build-args[*])
229233
- name: BUILD_ARGS_FILE
230234
value: $(params.build-args-file)
235+
- name: TARGET_VERSION
236+
value: '{{target_branch}}'
231237
runAfter:
232238
- prefetch-dependencies
233239
taskRef:

.tekton/gitops-operator-push.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ spec:
2525
value: quay.io/redhat-user-workloads/rh-openshift-gitops-tenant/openshift-gitops-operator/gitops-operator:{{revision}}
2626
- name: dockerfile
2727
value: Containerfile.plugin
28+
- name: hermetic
29+
value: true
30+
- name: prefetch-input
31+
value: '{"type": "gomod", "path": "."}'
2832
pipelineSpec:
2933
finally:
3034
- name: show-sbom
@@ -220,6 +224,8 @@ spec:
220224
value: $(params.image-expires-after)
221225
- name: COMMIT_SHA
222226
value: $(tasks.clone-repository.results.commit)
227+
- name: TARGET_VERSION
228+
value: '{{target_branch}}'
223229
- name: BUILD_ARGS
224230
value:
225231
- $(params.build-args[*])

Containerfile.plugin

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ ENTRYPOINT [ "/usr/local/bin/manager" ]
5050

5151
LABEL \
5252
name="openshift-gitops-1/gitops-rhel8-operator" \
53-
version=${CI_CONTAINER_VERSION} \
53+
version=${TARGET_VERSION} \
5454
License="Apache 2.0" \
5555
com.redhat.component="openshift-gitops-operator-container" \
5656
com.redhat.delivery.appregistry="false" \
5757
release=${CI_CONTAINER_RELEASE} \
5858
upstream-version=${CI_UPSTREAM_VERSION} \
59-
upstream-vcs-ref="${CI_GITOPS_OPERATOR_UPSTREAM_COMMIT}" \
59+
upstream-vcs-ref="${COMMIT_SHA}" \
6060
upstream-vcs-type="git" \
6161
summary="Openshift GitOps Operator Dockerfile Template" \
6262
maintainer="William Tam <[email protected]>" \

0 commit comments

Comments
 (0)