-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd-build: Conditionally change the packing structure of container-image #3532
Conversation
When the previous build exists, use its packing structure otherwise container-encapsulate generates a new one
@@ -462,18 +469,35 @@ else | |||
"--label=io.openshift.build.versions=machine-os=${buildid}" | |||
) | |||
fi | |||
|
|||
last_build_manifest=() | |||
if rpm-ostree compose container-encapsulate --help |grep -q -e "--previous-build-manifest"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think actually nowadays we can rely on having a new enough rpm-ostree here, so we could probably now drop this check.
last_build_manifest=() | ||
if rpm-ostree compose container-encapsulate --help |grep -q -e "--previous-build-manifest"; then | ||
# Use the last stable release if buildfetch used | ||
if [ -n "${PARENT_BUILD}" ] && [ -f "${parent_builddir}/${name}-${PARENT_BUILD}-ostree.${basearch}-manifest.json" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's host this [ -f
test up to deduplicate? It could then actually replace the check above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that [ -f
checks two different conditions. The first one for dir parent_builddir
and the second for previous_builddir
I am stuck on a login loop on fedoraidp, which makes me unable to check if this successfully builds on the jenkins pipelines using the debug pod mentioned here: #3508 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this version is likely to work, I'm OK landing as is.
Fixes: #3528
When the previous build exists, use its packing structure otherwise container-encapsulate generates a new one