-
Notifications
You must be signed in to change notification settings - Fork 3
Use oc adm release extract --tools to download OCP binaries instead of release-controller file-cache #15
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
base: main
Are you sure you want to change the base?
Use oc adm release extract --tools to download OCP binaries instead of release-controller file-cache #15
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,12 +39,25 @@ | |
| ansible.builtin.set_fact: | ||
| openshift_release_build_name: "{{ latest_build_info.name }}" | ||
|
|
||
| - name: Set openshift_release_build_name when a specific build is given | ||
| ansible.builtin.set_fact: | ||
| openshift_release_build_name: "{{ build_name }}" | ||
| - name: Set openshift_release_pull_spec from release stream API response | ||
| ansible.builtin.set_fact: | ||
| openshift_release_pull_spec: "{{ latest_build_info.pullSpec }}" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This For channel builds,
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes , this was indeed a gap. Fixed in the latest push: Channel builds (candidate/fast/stable/eus): The release.txt file already has a Specific builds: Wrapped the existing All three code paths now set |
||
|
|
||
| - name: Set build name and pull spec when a specific build is given | ||
| when: | ||
| - release is not match("4-stable") | ||
| - build_name not in ['','candidate','fast','stable','eus'] | ||
| block: | ||
| - name: Set openshift_release_build_name for specific build | ||
| ansible.builtin.set_fact: | ||
| openshift_release_build_name: "{{ build_name }}" | ||
|
|
||
| - name: Construct openshift_release_pull_spec for specific build | ||
| ansible.builtin.set_fact: | ||
| openshift_release_pull_spec: >- | ||
| {{ 'registry.ci.openshift.org/ocp/release:' + build_name | ||
| if build_name is search('nightly') | ||
| else 'quay.io/openshift-release-dev/ocp-release:' + build_name + '-x86_64' }} | ||
|
|
||
| - name: Discover the release build name for the z-stream promoted to upgrade channel on {{ release }} | ||
| # Ref: https://docs.openshift.com/container-platform/4.9/updating/understanding-upgrade-channels-release.html | ||
|
|
@@ -68,3 +81,12 @@ | |
| - name: Set openshift_release_build_name when openshift.build is set to a channel | ||
| ansible.builtin.set_fact: | ||
| openshift_release_build_name: "{{ result.stdout }}" | ||
|
|
||
| - name: Parse openshift_release_pull_spec from Pull From field in release.txt | ||
| ansible.builtin.shell: set -o pipefail && grep '^Pull From:' {{ home_dir }}/release.txt | awk '{print $3}' | ||
| changed_when: false | ||
| register: pull_from_result | ||
|
|
||
| - name: Set openshift_release_pull_spec from channel release.txt | ||
| ansible.builtin.set_fact: | ||
| openshift_release_pull_spec: "{{ pull_from_result.stdout }}" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pipeline is missing
set -o pipefail- ifoc get secretfails,base64 -dstill exits 0 and creates an empty file, thenoc adm release extractfails later with a confusing auth error. The same role'sget_openshift_release_build_name.yml:68already usespipefail.Also worth adding
no_log: truehere since it handles the decoded pull secret - same pattern astools_install_custom_mce_catalog/tasks/main.yml.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both addressed:
Added
set -o pipefail&& at the start of the pipeline so a failure in oc get secret properly propagates instead of being masked bybase64 -d.Added
no_log: trueto suppress the decoded pull secret from appearing in logs, consistent withtools_install_custom_mce_catalog/tasks/main.yml