Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
d3a7a31
Try whiteout component and app info for collector-slim retag
msugakov Nov 12, 2024
ea5a4e6
Try not mess with integration service
msugakov Nov 12, 2024
833b20d
*DO NOT MERGE*: use a clean version to simulate slim-retagging
msugakov Nov 12, 2024
c521366
Prevent collector-full messing up images
msugakov Nov 12, 2024
ffb03fa
Try mess up yet another version
msugakov Nov 12, 2024
4af8e4f
Try rename pipeline
msugakov Nov 12, 2024
a4eea42
*DO NOT MERGE* disable collector full retag
msugakov Nov 12, 2024
af79d18
Spoil yet another version
msugakov Nov 12, 2024
8f56049
Close out image/digest results
msugakov Nov 12, 2024
e7dba27
Change to the simplest copy with `skopeo`
msugakov Nov 12, 2024
ba88f86
Hide results from retag-image task
msugakov Nov 12, 2024
0293cf7
Disable scanner retag pipelines
msugakov Nov 12, 2024
aed946d
fixup! Hide results from retag-image task
msugakov Nov 12, 2024
d13a2d2
Spoil more versions?
msugakov Nov 12, 2024
bd47265
Restore more thorough copying
msugakov Nov 12, 2024
76a3775
Try to declare result yet
msugakov Nov 12, 2024
0783cef
Properly output url
msugakov Nov 12, 2024
c36d220
Restore old pipeline name and outputs
msugakov Nov 12, 2024
4a404b0
Revert "Restore old pipeline name and outputs"
msugakov Nov 12, 2024
bbb37ca
Try rename pipeline first
msugakov Nov 12, 2024
b49399f
Populate results in mysterious way
msugakov Nov 12, 2024
45af0d6
Try piss Konflux off with OUTPUT_URL
msugakov Nov 12, 2024
8dc3f5f
That should be IMAGE_URL
msugakov Nov 12, 2024
5c3894c
Now do the IMAGE_DIGEST
msugakov Nov 12, 2024
23c58eb
Get closer to what failed
msugakov Nov 12, 2024
a5117ac
Try slightly different names now
msugakov Nov 12, 2024
28f4847
Make it look a tiny bit more like 90s
msugakov Nov 12, 2024
de5fb65
Try resolve, need to make progress
msugakov Nov 12, 2024
3fcaed7
Restore app and component relation
msugakov Nov 12, 2024
b6cc44a
Restore output IMAGE_ params but not CHAINS_
msugakov Nov 15, 2024
a75e185
Restore CHAINS_ things
msugakov Nov 15, 2024
7d30f44
Settle on the final component-less approach for collector-slim
msugakov Nov 15, 2024
985d59d
Re-enable collector-full retagging
msugakov Nov 15, 2024
42ba782
Rename collector retag pipeline files
msugakov Nov 15, 2024
0730618
Reformat collector-full back
msugakov Nov 15, 2024
8ffe116
Restore and rename scanner* retagging
msugakov Nov 15, 2024
8e6c791
Rename scanner* retagging files to group them with others
msugakov Nov 15, 2024
35d666a
Remove skopeo command, make pipelinerun's result displayed
msugakov Nov 15, 2024
d9dd2cb
**DO NOT MERGE**: bump scanner version
msugakov Nov 15, 2024
cffed45
Revert "**DO NOT MERGE**: bump scanner version"
msugakov Nov 15, 2024
a705f05
Restore the original COLLECTOR_VERSION
msugakov Nov 15, 2024
e8e7508
Fix redirects from GitHub
msugakov Nov 15, 2024
fe73f67
Declare more RESULTING_ things on the retag pipeline
msugakov Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ metadata:
(event == "pull_request" && (source_branch.matches("(konflux|renovate|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: collector-full-retagged
pipelines.appstudio.openshift.io/type: build
name: collector-full-retagged-on-push
name: retag-collector-full
namespace: rh-acs-tenant

spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ metadata:
(event == "pull_request" && (source_branch.matches("(konflux|renovate|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: collector-slim-retagged
pipelines.appstudio.openshift.io/type: build
name: collector-slim-retagged-on-push
name: retag-collector-slim
namespace: rh-acs-tenant

spec:
Expand Down
17 changes: 10 additions & 7 deletions .tekton/retag-image-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ spec:
description: Tag of the output image.
type: string
results:
- name: IMAGE_DIGEST
# Names *IMAGE_DIGEST, *IMAGE_URL must not be declared here. Otherwise, Tekton Chains will overwrite the original
# pipeline information linked to the image with info of the pipeline which executes this task and that pipeline
# doesn't pass EC checks. See https://tekton.dev/docs/chains/slsa-provenance/#image_url--image_digest
# We could skip providing any results here at all, but it's nice to find them in UI for the task.
- name: RESULTING_DIGEST
description: Digest of the output image (will be the same as of the input one).
- name: IMAGE_URL
- name: RESULTING_URL
description: Image repository and tag of the output image.
- name: IMAGE_REF
- name: RESULTING_REF
description: Image reference of the output image containing both the repository, the tag and the digest.
steps:
- name: retag-image
Expand Down Expand Up @@ -109,7 +113,6 @@ spec:

echo ">>> Done"

echo -n "${OUTPUT_DIGEST}" | tee "$(results.IMAGE_DIGEST.path)"; echo
echo -n "${OUTPUT_URL}" | tee "$(results.IMAGE_URL.path)"; echo
# build-image-index task provides both tag and the digest in the IMAGE_REF. We follow its example.
echo -n "${OUTPUT_URL}@${OUTPUT_DIGEST}" | tee "$(results.IMAGE_REF.path)"; echo
echo -n "${OUTPUT_DIGEST}" | tee "$(results.RESULTING_DIGEST.path)"; echo
echo -n "${OUTPUT_URL}" | tee "$(results.RESULTING_URL.path)"; echo
echo -n "${OUTPUT_URL}@${OUTPUT_DIGEST}" | tee "$(results.RESULTING_REF.path)"; echo
46 changes: 12 additions & 34 deletions .tekton/retag-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,6 @@ spec:
value: task
resolver: bundles

- name: show-sbom
params:
- name: IMAGE_URL
value: $(tasks.retag-image.results.IMAGE_URL)
taskRef:
params:
- name: name
value: show-sbom
- name: bundle
value: quay.io/konflux-ci/tekton-catalog/task-show-sbom:0.1@sha256:52f8b96b96ce4203d4b74d850a85f963125bf8eef0683ea5acdd80818d335a28
- name: kind
value: task
resolver: bundles

params:
- description: Source Repository URL.
name: git-url
Expand Down Expand Up @@ -76,27 +62,19 @@ spec:
type: string

results:
- description: ""
name: IMAGE_URL
value: $(tasks.retag-image.results.IMAGE_URL)
- description: ""
name: IMAGE_DIGEST
value: $(tasks.retag-image.results.IMAGE_DIGEST)
# *IMAGE_URL and *IMAGE_DIGEST must not be declared here because Tekton Chains will overwrite the original pipeline
# information linked to the image with this pipeline's info, and it will most certainly fail EC checks.

# CHAINS-GIT_* values will be entered in a Snapshot and into the image attestation data (cosign artifact).
# The values passed here will overwrite the values provided at the time when the input containers were built.
# E.g. the original git url 'git+https://github.com/stackrox/scanner.git' will be changed to
# 'git+https://github.com/stackrox/stackrox.git'.
# It is unclear from searches and inquiries, however, how these values are used and whether the overwriting would have
# any negative effects. E.g. see https://redhat-internal.slack.com/archives/C04PZ7H0VA8/p1729697134648409
# Since figuring the original values is somewhat more laborious, the suggestion is to keep doing what we do until that
# causes problems.
- description: ""
name: CHAINS-GIT_URL
value: $(tasks.clone-repository.results.url)
- description: ""
name: CHAINS-GIT_COMMIT
value: $(tasks.clone-repository.results.commit)
# These result parameters are to make retagged image's info conveniently displayed in Konflux UI.
- name: RESULTING_DIGEST
description: Digest of the output image (will be the same as of the input one).
value: $(tasks.retag-image.results.RESULTING_DIGEST)
- name: RESULTING_URL
description: Image repository and tag of the output image.
value: $(tasks.retag-image.results.RESULTING_URL)
- name: RESULTING_REF
description: Image reference of the output image containing both the repository, the tag and the digest.
value: $(tasks.retag-image.results.RESULTING_REF)

workspaces:
- name: git-auth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ metadata:
(event == "pull_request" && (source_branch.matches("(konflux|renovate|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner-db-slim-retagged
pipelines.appstudio.openshift.io/type: build
name: scanner-db-slim-retagged-on-push
name: retag-scanner-db-slim
namespace: rh-acs-tenant

spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ metadata:
(event == "pull_request" && (source_branch.matches("(konflux|renovate|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner-db-retagged
pipelines.appstudio.openshift.io/type: build
name: scanner-db-retagged-on-push
name: retag-scanner-db
namespace: rh-acs-tenant

spec:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ metadata:
(event == "pull_request" && (source_branch.matches("(konflux|renovate|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner-slim-retagged
pipelines.appstudio.openshift.io/type: build
name: scanner-slim-retagged-on-push
name: retag-scanner-slim
namespace: rh-acs-tenant

spec:
Expand Down
4 changes: 1 addition & 3 deletions .tekton/scanner-retag.yaml → .tekton/retag-scanner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ metadata:
(event == "pull_request" && (source_branch.matches("(konflux|renovate|appstudio|rhtap)") || body.pull_request.labels.exists(l, l.name == "konflux-build")))
labels:
appstudio.openshift.io/application: acs
appstudio.openshift.io/component: scanner-retagged
pipelines.appstudio.openshift.io/type: build
name: scanner-retagged-on-push
name: retag-scanner
namespace: rh-acs-tenant

spec:
Expand Down