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

Retrieve installer sha from installer container if present #978

Merged
merged 4 commits into from
Mar 23, 2020

Conversation

stbenjam
Copy link
Member

@stbenjam stbenjam commented Mar 18, 2020

If we're in OpenShift CI in an installer PR, then the installer is
built by rebasing on the target branch (i.e. master). The SHA that
openshift-install version reports doesn't exist on GitHub. It's only
in the environment that CI used to build the installer.

This gets the rhcos.json that's now in the baremetal-installer container. This avoids the CI problem, and avoids making any GitHub URL calls in 4.5 or later.

If we're in OpenShift CI in an installer PR, then the installer is
built by rebasing on the target branch (i.e. master). The SHA that
`openshift-install version` reports doesn't exist on GitHub. It's only
in the environment that CI used to build the installer.

This gets the PR SHA from the environment, and then fetchs the rhcos
from that branch. There's a potential problem here if a PR branch is out
of date. However, we really do need to get the rhcos.json from the
PR branch in case it's being updated.

The fixes for this are probably a bunch of API calls to see if the PR
modifies rhcos.json, or actually check out the git repo which will
increase the already long build time.
@stbenjam stbenjam force-pushed the fix-ci-installer-ref branch from 8186198 to 60a55b8 Compare March 23, 2020 11:46
@stbenjam stbenjam changed the title [WIP] Retrieve installer sha from CI environment Retrieve installer sha from CI environment Mar 23, 2020
@stbenjam stbenjam force-pushed the fix-ci-installer-ref branch from cb85d33 to 7217050 Compare March 23, 2020 12:19
@stbenjam
Copy link
Member Author

openshift/installer#3330 is the alternative approach to save the rhcos.json

@stbenjam stbenjam force-pushed the fix-ci-installer-ref branch from 7217050 to 31c1c60 Compare March 23, 2020 12:21
@stbenjam stbenjam added the CI check this PR with CI label Mar 23, 2020
@stbenjam stbenjam force-pushed the fix-ci-installer-ref branch from 31c1c60 to dc5b175 Compare March 23, 2020 18:29
@metal3ci
Copy link

Build ABORTED, see build http://10.8.144.11:8080/job/dev-tools/1662/

@stbenjam stbenjam changed the title Retrieve installer sha from CI environment Retrieve installer sha from installer container if present Mar 23, 2020
@russellb
Copy link
Member

current CI run is past these changes -- http://10.8.144.11:8080/job/dev-tools/1663/console

@russellb russellb merged commit e518023 into openshift-metal3:master Mar 23, 2020
@stbenjam stbenjam deleted the fix-ci-installer-ref branch March 23, 2020 20:07
@metal3ci
Copy link

Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/1663/

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

Successfully merging this pull request may close these issues.

3 participants