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 lubosmj committed Jul 1, 2024
1 parent 8973f80 commit e52fa5d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 8 deletions.
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 container
jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "container-api.json" > "build-api.json"
jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "../pulp-openapi-generator/container-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_container.tests.functional -m parallel -n 8"
cmd_user_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_container.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_container/dist/"

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

- name: "Download client packages"
uses: "actions/download-artifact@v4"
with:
name: "python-client.tar"
path: "pulp_container"
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_container/.ci/assets/httpie/" >> $GITHUB_ENV
echo ::endgroup::
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-345-g747bcf8
2021.08.26-347-gc4a2504
3 changes: 2 additions & 1 deletion 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]329-g63d3740
# generated with [email protected]347-gc4a2504

api_root: /pulp/
black: true
Expand Down Expand Up @@ -32,6 +32,7 @@ kanban: true
latest_release_branch: '2.20'
lint_requirements: true
noissue_marker: '[noissue]'
os_required_packages: []
parallel_test_workers: 8
plugin_app_label: container
plugin_default_branch: main
Expand Down

0 comments on commit e52fa5d

Please sign in to comment.