Skip to content

Commit

Permalink
Fixed "Pyxis rejects test library development version numbers"
Browse files Browse the repository at this point in the history
  • Loading branch information
nsilla committed Apr 11, 2024
1 parent 49ce9d2 commit 296b936
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions roles/pyxis/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
preflight_artifact: "{{ lookup('file', preflight_log_file) | to_json }}"
pyxis_apikey: "{{ lookup('file', pyxis_apikey_path) }}"

- name: Get latest commit hash for the Preflight release
vars:
- name: Set preflight release
set_fact:
preflight_release: "{{ preflight_output.test_library.version.split('+')[0] }}"

- name: Get latest commit hash for the Preflight release
ansible.builtin.uri:
url: >
https://api.github.com/repos/redhat-openshift-ecosystem/openshift-preflight/git/refs/tags/{{ preflight_release }}
Expand Down
2 changes: 1 addition & 1 deletion roles/pyxis/templates/test_results.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"operator_package_name": "{{ operator.name }}",
"passed": {{ preflight_output.passed }},
"results": {{ preflight_output.results }},
"test_library": {{ preflight_output.test_library | combine({'commit': preflight_latest.json.object.sha}) }},
"test_library": {{ preflight_output.test_library | combine({'commit': preflight_latest.json.object.sha, 'version': preflight_release}) }},
"tested_on": {
"name": "OCP",
"version": "{{ ocp_version_full }}"
Expand Down

0 comments on commit 296b936

Please sign in to comment.