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

Add workflow test hack #300

Merged
merged 1 commit into from
Apr 20, 2023
Merged

Add workflow test hack #300

merged 1 commit into from
Apr 20, 2023

Conversation

jotak
Copy link
Member

@jotak jotak commented Mar 16, 2023

Hey,
There's been a bunch of regressions lately because of changes in the makefile and/or workflow, so I've written some "tests" around that. They don't yet cover everything I want (e.g. they should also cover everything that is documented in RELEASE.md and DEVELOPMENT.md)

@msherif1234
Copy link
Contributor

@jotak do u have a logs of sample run of this new github action ?

@jotak
Copy link
Member Author

jotak commented Mar 21, 2023

@msherif1234 it's not a github action - at least not yet - at the moment it's something to run manually on demand - e.g. when modifying the makefiles and wanting to make sure we don't break things. Most of the time, it's not useful to run it.

Here's an output example:

$ make test-workflow 
hack/test-workflow.sh
🥁🥁🥁 TESTING push_image_pr.yml 🥁🥁🥁
↘️  Running step 'build images' (push_image_pr.yml)
IMG=quay.io/netobserv/network-observability-operator:temp make ci-images-build
Successfully tagged quay.io/netobserv/network-observability-operator:3b2e19fe
↘️  Running step 'build bundle' (push_image_pr.yml)
VERSION=3b2e19fe PLG_VERSION=main FLP_VERSION=main BPF_VERSION=main BUNDLE_VERSION=0.0.0-3b2e19fe make bundle shortlived-bundle-build
Successfully tagged quay.io/netobserv/network-observability-operator-bundle:v0.0.0-3b2e19fe
↘️  Running step 'build catalog' (push_image_pr.yml)
OPM_OPTS=--permissive BUNDLE_VERSION=0.0.0-3b2e19fe make shortlived-catalog-build
Successfully tagged quay.io/netobserv/network-observability-operator-catalog:v0.0.0-3b2e19fe
✅

🥁🥁🥁 TESTING push_image.yml 🥁🥁🥁
↘️  Running step 'build images' (push_image.yml)
IMG=quay.io/netobserv/network-observability-operator:main make ci-images-build
Successfully tagged quay.io/netobserv/network-observability-operator:main
↘️  Running step 'build bundle' (push_image.yml)
VERSION=main PLG_VERSION=main FLP_VERSION=main BPF_VERSION=main BUNDLE_VERSION=0.0.0-main make bundle bundle-build
Successfully tagged quay.io/netobserv/network-observability-operator-bundle:v0.0.0-main
↘️  Running step 'build catalog' (push_image.yml)
OPM_OPTS=--permissive BUNDLE_VERSION=0.0.0-main make catalog-build
✅

🥁🥁🥁 TESTING make update-bundle 🥁🥁🥁
✅

🥁🥁🥁 TESTING release.yml 🥁🥁🥁
↘️  Running step 'build operator' (release.yml)
IMG=quay.io/netobserv/network-observability-operator:1.0.42 make image-build
Successfully tagged quay.io/netobserv/network-observability-operator:1.0.42
↘️  Running step 'build bundle' (release.yml)
BUNDLE_VERSION=1.0.42 IMAGE_TAG_BASE=quay.io/netobserv/network-observability-operator make bundle-build
Successfully tagged quay.io/netobserv/network-observability-operator-bundle:v1.0.42
↘️  Running step 'build catalog' (release.yml)
OPM_OPTS=--permissive BUNDLE_VERSION=1.0.42 IMAGE_TAG_BASE=quay.io/netobserv/network-observability-operator make catalog-build

✅ Looks good to me!

And an example of failure:

$ make test-workflow 
hack/test-workflow.sh
🥁🥁🥁 TESTING push_image_pr.yml 🥁🥁🥁
↘️  Running step 'build images' (push_image_pr.yml)
IMG=quay.io/netobserv/network-observability-operator:temp make ci-images-build
Successfully tagged quay.io/netobserv/network-observability-operator:3b2e19fe
↘️  Running step 'build bundle' (push_image_pr.yml)
VERSIONZ=3b2e19fe PLG_VERSION=main FLP_VERSION=main BPF_VERSION=main BUNDLE_VERSION=0.0.0-3b2e19fe make bundle shortlived-bundle-build
Successfully tagged quay.io/netobserv/network-observability-operator-bundle:v0.0.0-3b2e19fe
❌ Failure: expected 2 occurrences of "quay.io/netobserv/network-observability-operator:3b2e19fe" in bundle/manifests/netobserv-operator.clusterserviceversion.yaml, found 0.

Copy link
Contributor

@jpinsonneau jpinsonneau left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @jotak !

@jotak
Copy link
Member Author

jotak commented Apr 20, 2023

/approve

@openshift-ci
Copy link

openshift-ci bot commented Apr 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jotak

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants