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

Update Openshift Release Process #964

Merged
merged 6 commits into from
May 31, 2023

Conversation

prafull01
Copy link
Collaborator

Install preflight binary on Linux machines

Adding preflight to the list of OpenShift binaries installed. For now,
this is only available on Linux machines and won't be added to anyone
using Darwin.

Publish operator and bundle images for RedHat/OpenShift

Updating the build/release scripts to handle publishing the bundle
images and running preflight on them.

The publish-openshift script downloads the tagged release from
DockerHub, retags it correctly for the RedHat scanning repo, pushes it,
and finally runs the preflight check on it.

The openshift-bundle script largely does the same, only it publishes the
bundle image rather than the operator image. The same script is used for
both the certified and marketplace bundles. Passing `MARKETPLACE=1` will
use the marketplace bundle values rather than the certified ones
(default).

Support Openshift version 4.10 and 4.11 as we have support for k8s 1.25

Fixes: #938

Checklist

  • I have added these changes to the changelog (or it's not applicable).

@prafull01 prafull01 force-pushed the openshift-rel branch 2 times, most recently from 7d11ffe to e61f314 Compare March 29, 2023 19:09
@prafull01 prafull01 requested a review from pseudomuto March 29, 2023 19:52
Copy link
Contributor

@pseudomuto pseudomuto left a comment

Choose a reason for hiding this comment

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

A few nits, but this is looking good. I'm assuming you've tried this with the --dry-run option and found no issues building/publishing the images?

docker push $image
run_preflight() {
bazel build //hack/bin:preflight
PFLT_PYXIS_API_TOKEN="${REDHAT_API_TOKEN}" bazel-bin/hack/bin/preflight \
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this token already in place in TC?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure. I don't have access to TC. Can you please check in the TC if we have added this token

Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't see it there. Maybe worth asking @rail just to be sure.

Copy link
Member

Choose a reason for hiding this comment

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

REDHAT_API_TOKEN is set in TeamCity, correct.

hack/bundle.sh Show resolved Hide resolved
hack/redhat.sh Show resolved Hide resolved
Copy link
Collaborator Author

@prafull01 prafull01 left a comment

Choose a reason for hiding this comment

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

Yes. I have build the images, pushed to personal repo and tested those images. This is the way I have done testing.

@prafull01
Copy link
Collaborator Author

Tests is passing locally. Logs points to the following issue in GitHub actions actions/runner#2468 and has been seen by many people recently

pseudomuto and others added 6 commits May 30, 2023 19:23
Adding preflight to the list of OpenShift binaries installed. For now,
this is only available on Linux machines and won't be added to anyone
using Darwin.
Updating the build/release scripts to handle publishing the bundle
images and running preflight on them.

The publish-openshift script downloads the tagged release from
DockerHub, retags it correctly for the RedHat scanning repo, pushes it,
and finally runs the preflight check on it.

The openshift-bundle script largely does the same, only it publishes the
bundle image rather than the operator image. The same script is used for
both the certified and marketplace bundles. Passing `MARKETPLACE=1` will
use the marketplace bundle values rather than the certified ones
(default).
Updated all of the outdated OpenShift binaries. This also includes a fix
to an issue with had with opm. We were copying the tar file into the bin
folder and marking it as executable. This naturally, caused issues when
we tried to run it.
Adding targets for running preflight tests. These only work on Linux
machines since preflight is currently not available on other platforms.

The preflight tasks all assume you've got a running OpenShift cluster
and that GCP_PROJECT and KUBECONFIG are set accordingly in the env.
@prafull01 prafull01 merged commit 2cb3e2e into cockroachdb:master May 31, 2023
@prafull01 prafull01 deleted the openshift-rel branch May 31, 2023 05:18
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.

RH 4.10 and 4.11 Certification
3 participants