Skip to content

Commit

Permalink
Update CI files
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pulpbot authored and mdellweg committed Mar 12, 2024
1 parent 51e98a6 commit 49da685
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 38 deletions.
24 changes: 8 additions & 16 deletions .ci/ansible/start_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,14 @@
command: "docker logs pulp"
failed_when: true

- 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: "Check version of component being tested"
assert:
that:
- (result.json.versions | items2dict(key_name="component", value_name="version"))[item.app_label] | canonical_semver == (component_version | canonical_semver)
fail_msg: |
Component {{ item.app_label }} 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"))[item.app_label] }}.
loop: "{{ 'plugins' | ansible.builtin.extract(lookup('ansible.builtin.file', '../../template_config.yml') | from_yaml) }}"

- name: "Set pulp password in .netrc"
copy:
Expand Down
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-316-g69ef1f6
2021.08.26-320-g4fd782b
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/create-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
find CHANGES -type f -regex ".*\.\(bugfix\|doc\|feature\|misc\|deprecation\|removal\)" -exec git rm {} +
- name: Checkout plugin template
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: pulp/plugin_template
path: plugin_template
Expand All @@ -85,7 +85,7 @@ jobs:
git add -A
- name: Make a PR with version bump and without CHANGES/*
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
path: pulp_ansible
token: ${{ secrets.RELEASE_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kanban.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
linked-issues: ${{ steps.linked-issues.outputs.issues }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Get Linked Issues Action
uses: kin/[email protected]
id: linked-issues
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: python .ci/scripts/collect_changes.py

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.RELEASE_TOKEN }}
title: "Update Changelog"
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set -euv
source .github/workflows/scripts/utils.sh

PLUGIN_VERSION="$(sed -n -e 's/^\s*current_version\s*=\s*//p' .bumpversion.cfg | python -c 'from packaging.version import Version; print(Version(input()))')"
PLUGIN_NAME="./pulp_ansible/dist/pulp_ansible-${PLUGIN_VERSION}-py3-none-any.whl"
PLUGIN_SOURCE="./pulp_ansible/dist/pulp_ansible-${PLUGIN_VERSION}-py3-none-any.whl"

export PULP_API_ROOT="/pulp/"

Expand All @@ -35,7 +35,6 @@ then
fi

cd .ci/ansible/
PLUGIN_SOURCE="${PLUGIN_NAME}"
if [ "$TEST" = "s3" ]; then
PLUGIN_SOURCE="${PLUGIN_SOURCE} pulpcore[s3]"
fi
Expand Down Expand Up @@ -127,7 +126,7 @@ if [ "${PULP_API_ROOT:-}" ]; then
sed -i -e '$a api_root: "'"$PULP_API_ROOT"'"' vars/main.yaml
fi

pulp config create --base-url https://pulp --api-root "$PULP_API_ROOT"
pulp config create --base-url https://pulp --api-root "$PULP_API_ROOT" --username "admin" --password "password"
if [[ "$TEST" != "docs" ]]; then
cp ~/.config/pulp/cli.toml "${REPO_ROOT}/../pulp-cli/tests/cli.toml"
fi
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ cmd_user_prefix bash -c "django-admin makemigrations ansible --check --dry-run"

# Run unit tests.
cmd_user_prefix bash -c "PULP_DATABASES__default__USER=postgres pytest -v -r sx --color=yes --suppress-no-test-exit-code -p no:pulpcore --pyargs pulp_ansible.tests.unit"

# Run functional tests
if [[ "$TEST" == "performance" ]]; then
if [[ -z ${PERFORMANCE_TEST+x} ]]; then
Expand All @@ -155,7 +154,7 @@ else
fi
pushd ../pulp-cli
pip install -r test_requirements.txt
pytest -v -m pulp_ansible
pytest -v -m "pulp_ansible"
popd

if [ -f "$POST_SCRIPT" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
echo ::group::PYDEPS
pip install requests pyyaml
echo ::endgroup::
- uses: "actions/checkout@v3"
- uses: "actions/checkout@v4"
- name: "Update labels"
run: |
python3 .github/workflows/scripts/update_backport_labels.py
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/update_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
../plugin_template/scripts/update_ci.sh
- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v4"
uses: "peter-evans/create-pull-request@v6"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp_ansible"
Expand All @@ -82,7 +82,7 @@ jobs:
../plugin_template/scripts/update_ci.sh
- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v4"
uses: "peter-evans/create-pull-request@v6"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp_ansible"
Expand All @@ -109,7 +109,7 @@ jobs:
../plugin_template/scripts/update_ci.sh
- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v4"
uses: "peter-evans/create-pull-request@v6"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp_ansible"
Expand All @@ -136,7 +136,7 @@ jobs:
../plugin_template/scripts/update_ci.sh
- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v4"
uses: "peter-evans/create-pull-request@v6"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp_ansible"
Expand All @@ -163,7 +163,7 @@ jobs:
../plugin_template/scripts/update_ci.sh
- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v4"
uses: "peter-evans/create-pull-request@v6"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp_ansible"
Expand All @@ -190,7 +190,7 @@ jobs:
../plugin_template/scripts/update_ci.sh
- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v4"
uses: "peter-evans/create-pull-request@v6"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp_ansible"
Expand All @@ -217,7 +217,7 @@ jobs:
../plugin_template/scripts/update_ci.sh
- name: "Create Pull Request for CI files"
uses: "peter-evans/create-pull-request@v4"
uses: "peter-evans/create-pull-request@v6"
with:
token: "${{ secrets.RELEASE_TOKEN }}"
path: "pulp_ansible"
Expand Down
2 changes: 1 addition & 1 deletion docs/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-316-g69ef1f6
2021.08.26-320-g4fd782b
3 changes: 1 addition & 2 deletions template_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This config represents the latest values used when running the plugin-template. Any settings that
# were not present before running plugin-template have been added with their default values.

# generated with [email protected]316-g69ef1f6
# generated with [email protected]320-g4fd782b

api_root: /pulp/
black: true
Expand Down Expand Up @@ -63,7 +63,6 @@ pulp_settings_gcp:
pulp_settings_s3:
ansible_collect_download_count: true
ansible_collect_download_log: true
pulpprojectdotorg_key_id: aa499d7938ed
pydocstyle: true
release_email: [email protected]
release_user: pulpbot
Expand Down

0 comments on commit 49da685

Please sign in to comment.