Skip to content
Open
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
4 changes: 2 additions & 2 deletions .ci/ansible/smash-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"selinux enabled": false,
"version": "3",
"aiohttp_fixtures_origin": "172.18.0.1"
"aiohttp_fixtures_origin": "127.0.0.1"
},
"hosts": [
{
Expand All @@ -26,7 +26,7 @@
"pulp workers": {},
"redis": {},
"shell": {
"transport": "docker"
"transport": "local"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-130-ge87b661
2021.08.26-130-gf6574f2-dirty
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ jobs:
GITHUB_REPO_SLUG: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}

- name: Setup tmate session
if: always()
uses: mxschmitt/action-tmate@v3
- name: Extract Deprecations from Logs
id: deprecations
run: echo "::set-output name=deprecations-${{ matrix.env.TEST }}::$(docker logs pulp 2>&1 | grep -i pulpcore.deprecation | base64 -w 0)"
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/scripts/func_test_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

set -mveuo pipefail

pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m "parallel and not nightly" -n 8
pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m "not parallel and not nightly"
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m 'parallel and not nightly' -n 8"
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel and not nightly'"

if [ "${GITHUB_REF##refs/tags/}" != "${GITHUB_REF}" ]
then
Expand All @@ -16,11 +16,9 @@ then
if [ ${PULPCORE_VERSION::3} == "3.9" ]
then
# Temporarily need to downgrade pulp-smash to run pulpcore 3.9 tests
pip install 'pulp-smash==1!0.12.0'
cmd_prefix bash -c "pip install 'pulp-smash==1!0.12.0'"
fi
fi

pip install -r ../pulpcore/functest_requirements.txt

pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m "parallel and not nightly" -n 8
pytest -v -r sx --color=yes --pyargs pulpcore.tests.functional -m "not parallel and not nightly"
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'parallel and not nightly' -n 8"
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulpcore.tests.functional -m 'not parallel and not nightly'"
7 changes: 4 additions & 3 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ if [[ "$TEST" = "docs" || "$TEST" = "publish" ]]; then
pip install -r doc_requirements.txt
fi

pip install -e ../pulpcore -e ../pulp-certguard
pip install -r functest_requirements.txt

cd .ci/ansible/

TAG=ci_build
Expand Down Expand Up @@ -68,6 +65,8 @@ plugins:
source: $PULP_CERTGUARD
- name: pulpcore
source: ./pulpcore
- name: pulp-smash
source: ./pulp-smash
VARSYAML
fi

Expand All @@ -78,6 +77,8 @@ services:
volumes:
- ./settings:/etc/pulp
- ./ssh:/keys/
- ~/.config:/root/.config
- ../../../pulp-openapi-generator:/root/pulp-openapi-generator
VARSYAML

cat >> vars/main.yaml << VARSYAML
Expand Down
58 changes: 32 additions & 26 deletions .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,33 @@ if [[ "$TEST" == "plugin-from-pypi" ]]; then
git checkout ${COMPONENT_VERSION} -- pulp_file/tests/
fi

cat unittest_requirements.txt | cmd_stdin_prefix bash -c "cat > /tmp/unittest_requirements.txt"
cat functest_requirements.txt | cmd_stdin_prefix bash -c "cat > /tmp/functest_requirements.txt"
cmd_prefix pip3 install -r /tmp/unittest_requirements.txt
cmd_prefix pip3 install -r /tmp/functest_requirements.txt
cmd_prefix pip3 install --upgrade ../pulp-smash

cd ../pulp-openapi-generator
./generate.sh pulp_file python
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_file-client
sudo rm -rf ./pulp_file-client
./generate.sh pulpcore python
pip install ./pulpcore-client
rm -rf ./pulpcore-client
cmd_prefix pip3 install /root/pulp-openapi-generator/pulpcore-client
sudo rm -rf ./pulpcore-client
if [[ "$TEST" = 'bindings' ]]; then
./generate.sh pulpcore ruby 0
cd pulpcore-client
gem build pulpcore_client.gemspec
gem install --both ./pulpcore_client-0.gem
cmd_prefix gem install --both /root/pulp-openapi-generator/pulpcore-client/pulpcore_client-0.gem
fi
./generate.sh pulp_certguard python
pip install ./pulp_certguard-client
rm -rf ./pulp_certguard-client
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_certguard-client
sudo rm -rf ./pulp_certguard-client
if [[ "$TEST" = 'bindings' ]]; then
./generate.sh pulp-certguard ruby 0
cd pulp-certguard-client
gem build pulp-certguard_client.gemspec
gem install --both ./pulp-certguard_client-0.gem
cmd_prefix gem install --both /root/pulp-openapi-generator/pulp-certguard-client/pulp-certguard_client-0.gem
cd ..
fi
cd $REPO_ROOT
Expand All @@ -93,8 +102,8 @@ if [[ "$TEST" = 'bindings' ]]; then
exit
fi

cat unittest_requirements.txt | cmd_stdin_prefix bash -c "cat > /tmp/unittest_requirements.txt"
cmd_prefix pip3 install -r /tmp/unittest_requirements.txt
CERTIFI=$(cmd_prefix python3 -c 'import certifi; print(certifi.where())')
cmd_prefix bash -c "cat /etc/pulp/certs/pulp_webserver.crt | tee -a "$CERTIFI" > /dev/null"

# check for any uncommitted migrations
echo "Checking for uncommitted migrations..."
Expand All @@ -106,16 +115,13 @@ if [[ "$TEST" != "upgrade" ]]; then
fi

# Run functional tests
export PYTHONPATH=$REPO_ROOT/../pulp-certguard${PYTHONPATH:+:${PYTHONPATH}}
export PYTHONPATH=$REPO_ROOT${PYTHONPATH:+:${PYTHONPATH}}


if [[ "$TEST" == "upgrade" ]]; then
# Handle app label change:
sed -i "/require_pulp_plugins(/d" pulp_file/tests/functional/utils.py

# Running pre upgrade tests:
pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.pre
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.pre"

# Checking out ci_upgrade_test branch and upgrading plugins
cmd_prefix bash -c "cd pulpcore; git checkout -f ci_upgrade_test; pip install --upgrade --force-reinstall ."
Expand Down Expand Up @@ -157,25 +163,25 @@ if [[ "$TEST" == "upgrade" ]]; then
# Rebuilding bindings
cd ../pulp-openapi-generator
./generate.sh pulpcore python
pip install ./pulpcore-client
cmd_prefix pip3 install /root/pulp-openapi-generator/pulpcore-client
./generate.sh pulp_file python
pip install ./pulp_file-client
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_file-client
./generate.sh pulp_certguard python
pip install ./pulp_certguard-client
cmd_prefix pip3 install /root/pulp-openapi-generator/pulp_certguard-client
cd $REPO_ROOT

# Running post upgrade tests
git checkout ci_upgrade_test -- pulp_file/tests/
pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs --capture=no pulp_file.tests.upgrade.post"
exit
fi


if [[ "$TEST" == "performance" ]]; then
if [[ -z ${PERFORMANCE_TEST+x} ]]; then
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance
cmd_prefix bash -c "pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance"
else
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST
cmd_prefix bash -c "pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_file.tests.performance.test_$PERFORMANCE_TEST"
fi
exit
fi
Expand All @@ -185,20 +191,20 @@ if [ -f $FUNC_TEST_SCRIPT ]; then
else

if [[ "$GITHUB_WORKFLOW" == "File Nightly CI/CD" ]]; then
pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8
pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m "not parallel"
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m parallel -n 8"
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel'"


pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m "from_pulpcore_for_all_plugins and parallel" -n 8
pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m "from_pulpcore_for_all_plugins and not parallel"
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and parallel' -n 8"
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and not parallel'"

else
pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m "parallel and not nightly" -n 8
pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m "not parallel and not nightly"
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulp_file.tests.functional -m 'parallel and not nightly' -n 8"
cmd_prefix bash -c "pytest -v -r sx --color=yes --pyargs pulp_file.tests.functional -m 'not parallel and not nightly'"


pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m "from_pulpcore_for_all_plugins and not nightly and parallel" -n 8
pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m "from_pulpcore_for_all_plugins and not nightly and not parallel"
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and not nightly and parallel' -n 8"
cmd_prefix bash -c "pytest -v -r sx --color=yes --suppress-no-test-exit-code --pyargs pulpcore.tests.functional -m 'from_pulpcore_for_all_plugins and not nightly and not parallel'"

fi

Expand Down
4 changes: 2 additions & 2 deletions template_config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# 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 plugin_template@2021.08.26-129-gf780fda
# generated with plugin_template@2021.08.26-129-gf780fda-dirty

additional_repos:
- branch: main
name: pulp-certguard
aiohttp_fixtures_origin: 172.18.0.1
aiohttp_fixtures_origin: 127.0.0.1
api_root: /pulp/
black: true
check_commit_message: true
Expand Down