Skip to content

Commit

Permalink
Update plugin template
Browse files Browse the repository at this point in the history
This accommodates for a change in pulpcore that will effect the CI.

pulp/pulpcore#1102

[noissue]
  • Loading branch information
mdellweg committed Feb 18, 2021
1 parent 29d4b51 commit 78d929f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 16 deletions.
23 changes: 16 additions & 7 deletions .ci/ansible/start_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/scripts/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ else
fi
mkdir .ci/ansible/vars || true
echo "---" > .ci/ansible/vars/main.yaml
echo "legacy_component_name: pulp_2to3_migration" >> .ci/ansible/vars/main.yaml
echo "component_name: pulp_2to3_migration" >> .ci/ansible/vars/main.yaml
echo "component_version: '${COMPONENT_VERSION}'" >> .ci/ansible/vars/main.yaml

Expand All @@ -57,6 +58,7 @@ then
export PULPCORE_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulpcore\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_SMASH_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-smash\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_OPENAPI_GENERATOR_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-openapi-generator\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_CLI_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp-cli\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_FILE_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp_file\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_CONTAINER_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp_container\/pull\/(\d+)' | awk -F'/' '{print $7}')
export PULP_RPM_PR_NUMBER=$(echo $COMMIT_MSG | grep -oP 'Required\ PR:\ https\:\/\/github\.com\/pulp\/pulp_rpm\/pull\/(\d+)' | awk -F'/' '{print $7}')
Expand All @@ -66,6 +68,7 @@ else
export PULPCORE_PR_NUMBER=
export PULP_SMASH_PR_NUMBER=
export PULP_OPENAPI_GENERATOR_PR_NUMBER=
export PULP_CLI_PR_NUMBER=
export PULP_FILE_PR_NUMBER=
export PULP_CONTAINER_PR_NUMBER=
export PULP_RPM_PR_NUMBER=
Expand All @@ -88,6 +91,8 @@ sed -i -e 's/localhost:24817/pulp/g' generate.sh
sed -i -e 's/:24817/pulp/g' generate.sh
cd ..



git clone --depth=1 https://github.com/pulp/pulpcore.git --branch master

cd pulpcore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if [[ "$TEST" = "docs" || "$TEST" = "publish" ]]; then
echo "Validating OpenAPI schema..."
cat $PWD/.ci/scripts/schema.py | cmd_stdin_prefix bash -c "cat > /tmp/schema.py"
cmd_prefix bash -c "python3 /tmp/schema.py"
# cmd_prefix bash -c "pulpcore-manager spectacular --file pulp_schema.yml --validate"
cmd_prefix bash -c "pulpcore-manager spectacular --file pulp_schema.yml --validate"

if [ -f $POST_DOCS_TEST ]; then
source $POST_DOCS_TEST
Expand Down
17 changes: 9 additions & 8 deletions template_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# were not present before running plugin-template have been added with their default values.

additional_plugins:
- name: pulp_file
branch: master
- name: pulp_container
branch: master
- name: pulp_rpm
branch: master
- name: pulp_deb
branch: main
- branch: master
name: pulp_file
- branch: master
name: pulp_container
- branch: master
name: pulp_rpm
- branch: main
name: pulp_deb
black: false
check_commit_message: true
check_manifest: true
Expand Down Expand Up @@ -40,6 +40,7 @@ pydocstyle: false
pypi_username: pulp
redmine_project: migration
test_bindings: false
test_cli: false
test_performance: false
test_released_plugin_with_next_pulpcore_release: false
test_s3: false
Expand Down

0 comments on commit 78d929f

Please sign in to comment.