Skip to content

adds the derived image test scripts for prow#769

Merged
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
cheesesashimi:zzlotnik/add-derived-test-scripts
Apr 6, 2022
Merged

adds the derived image test scripts for prow#769
openshift-merge-robot merged 1 commit intoopenshift:masterfrom
cheesesashimi:zzlotnik/add-derived-test-scripts

Conversation

@cheesesashimi
Copy link
Copy Markdown
Member

Instead of having complex Bash scripts embedded in YAML structures, it would be better if the scripts that were written and refined in openshift/release#26912 lived in this repo. This allows additional benefits such as static analysis, reuse, etc.

@openshift-ci openshift-ci Bot requested review from cgwalters and jlebon April 5, 2022 14:38
@cheesesashimi
Copy link
Copy Markdown
Member Author

/assign cgwalters

Copy link
Copy Markdown
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.

Overall LGTM, some things that can be fixed now or in a followup!

Comment thread ci/derived-image-test.sh
# Ensure we're in the designated cosa directory so the push-container commands work
cd "$COSA_DIR"

# Tags with the cosa build ID / arch - unique to this specific build
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Will anything prune these tags by default? From a quick look at openshift/release I see image pruners set up on the CI clusters but not the central CI registry?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'm not sure to be honest. It would be nice to push to the ephemeral CI registry first so one doesn't have to worry about pruning these tags.

Comment thread ci/derived-image-test.sh

# Tag with the Prow Build ID because we don't want to overwrite our well-known
# tags yet, but our test cluster needs the image to be pushed someplace so we
# can ingest it. We use the BUILD_ID value because its unique to each job so
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(Doesn't need to be in this PR but I think we should add a TODO here about how we actually do want to push to the "CI namespace" that prow creates that is naturally lifecycle bound to the PR, but we just can't do that right now because Prow wants to own the build process)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was thinking about that and only pushing to the external registry on success since that would eliminate the need to prune the build ID tags. However, there are two things I need to figure out:

  1. How to get those creds within a test since the KUBECONFIG env var points to ones ephemeral test cluster, not the ephemeral CI registry?
  2. Is the ephemeral test cluster is created with the perms to pull from the CI namespace registry? I have to assume that it is, but I could be wrong.

Comment thread ci/derived-image-test.sh Outdated
cosa push-container "registry.ci.openshift.org/rhcos-devel/rhel-coreos:$BUILD_ID"

# Perform the derived OS image build tests
export BASE_IMAGE_TAG="$BUILD_ID"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm, I think we should inject the full pull spec in the future - this would give us more flexibility. (We'll hopefully be pushing the official images outside of rhcos-devel in the near future)

Copy link
Copy Markdown
Member Author

@cheesesashimi cheesesashimi Apr 5, 2022

Choose a reason for hiding this comment

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

This is consumed by the derived OS test, but I agree. I'll address that now since the test is in the same repo.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I updated the Golang test to search for BASE_IMAGE_PULLSPEC and default to registry.ci.openshift.org/rhcos-devel/rhel-coreos:latest if that env var isn't set.

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 5, 2022
@cheesesashimi cheesesashimi force-pushed the zzlotnik/add-derived-test-scripts branch from f7438fe to cc4fad8 Compare April 5, 2022 19:29
@cgwalters
Copy link
Copy Markdown
Member

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Apr 6, 2022
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 6, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cgwalters, cheesesashimi

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

The pull request process is described here

Details 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

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 6, 2022

@cheesesashimi: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 95ccc86 into openshift:master Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants