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

ROX-24700: Resolve CentOS 8 deprecation #212

Merged
merged 15 commits into from
Aug 12, 2024
Merged

Conversation

BradLugo
Copy link
Contributor

@BradLugo BradLugo commented Jul 29, 2024

Description

Dockerfiles/Containerfiles using quay.io/centos/centos:stream8 as the base image were breaking due to the removal of mirrorlist.centos.org.
Example: https://github.com/stackrox/rox-ci-image/actions/runs/10011868762/job/27676182918

These changes substitute ubi8:latest in place of centos:stream8 and add another image, stackrox-ui-test, to enable X11 support, which is required for running UI tests (particularly in OSCI).

Testing

Changes have been validated here:

Other approaches

CentOS Vault mirror

This is a valid option and probably the most reasonable way to get this working. If I had known about it when I first started this work, I would probably have done this just to get everything working again. But the longer-term fix is already in this PR.

Use UBI8 in the UI tests

Red Hat folks have explicitly stated that X11 packages will not be supported in UBI registries.

CentOS Stream 9 across the board

This is problematic due to CGO and glibc versions mismatching in CI. See the following PRs for more details:

Future improvements

For a cleaner solution in the future, I propose we:

  • Consolidate stackrox-build and stackrox-test into a single image that contains all tools that are required for development and running everything expected to work in GitHub Actions and Konflux
  • Figure out all the necessary dependencies and packages for the above ^ remove everything not required
  • Continue to use stackrox-ui-test, possibly remain to something more meaningful (maybe stackrox-osci or stackrox-e2e-test?), and also remove all unnecessary dependencies and packages after investigating them

@BradLugo BradLugo force-pushed the blugo/ROX-24700-fix-ci-images branch 4 times, most recently from 29e61a6 to 9944fdc Compare July 29, 2024 22:43
@BradLugo
Copy link
Contributor Author

A side note: it's not clear to me why we have stackrox-build and stackrox-test. I suspect there's a historical reason (here's the PR stackrox-test was introduced: #112) to be more consistent with other OCP teams. But we use GitHub Actions in https://github.com/stackrox/stackrox to build our container images now, so I don't currently see a reason to keep both of them around.

@BradLugo BradLugo force-pushed the blugo/ROX-24700-fix-ci-images branch from 9944fdc to 6ee7d5b Compare July 30, 2024 00:51
@BradLugo
Copy link
Contributor Author


RUN \
mv /bin/bash /bin/real-bash && \
mv /bin/bash-wrapper /bin/bash
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: newline

images/scanner-test.Dockerfile Show resolved Hide resolved
@BradLugo BradLugo force-pushed the blugo/ROX-24700-fix-ci-images branch from fcea57d to eeffe4b Compare August 6, 2024 15:36
@BradLugo BradLugo requested a review from RTann August 6, 2024 16:03
Copy link
Contributor

@davdhacs davdhacs left a comment

Choose a reason for hiding this comment

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

looks great
One question but not blocking merge.

images/collector.Dockerfile Show resolved Hide resolved
@BradLugo BradLugo requested a review from a team August 6, 2024 17:14
.github/workflows/build.yaml Show resolved Hide resolved
Makefile Show resolved Hide resolved
images/scanner-test.Dockerfile Outdated Show resolved Hide resolved
images/scanner-test.Dockerfile Outdated Show resolved Hide resolved
Copy link
Contributor

@RTann RTann left a comment

Choose a reason for hiding this comment

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

I created stackrox/scanner#1589 to confirm Scanner v2 can still build with this image, if you want to see

@BradLugo BradLugo requested review from RTann and removed request for a team August 8, 2024 16:28
Copy link
Contributor

@RTann RTann left a comment

Choose a reason for hiding this comment

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

Scanner images LGTM, thanks

@BradLugo BradLugo merged commit e7bb4f6 into main Aug 12, 2024
8 checks passed
@BradLugo BradLugo deleted the blugo/ROX-24700-fix-ci-images branch August 12, 2024 23:14
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.

5 participants