Skip to content
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

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

RishabhSaini
Copy link
Contributor

Fixes: #3528
When the previous build exists, use its packing structure otherwise container-encapsulate generates a new one

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
Copy link
Member

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
Copy link
Member

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.

Copy link
Contributor Author

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

@RishabhSaini
Copy link
Contributor Author

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)

Copy link
Member

@cgwalters cgwalters left a 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.

@RishabhSaini RishabhSaini merged commit 04ae58a into coreos:main Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants