Skip to content
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

Update CI files for branch 3.12 #698

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-345-g747bcf8
2021.08.26-347-gc4a2504
16 changes: 14 additions & 2 deletions .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ cmd_prefix bash -c "chmod 600 ~pulp/.netrc"
# Generate bindings
###################

echo "::group::Generate bindings"

touch bindings_requirements.txt
pushd ../pulp-openapi-generator
# Use app_label to generate api.json and package to produce the proper package name.
Expand All @@ -79,10 +81,10 @@ pushd ../pulp-openapi-generator
# there, because we did not merge plugins into pulpcore back then.
MODULE="$(jq -r '.module // (.package|gsub("-"; "_"))' <<<"${ITEM}")"
PACKAGE="${MODULE%%.*}"
cmd_prefix pulpcore-manager openapi --bindings --component "${COMPONENT}" > "${COMPONENT}-api.json"
if [[ ! " ${BUILT_CLIENTS} " =~ "${COMPONENT}" ]]
then
rm -rf "./${PACKAGE}-client"
cmd_prefix pulpcore-manager openapi --bindings --component "${COMPONENT}" > "${COMPONENT}-api.json"
./gen-client.sh "${COMPONENT}-api.json" "${COMPONENT}" python "${PACKAGE}"
pushd "${PACKAGE}-client"
python setup.py sdist bdist_wheel --python-tag py3
Expand All @@ -100,6 +102,16 @@ pushd ../pulp-openapi-generator
done
popd

echo "::endgroup::"

echo "::group::Debug bindings diffs"

# Bindings diff for python
jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "python-api.json" > "build-api.json"
jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "../pulp-openapi-generator/python-api.json" > "test-api.json"
jsondiff --indent 2 build-api.json test-api.json || true
echo "::endgroup::"

# Install test requirements
###########################

Expand Down Expand Up @@ -140,7 +152,7 @@ else
else
cmd_user_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_python.tests.functional -m parallel -n 8"
cmd_user_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_python.tests.functional -m 'not parallel'"
fi
fi
fi
pushd ../pulp-cli
pip install -r test_requirements.txt
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,20 @@ jobs:
with:
python-version: "3.11"

- uses: "actions/download-artifact@v4"
- name: "Download plugin package"
uses: "actions/download-artifact@v4"
with:
name: "plugin_package"
path: "pulp_python/dist/"

- uses: "actions/download-artifact@v4"
- name: "Download API specs"
uses: "actions/download-artifact@v4"
with:
name: "api_spec"
path: "pulp_python/"

- name: "Download client packages"
uses: "actions/download-artifact@v4"
with:
name: "python-client.tar"
path: "pulp_python"
Expand All @@ -64,7 +72,7 @@ jobs:
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install towncrier twine wheel httpie docker netaddr boto3 ansible mkdocs
pip install towncrier twine wheel httpie docker netaddr boto3 ansible mkdocs jq jsonpatch
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/pulp_python/.ci/assets/httpie/" >> $GITHUB_ENV
echo ::endgroup::

Expand Down
6 changes: 4 additions & 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]326-ge5addc7
# generated with [email protected]347-gc4a2504

api_root: /pulp/
black: false
Expand Down Expand Up @@ -32,6 +32,7 @@ kanban: true
latest_release_branch: null
lint_requirements: true
noissue_marker: '[noissue]'
os_required_packages: []
parallel_test_workers: 8
plugin_app_label: python
plugin_default_branch: main
Expand Down Expand Up @@ -64,7 +65,8 @@ stalebot: true
stalebot_days_until_close: 30
stalebot_days_until_stale: 90
stalebot_limit_to_pulls: true
supported_release_branches: ['3.11']
supported_release_branches:
- '3.11'
sync_ci: true
test_azure: true
test_cli: true
Expand Down
Loading