Skip to content

Commit

Permalink
Sync build-definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
RHTAP bot committed Feb 6, 2024
1 parent 61e9797 commit a06224e
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 19 deletions.
4 changes: 2 additions & 2 deletions pac/tasks/buildah-10gb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ spec:
volumeMounts:
- mountPath: /var/lib/containers
name: varlibcontainers
- image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
- image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
name: merge-syft-sboms
script: |
#!/bin/python3
Expand Down Expand Up @@ -292,7 +292,7 @@ spec:
securityContext:
runAsUser: 0
workingDir: $(workspaces.source.path)
- image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
- image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
name: create-purl-sbom
script: |
#!/bin/python3
Expand Down
4 changes: 2 additions & 2 deletions pac/tasks/buildah-6gb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ spec:
volumeMounts:
- mountPath: /var/lib/containers
name: varlibcontainers
- image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
- image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
name: merge-syft-sboms
script: |
#!/bin/python3
Expand Down Expand Up @@ -292,7 +292,7 @@ spec:
securityContext:
runAsUser: 0
workingDir: $(workspaces.source.path)
- image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
- image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
name: create-purl-sbom
script: |
#!/bin/python3
Expand Down
4 changes: 2 additions & 2 deletions pac/tasks/buildah-8gb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ spec:
volumeMounts:
- mountPath: /var/lib/containers
name: varlibcontainers
- image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
- image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
name: merge-syft-sboms
script: |
#!/bin/python3
Expand Down Expand Up @@ -292,7 +292,7 @@ spec:
securityContext:
runAsUser: 0
workingDir: $(workspaces.source.path)
- image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
- image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
name: create-purl-sbom
script: |
#!/bin/python3
Expand Down
4 changes: 2 additions & 2 deletions pac/tasks/buildah-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ spec:
- mountPath: /var/lib/containers
name: varlibcontainers
- computeResources: {}
image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
name: merge-syft-sboms
script: |
#!/bin/python3
Expand Down Expand Up @@ -374,7 +374,7 @@ spec:
runAsUser: 0
workingDir: $(workspaces.source.path)
- computeResources: {}
image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
name: create-purl-sbom
script: |
#!/bin/python3
Expand Down
4 changes: 2 additions & 2 deletions pac/tasks/buildah-rhtap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
value: $(params.TLSVERIFY)
steps:
- name: build
image: registry.access.redhat.com/ubi9/buildah@sha256:04fde77ea72c25b56efb3f71db809c5d7b09938130df2da9175a3c888b94043d
image: registry.access.redhat.com/ubi9/buildah@sha256:d28590e6ff9933a50be664e95a99ed9c85e0d50101ddc7f8f7cfc9ceea57fe30
script: |
# Check if the Dockerfile exists
SOURCE_CODE_DIR=source
Expand Down Expand Up @@ -106,7 +106,7 @@ spec:
name: tmpfiles

- name: merge-sboms
image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
script: |
#!/bin/python3
import json
Expand Down
4 changes: 2 additions & 2 deletions pac/tasks/buildah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ spec:
runAsUser: 0

- name: merge-syft-sboms
image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
# per https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting
# the cluster will set imagePullPolicy to IfNotPresent
# also per direction from Ralph Bean, we want to use image digest based tags to use a cue to automation like dependabot or renovatebot to periodially submit pull requests that update the digest as new images are released.
Expand Down Expand Up @@ -310,7 +310,7 @@ spec:
runAsUser: 0

