From 7e29f690e119a06fc0c373a465374fb37f362e03 Mon Sep 17 00:00:00 2001 From: Matthias Dellweg Date: Wed, 17 Feb 2021 17:14:15 +0100 Subject: [PATCH] Update plugin template This accommodates for a change in pulpcore that will effect the CI. https://github.com/pulp/pulpcore/pull/1102 [noissue] --- .ci/ansible/start_container.yaml | 23 ++++++++++++++------- .github/workflows/scripts/before_install.sh | 3 ++- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/.ci/ansible/start_container.yaml b/.ci/ansible/start_container.yaml index 43d4d470..bdf35b43 100644 --- a/.ci/ansible/start_container.yaml +++ b/.ci/ansible/start_container.yaml @@ -81,13 +81,22 @@ command: "docker logs pulp" failed_when: true - - name: "Check version of component being tested" - assert: - that: - - (result.json.versions | items2dict(key_name="component", value_name="version"))[component_name] | canonical_semver == (component_version | canonical_semver) - fail_msg: | - Component {{ component_name }} was expected to be installed in version {{ component_version }}. - Instead it is reported as version {{ (result.json.versions | items2dict(key_name="component", value_name="version"))[component_name] }}. + - block: + - name: "Check version of component being tested" + assert: + that: + - (result.json.versions | items2dict(key_name="component", value_name="version"))[component_name] | canonical_semver == (component_version | canonical_semver) + fail_msg: | + Component {{ component_name }} was expected to be installed in version {{ component_version }}. + Instead it is reported as version {{ (result.json.versions | items2dict(key_name="component", value_name="version"))[component_name] }}. + rescue: + - name: "Check version of component being tested (legacy)" + assert: + that: + - (result.json.versions | items2dict(key_name="component", value_name="version"))[legacy_component_name] | canonical_semver == (component_version | canonical_semver) + fail_msg: | + Component {{ legacy_component_name }} was expected to be installed in version {{ component_version }}. + Instead it is reported as version {{ (result.json.versions | items2dict(key_name="component", value_name="version"))[legacy_component_name] }}. - name: "Set pulp password in .netrc" copy: diff --git a/.github/workflows/scripts/before_install.sh b/.github/workflows/scripts/before_install.sh index 93115dc4..04904946 100755 --- a/.github/workflows/scripts/before_install.sh +++ b/.github/workflows/scripts/before_install.sh @@ -34,7 +34,8 @@ else fi mkdir .ci/ansible/vars || true echo "---" > .ci/ansible/vars/main.yaml -echo "component_name: pulp_file" >> .ci/ansible/vars/main.yaml +echo "legacy_component_name: pulp_file" >> .ci/ansible/vars/main.yaml +echo "component_name: file" >> .ci/ansible/vars/main.yaml echo "component_version: '${COMPONENT_VERSION}'" >> .ci/ansible/vars/main.yaml export PRE_BEFORE_INSTALL=$PWD/.github/workflows/scripts/pre_before_install.sh