88#
99# For more info visit https://github.com/pulp/plugin_template
1010
11+ set -mveuo pipefail
12+
1113# make sure this script runs at the repo root
1214cd " $( dirname " $( realpath -e " $0 " ) " ) " /../../..
1315REPO_ROOT=" $PWD "
1416
15- set -mveuo pipefail
16-
1717source .github/workflows/scripts/utils.sh
1818
1919export POST_SCRIPT=$PWD /.github/workflows/scripts/post_script.sh
@@ -44,10 +44,10 @@ if [[ "$TEST" = "docs" ]]; then
4444 exit
4545fi
4646
47+ REPORTED_STATUS=" $( pulp status) "
48+
4749if [[ " ${RELEASE_WORKFLOW:- false} " == " true" ]]; then
48- STATUS_ENDPOINT=" ${PULP_URL}${PULP_API_ROOT} api/v3/status/"
49- echo $STATUS_ENDPOINT
50- REPORTED_VERSION=$( http $STATUS_ENDPOINT | jq --arg plugin python --arg legacy_plugin pulp_python -r ' .versions[] | select(.component == $plugin or .component == $legacy_plugin) | .version' )
50+ REPORTED_VERSION=" $( echo $REPORTED_STATUS | jq --arg plugin python --arg legacy_plugin pulp_python -r ' .versions[] | select(.component == $plugin or .component == $legacy_plugin) | .version' ) "
5151 response=$( curl --write-out %{http_code} --silent --output /dev/null https://pypi.org/project/pulp-python/$REPORTED_VERSION /)
5252 if [ " $response " == " 200" ];
5353 then
@@ -56,11 +56,6 @@ if [[ "${RELEASE_WORKFLOW:-false}" == "true" ]]; then
5656 fi
5757fi
5858
59- if [[ " $TEST " == " plugin-from-pypi" ]]; then
60- COMPONENT_VERSION=$( http https://pypi.org/pypi/pulp-python/json | jq -r ' .info.version' )
61- git checkout ${COMPONENT_VERSION} -- pulp_python/tests/
62- fi
63-
6459echo " machine pulp
6560login admin
6661password password
@@ -69,12 +64,13 @@ password password
6964cmd_user_stdin_prefix bash -c " chmod 600 ~pulp/.netrc"
7065
7166cd ../pulp-openapi-generator
72- ./generate.sh pulp_python python
73- cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_python-client
74- sudo rm -rf ./pulp_python-client
75- ./generate.sh pulpcore python
76- cmd_prefix pip3 install /root/pulp-openapi-generator/pulpcore-client
77- sudo rm -rf ./pulpcore-client
67+ for item in $( echo " $REPORTED_STATUS " | jq -r ' .versions[].package|sub("-"; "_")' )
68+ do
69+ ./generate.sh " ${item} " python
70+ cmd_prefix pip3 install " /root/pulp-openapi-generator/${item} -client"
71+ sudo rm -rf " ./${item} -client"
72+ done
73+
7874cd $REPO_ROOT
7975
8076cat unittest_requirements.txt | cmd_stdin_prefix bash -c " cat > /tmp/unittest_requirements.txt"
0 commit comments