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 main #386

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-346-g8368e4c
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 ostree
jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "ostree-api.json" > "build-api.json"
jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "../pulp-openapi-generator/ostree-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_ostree.tests.functional -m parallel -n 8"
cmd_user_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_ostree.tests.functional -m 'not parallel'"
fi
fi
fi
pushd ../pulp-cli-ostree
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_ostree/dist/"

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

- name: "Download client packages"
uses: "actions/download-artifact@v4"
with:
name: "python-client.tar"
path: "pulp_ostree"
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_ostree/.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
Loading