- name: create-purl-sbom
image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
# per https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting
# the cluster will set imagePullPolicy to IfNotPresent
# also per direction from Ralph Bean, we want to use image digest based tags to use a cue to automation like dependabot or renovatebot to periodially submit pull requests that update the digest as new images are released.
Expand Down
29 changes: 27 additions & 2 deletions pac/tasks/inspect-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,44 @@ spec:
echo "Image ${IMAGE_URL} metadata:"
cat "$IMAGE_INSPECT"
for run in $(seq 1 $max_run); do
run=1
while [ "$run" -le "$max_run" ]; do
status=0
[ "$run" -gt 1 ] && sleep $sleep_sec # skip last sleep
echo "Inspecting raw image manifest ${IMAGE_URL} (try $run/$max_run)."
skopeo inspect --no-tags --raw docker://"${IMAGE_URL}" > $RAW_IMAGE_INSPECT && break || status=$?
skopeo inspect --no-tags --raw docker://"${IMAGE_URL}" > $RAW_IMAGE_INSPECT || status=$?
if [ "$status" -eq 0 ] && [ "$(jq 'has("manifests")' ${RAW_IMAGE_INSPECT})" = "true" ]; then
echo "Found an index image, lookup for amd64 manifest"
INDEX_IMAGE_MANIFESTS=$(jq ' .manifests | map ( {(.platform.architecture|tostring|ascii_downcase): .digest} ) | add' "${RAW_IMAGE_INSPECT}" || true)
AMD64_MANIFEST_DIGEST=$(jq -r '.amd64' <<< "${INDEX_IMAGE_MANIFESTS}" || true )
if [ -z "$AMD64_MANIFEST_DIGEST" ]; then
# we didn't find amd64 platform, fail horribly as it's the required platform currently for all checks
echo "[ERROR] Could not find amd64 image manifest for image $IMAGE_URL"
note="Task $(context.task.name) failed: Couldn't find amd64 image manifest"
TEST_OUTPUT=$(make_result_json -r ERROR -t "$note")
echo "${TEST_OUTPUT}" | tee $(results.TEST_OUTPUT.path)
exit 0
fi
# Replace image URL with new digest
IMAGE_URL="${IMAGE_URL/[@:]*/@$AMD64_MANIFEST_DIGEST}"
echo "Setting AMD64 specific image: $IMAGE_URL"
run=1 # reset runs, we are looking another image; new image, new life
else
break
fi
done
if [ "$status" -ne 0 ]; then
echo "Failed to get raw metadata of image ${IMAGE_URL}"
note="Task $(context.task.name) failed: Encountered errors while inspecting image. For details, check Tekton task log."
TEST_OUTPUT=$(make_result_json -r ERROR -t "$note")
echo "${TEST_OUTPUT}" | tee $(results.TEST_OUTPUT.path)
exit 0
fi
echo "Image ${IMAGE_URL} raw metadata:"
cat "$RAW_IMAGE_INSPECT" | jq # jq for readable formatting
Expand Down
2 changes: 1 addition & 1 deletion pac/tasks/rpm-ostree.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ spec:
volumeMounts:
- mountPath: /var/lib/containers
name: varlibcontainers
- image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
- image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
# per https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting
# the cluster will set imagePullPolicy to IfNotPresent
# also per direction from Ralph Bean, we want to use image digest based tags to use a cue to automation like dependabot or renovatebot to periodially submit pull requests that update the digest as new images are released.
Expand Down
2 changes: 1 addition & 1 deletion pac/tasks/s2i-java.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ spec:
name: varlibcontainers
securityContext:
runAsUser: 0
- image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
- image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
# per https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting
# the cluster will set imagePullPolicy to IfNotPresent
# also per direction from Ralph Bean, we want to use image digest based tags to use a cue to automation like dependabot or renovatebot to periodially submit pull requests that update the digest as new images are released.
Expand Down
2 changes: 1 addition & 1 deletion pac/tasks/s2i-nodejs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ spec:
volumeMounts:
- mountPath: /var/lib/containers
name: varlibcontainers
- image: registry.access.redhat.com/ubi9/python-39:1-158@sha256:967000729b17efdea309e297f4b1961c38b902a1ef18f6d886b8086c2a12f01f
- image: registry.access.redhat.com/ubi9/python-39:1-165@sha256:4da8ddb12096a31d8d50e58ea479ba2fe2f252f215fbaf5bf90923a1827463ba
# per https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting
# the cluster will set imagePullPolicy to IfNotPresent
# also per direction from Ralph Bean, we want to use image digest based tags to use a cue to automation like dependabot or renovatebot to periodially submit pull requests that update the digest as new images are released.
Expand Down
2 changes: 1 addition & 1 deletion pac/tasks/slack-webhook-notification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
optional: true
steps:
- name: send-message
image: registry.access.redhat.com/ubi9/ubi-minimal:9.3-1361.1699548032@sha256:3e313209ac617a92b50350286752311d99ea2dafc429ef0e5311889294b0bc21
image: registry.access.redhat.com/ubi9/ubi-minimal:9.3-1552@sha256:06d06f15f7b641a78f2512c8817cbecaa1bf549488e273f5ac27ff1654ed33f0
# per https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting
# the cluster will set imagePullPolicy to IfNotPresent
# also per direction from Ralph Bean, we want to use image digest based tags to use a cue to automation like dependabot or renovatebot to periodially submit pull requests that update the digest as new images are released.
Expand Down
2 changes: 1 addition & 1 deletion pac/tasks/summary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
default: Succeeded
steps:
- name: appstudio-summary
image: registry.access.redhat.com/ubi9/ubi-minimal:9.3-1361.1699548032@sha256:3e313209ac617a92b50350286752311d99ea2dafc429ef0e5311889294b0bc21
image: registry.access.redhat.com/ubi9/ubi-minimal:9.3-1552@sha256:06d06f15f7b641a78f2512c8817cbecaa1bf549488e273f5ac27ff1654ed33f0
# per https://kubernetes.io/docs/concepts/containers/images/#imagepullpolicy-defaulting
# the cluster will set imagePullPolicy to IfNotPresent
# also per direction from Ralph Bean, we want to use image digest based tags to use a cue to automation like dependabot or renovatebot to periodially submit pull requests that update the digest as new images are released.
Expand Down

0 comments on commit a06224e

Please sign in to comment.