Skip to content

Commit 2380ab8

Browse files
authored
Merge pull request #697 from pulp/update-ci/main
Update CI files for branch main
2 parents e4390cb + 035b168 commit 2380ab8

File tree

4 files changed

+28
-7
lines changed

4 files changed

+28
-7
lines changed

.github/template_gitref

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.08.26-345-g747bcf8
1+
2021.08.26-347-gc4a2504

.github/workflows/scripts/script.sh

+14-2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ cmd_prefix bash -c "chmod 600 ~pulp/.netrc"
5757
# Generate bindings
5858
###################
5959

60+
echo "::group::Generate bindings"
61+
6062
touch bindings_requirements.txt
6163
pushd ../pulp-openapi-generator
6264
# Use app_label to generate api.json and package to produce the proper package name.
@@ -79,10 +81,10 @@ pushd ../pulp-openapi-generator
7981
# there, because we did not merge plugins into pulpcore back then.
8082
MODULE="$(jq -r '.module // (.package|gsub("-"; "_"))' <<<"${ITEM}")"
8183
PACKAGE="${MODULE%%.*}"
84+
cmd_prefix pulpcore-manager openapi --bindings --component "${COMPONENT}" > "${COMPONENT}-api.json"
8285
if [[ ! " ${BUILT_CLIENTS} " =~ "${COMPONENT}" ]]
8386
then
8487
rm -rf "./${PACKAGE}-client"
85-
cmd_prefix pulpcore-manager openapi --bindings --component "${COMPONENT}" > "${COMPONENT}-api.json"
8688
./gen-client.sh "${COMPONENT}-api.json" "${COMPONENT}" python "${PACKAGE}"
8789
pushd "${PACKAGE}-client"
8890
python setup.py sdist bdist_wheel --python-tag py3
@@ -100,6 +102,16 @@ pushd ../pulp-openapi-generator
100102
done
101103
popd
102104

105+
echo "::endgroup::"
106+
107+
echo "::group::Debug bindings diffs"
108+
109+
# Bindings diff for python
110+
jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "python-api.json" > "build-api.json"
111+
jq '(.paths[][].parameters|select(.)) |= sort_by(.name)' < "../pulp-openapi-generator/python-api.json" > "test-api.json"
112+
jsondiff --indent 2 build-api.json test-api.json || true
113+
echo "::endgroup::"
114+
103115
# Install test requirements
104116
###########################
105117

@@ -140,7 +152,7 @@ else
140152
else
141153
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"
142154
cmd_user_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_python.tests.functional -m 'not parallel'"
143-
fi
155+
fi
144156
fi
145157
pushd ../pulp-cli
146158
pip install -r test_requirements.txt

.github/workflows/test.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,20 @@ jobs:
4343
with:
4444
python-version: "3.11"
4545

46-
- uses: "actions/download-artifact@v4"
46+
- name: "Download plugin package"
47+
uses: "actions/download-artifact@v4"
4748
with:
4849
name: "plugin_package"
4950
path: "pulp_python/dist/"
5051

51-
- uses: "actions/download-artifact@v4"
52+
- name: "Download API specs"
53+
uses: "actions/download-artifact@v4"
54+
with:
55+
name: "api_spec"
56+
path: "pulp_python/"
57+
58+
- name: "Download client packages"
59+
uses: "actions/download-artifact@v4"
5260
with:
5361
name: "python-client.tar"
5462
path: "pulp_python"
@@ -64,7 +72,7 @@ jobs:
6472
- name: "Install python dependencies"
6573
run: |
6674
echo ::group::PYDEPS
67-
pip install towncrier twine wheel httpie docker netaddr boto3 ansible mkdocs
75+
pip install towncrier twine wheel httpie docker netaddr boto3 ansible mkdocs jq jsonpatch
6876
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/pulp_python/.ci/assets/httpie/" >> $GITHUB_ENV
6977
echo ::endgroup::
7078

template_config.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This config represents the latest values used when running the plugin-template. Any settings that
22
# were not present before running plugin-template have been added with their default values.
33

4-
# generated with [email protected]345-g747bcf8
4+
# generated with [email protected]347-gc4a2504
55

66
api_root: /pulp/
77
black: false
@@ -32,6 +32,7 @@ kanban: true
3232
latest_release_branch: '3.12'
3333
lint_requirements: true
3434
noissue_marker: '[noissue]'
35+
os_required_packages: []
3536
parallel_test_workers: 8
3637
plugin_app_label: python
3738
plugin_default_branch: main

0 commit comments

Comments
 (0)