Skip to content

Commit

Permalink
rpm-ostree 0.2: drop BASE_IMAGES_DIGESTS
Browse files Browse the repository at this point in the history
STONEBLD-2326

The result never provided any value. Drop it.

Signed-off-by: Adam Cmiel <[email protected]>
  • Loading branch information
chmeliik authored and zregvart committed Jul 30, 2024
1 parent 52c257d commit db5c10d
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
43 changes: 43 additions & 0 deletions task/rpm-ostree/0.2/MIGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Migration from 0.1 to 0.2

Version 0.2:

* Removes the `BASE_IMAGES_DIGESTS` result. Please remove all the references to this
result from your pipeline.
* Note that the result never provided any value. It did not contain base image
digests, it contained a local-only reference for the **output** image
(`localhost/rhtap-final-image@sha256:...`). The task returns a usable reference
for the output image as well (`IMAGE_URL` + `IMAGE_DIGEST`).

## Konflux-specific

In a typical Konflux pipeline, the two tasks that used to depend on the `BASE_IMAGES_DIGESTS`
result are `build-source-image` and `deprecated-base-image-check`.

1. Make sure your version of `deprecated-base-image-check` is at least `0.4`.
2. Remove the parameters that reference the `BASE_IMAGES_DIGESTS` result:

```diff
@@ -255,10 +255,8 @@ spec:
- name: build-source-image
params:
- name: BINARY_IMAGE
value: $(params.output-image)
- - name: BASE_IMAGES
- value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
runAfter:
- build-container
taskRef:
params:
@@ -282,10 +280,8 @@ spec:
- name: workspace
workspace: workspace
- name: deprecated-base-image-check
params:
- - name: BASE_IMAGES_DIGESTS
- value: $(tasks.build-container.results.BASE_IMAGES_DIGESTS)
- name: IMAGE_URL
value: $(tasks.build-container.results.IMAGE_URL)
- name: IMAGE_DIGEST
value: $(tasks.build-container.results.IMAGE_DIGEST)
```
5 changes: 0 additions & 5 deletions task/rpm-ostree/0.2/rpm-ostree.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ spec:
name: IMAGE_URL
- description: Image reference of the built image
name: IMAGE_REF
- description: Digests of the base images used for build
name: BASE_IMAGES_DIGESTS
- name: SBOM_BLOB_URL
description: Reference, including digest to the SBOM blob
stepTemplate:
Expand Down Expand Up @@ -234,9 +232,6 @@ spec:
computeResources: {}
script: |
#!/bin/bash
# Expose base image digests
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' | grep -v $IMAGE > $(results.BASE_IMAGES_DIGESTS.path)
base_image_name=$(buildah inspect --format '{{ index .ImageAnnotations "org.opencontainers.image.base.name"}}' $IMAGE | cut -f1 -d'@')
base_image_digest=$(buildah inspect --format '{{ index .ImageAnnotations "org.opencontainers.image.base.digest"}}' $IMAGE)
container=$(buildah from --pull-never $IMAGE)
Expand Down

0 comments on commit db5c10d

Please sign in to comment.