Skip to content

Konflux-build-cli: replace build step of build-image-index task#3321

Open
mkosiarc wants to merge 3 commits intokonflux-ci:mainfrom
mkosiarc:build-image-index-in-konflux-cli
Open

Konflux-build-cli: replace build step of build-image-index task#3321
mkosiarc wants to merge 3 commits intokonflux-ci:mainfrom
mkosiarc:build-image-index-in-konflux-cli

Conversation

@mkosiarc
Copy link
Copy Markdown
Contributor

@mkosiarc mkosiarc commented Mar 3, 2026

Start using the konflux-build-cli for building the image index.
Related PR: konflux-ci/konflux-build-cli#69

Also NOTE: The build step is now run explicitly as root by using
runAsUser: 0, since the permissions for the "konflux-build-cli" container
are different and they no longer allow executing the necessary setup steps,
like updating the ca-trust. The step was always run with root
permissions, now it us just explicitly setup in the tekton step.

STONEBLD-4060

@snyk-io
Copy link
Copy Markdown

snyk-io bot commented Mar 3, 2026

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mkosiarc
Copy link
Copy Markdown
Contributor Author

mkosiarc commented Mar 3, 2026

Related pr konflux-ci/konflux-build-cli#69

@mkosiarc mkosiarc force-pushed the build-image-index-in-konflux-cli branch 4 times, most recently from 91100b5 to 8058d27 Compare March 25, 2026 09:46
@mkosiarc mkosiarc marked this pull request as ready for review March 25, 2026 11:10
@mkosiarc mkosiarc requested review from a team, Allda and jedinym as code owners March 25, 2026 11:10
@mkosiarc
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@mkosiarc
Copy link
Copy Markdown
Contributor Author

/retest

was not useful.
- Image reference validation is now stricter and will fail earlier for invalid formats.

## Action from Users
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we need migration script?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't strictly speaking need it, since unused params are just ignored by Tekton. But it would be nice to have one

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added migration script

@mkosiarc mkosiarc force-pushed the build-image-index-in-konflux-cli branch from 8058d27 to a875152 Compare March 25, 2026 14:41
@MartinBasti
Copy link
Copy Markdown
Contributor

IMO we want also this task to be bumped into v3 (it will be just generated) https://github.com/konflux-ci/build-definitions/tree/main/task/build-image-index-min

@mkosiarc mkosiarc force-pushed the build-image-index-in-konflux-cli branch 2 times, most recently from 10d49b0 to bfab648 Compare March 26, 2026 14:01
@mkosiarc
Copy link
Copy Markdown
Contributor Author

IMO we want also this task to be bumped into v3 (it will be just generated) https://github.com/konflux-ci/build-definitions/tree/main/task/build-image-index-min

bumped

@mkosiarc mkosiarc force-pushed the build-image-index-in-konflux-cli branch from bfab648 to b902c89 Compare March 31, 2026 08:36
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mgiration scrip is in min task, but we need it in the regular task

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to git add in the regular task, updated.

Copy link
Copy Markdown
Contributor

@chmeliik chmeliik 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 the way we currently pass boolean params is wrong, would be worth manually testing.

Minor comment on the commit message:

Also NOTE!: The build step now needs to be run as root, since the
permissions for the "konflux-build-cli" container are different

This sounds worse than it is - the step always needed to run as root. Previously, root was the default user in the container image, now we just need to set root explicitly

Comment on lines +125 to +127
"--tls-verify" "$TLSVERIFY"
"--buildah-format" "$BUILDAH_FORMAT"
"--always-build-index" "$ALWAYS_BUILD_INDEX"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all the boolean flags need to be in this form: --tls-verify=$TLSVERIFY. Related: konflux-ci/konflux-build-cli#60

I think e2e tests are currently not testing version 0.3. We need to update the version in pipelines/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated how I pass the booleans + updated the pipelines now

Comment on lines 136 to 138
for image in "$@"; do
cli_args+=("--images" "$image")
done
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: this can just be --images "$@", and we don't even need the cli_args array

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated and removed the cli_args completely

@mkosiarc mkosiarc force-pushed the build-image-index-in-konflux-cli branch from b902c89 to 6f3b6eb Compare March 31, 2026 11:12
@mkosiarc mkosiarc force-pushed the build-image-index-in-konflux-cli branch from 6f3b6eb to 49a22c3 Compare March 31, 2026 11:17
@mkosiarc
Copy link
Copy Markdown
Contributor Author

I think the way we currently pass boolean params is wrong, would be worth manually testing.

Minor comment on the commit message:

Also NOTE!: The build step now needs to be run as root, since the
permissions for the "konflux-build-cli" container are different

This sounds worse than it is - the step always needed to run as root. Previously, root was the default user in the container image, now we just need to set root explicitly

You are right. Updated the commit message to not sound so alarming and explicitly mentioned that nothing really changed

mkosiarc added 3 commits April 2, 2026 14:11
Start using the konflux-build-cli for building the image index.
Related PR: konflux-ci/konflux-build-cli#69

Also NOTE: The build step is now run explicitly as root by using
runAsUser: 0, since the permissions for the "konflux-build-cli" container
are different and they no longer allow executing the necessary setup steps,
like updating the ca-trust. The step was always run with root
permissions, now it us just explicitly setup in the tekton step.

STONEBLD-4060

Assisted-by: Claude
Signed-off-by: mkosiarc <[email protected]>
@mkosiarc mkosiarc force-pushed the build-image-index-in-konflux-cli branch from 49a22c3 to 9dc517a Compare April 2, 2026 12:11
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.

3 participants