Skip to content

Commit

Permalink
Merge pull request #172 from johnbieren/revert
Browse files Browse the repository at this point in the history
revert(KFLUXBUGS-1278): iib changes invalid
  • Loading branch information
johnbieren authored Aug 28, 2024
2 parents ae28f00 + e772cba commit b6a1ee0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Task
metadata:
name: t-add-fbc-fragment-to-index-image
labels:
app.kubernetes.io/version: "0.2.1"
app.kubernetes.io/version: "0.2.0"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: release
Expand Down Expand Up @@ -62,10 +62,6 @@ spec:
description: Set the genericResult if FBC Fragment is Opt-In and should be published
- name: indexImageDigests
description: The digests for each arch for the manifest list of the index image
- name: iibLog
description: The log from the IIB request
- name: exitCode
description: The exit code from the task
steps:
- name: s-add-fbc-fragment-to-index-image
image: >-
Expand Down Expand Up @@ -229,11 +225,6 @@ spec:
state=\$(jq -r ".state" <<< \${build_info})
# remove the history as it breaks the results build up
jq -r 'del(.state_history)' <<< \${build_info} | jq -c . > $(results.jsonBuildInfo.path)
url=\$(jq -r ".logs.url" <<< \${build_info})
echo IIB log url is: "\${url}" > \$(results.iibLog.path)
echo Printing last 1,000 characters from the log >> \$(results.iibLog.path)
# Tekton results max out at 4096 chars so we only take last 1000 from the log
/usr/bin/curl -s "\${url}" | tail -c 1000 >> \$(results.iibLog.path)
case \${state} in
"complete") break ;;
"failed") break ;;
Expand All @@ -255,7 +246,6 @@ spec:
# it should continue only if the IIB build status is complete
if [ ${BUILDEXIT} -eq 0 ]; then
echo -n 0 > "$(results.exitCode.path)"
# get the manifest digests
indexImageCopy=`cat $(results.jsonBuildInfo.path) | jq -cr .internal_index_image_copy`
Expand All @@ -270,16 +260,17 @@ spec:
echo -n $indexImageDigests > $(results.indexImageDigests.path)
if [ -z "${indexImageDigests}" ] ; then
echo "Index image produced is not multi-arch with a manifest list"
echo -n 1 > "$(results.exitCode.path)"
exit 1
fi
else
if [ ${BUILDEXIT} -eq 124 ]; then
echo "Timeout while waiting for the build to finish"
echo "Build timeout" < $(results.buildState.path)
exit $BUILDEXIT
else
exit $BUILDEXIT
fi
echo -n "$BUILDEXIT" > "$(results.exitCode.path)"
fi
exit 0
volumes:
- name: service-account-secret
secret:
Expand Down
6 changes: 1 addition & 5 deletions internal-services/catalog/iib-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ kind: Pipeline
metadata:
name: iib
labels:
app.kubernetes.io/version: "0.3"
app.kubernetes.io/version: "0.2"
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
tekton.dev/tags: fbc
Expand Down Expand Up @@ -92,7 +92,3 @@ spec:
value: $(tasks.t-add-fbc-fragment-to-index-image.results.genericResult)
- name: indexImageDigests
value: $(tasks.t-add-fbc-fragment-to-index-image.results.indexImageDigests)
- name: iibLog
value: $(tasks.t-add-fbc-fragment-to-index-image.results.iibLog)
- name: exitCode
value: $(tasks.t-add-fbc-fragment-to-index-image.results.exitCode)

0 comments on commit b6a1ee0

Please sign in to comment.