Skip to content

Commit a296ab7

Browse files
authored
Merge pull request #538 from pulp/create-pull-request/main/patch
Update CI files from main branch
2 parents 074142a + ee26e9b commit a296ab7

File tree

4 files changed

+1
-215
lines changed

4 files changed

+1
-215
lines changed

.github/template_gitref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.08.26-135-gf245075
1+
2021.08.26-136-ga3c43d7

.github/workflows/ci.yml

Lines changed: 0 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -205,134 +205,6 @@ jobs:
205205
docker exec pulp ls -latr /etc/yum.repos.d/ || true
206206
docker exec pulp cat /etc/yum.repos.d/* || true
207207
docker exec pulp pip3 list
208-
209-
upgrade:
210-
runs-on: ubuntu-latest
211-
needs: lint
212-
213-
strategy:
214-
fail-fast: false
215-
matrix:
216-
env:
217-
- TEST: upgrade
218-
FROM_PULPCORE_BRANCH: "3.11"
219-
FROM_PULP_PYTHON_BRANCH: "3.2"
220-
outputs:
221-
deprecations-upgrade: ${{ steps.deprecations.outputs.deprecations-upgrade }}
222-
223-
steps:
224-
- uses: actions/checkout@v3
225-
with:
226-
# by default, it uses a depth of 1
227-
# this fetches all history so that we can read each commit
228-
fetch-depth: 0
229-
230-
- uses: actions/setup-python@v3
231-
with:
232-
python-version: "3.8"
233-
234-
- name: Install httpie
235-
run: |
236-
echo ::group::HTTPIE
237-
pip install httpie
238-
echo ::endgroup::
239-
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/.ci/assets/httpie/" >> $GITHUB_ENV
240-
241-
- name: Set environment variables
242-
run: |
243-
echo "TEST=${{ matrix.env.TEST }}" >> $GITHUB_ENV
244-
echo "FROM_PULP_PYTHON_BRANCH=${{ matrix.env.FROM_PULP_PYTHON_BRANCH }}" >> $GITHUB_ENV
245-
echo "FROM_PULPCORE_BRANCH=${{ matrix.env.FROM_PULPCORE_BRANCH }}" >> $GITHUB_ENV
246-
247-
- name: Install python dependencies
248-
run: |
249-
echo ::group::PYDEPS
250-
pip install wheel
251-
echo ::endgroup::
252-
253-
- name: Before Install
254-
255-
run: .github/workflows/scripts/before_install.sh
256-
shell: bash
257-
env:
258-
PY_COLORS: '1'
259-
ANSIBLE_FORCE_COLOR: '1'
260-
GITHUB_PULL_REQUEST: ${{ github.event.number }}
261-
GITHUB_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }}
262-
GITHUB_BRANCH: ${{ github.head_ref }}
263-
GITHUB_REPO_SLUG: ${{ github.repository }}
264-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
265-
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
266-
267-
- name: Install
268-
269-
run: .github/workflows/scripts/install.sh
270-
shell: bash
271-
env:
272-
PY_COLORS: '1'
273-
ANSIBLE_FORCE_COLOR: '1'
274-
GITHUB_PULL_REQUEST: ${{ github.event.number }}
275-
GITHUB_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }}
276-
GITHUB_BRANCH: ${{ github.head_ref }}
277-
GITHUB_REPO_SLUG: ${{ github.repository }}
278-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
279-
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
280-
281-
- name: Install Python client
282-
283-
run: .github/workflows/scripts/install_python_client.sh
284-
shell: bash
285-
286-
- name: Before Script
287-
288-
run: .github/workflows/scripts/before_script.sh
289-
shell: bash
290-
env:
291-
PY_COLORS: '1'
292-
ANSIBLE_FORCE_COLOR: '1'
293-
GITHUB_PULL_REQUEST: ${{ github.event.number }}
294-
GITHUB_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }}
295-
GITHUB_BRANCH: ${{ github.head_ref }}
296-
GITHUB_REPO_SLUG: ${{ github.repository }}
297-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
298-
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
299-
REDIS_DISABLED: ${{ contains('', matrix.env.TEST) }}
300-
301-
- name: Setting secrets
302-
303-
run: python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT"
304-
env:
305-
SECRETS_CONTEXT: ${{ toJson(secrets) }}
306-
307-
- name: Upgrade Test
308-
309-
run: .github/workflows/scripts/script.sh
310-
shell: bash
311-
env:
312-
PY_COLORS: '1'
313-
ANSIBLE_FORCE_COLOR: '1'
314-
GITHUB_PULL_REQUEST: ${{ github.event.number }}
315-
GITHUB_PULL_REQUEST_BODY: ${{ github.event.pull_request.body }}
316-
GITHUB_BRANCH: ${{ github.head_ref }}
317-
GITHUB_REPO_SLUG: ${{ github.repository }}
318-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
319-
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
320-
321-
- name: Extract Deprecations from Logs
322-
id: deprecations
323-
run: echo "::set-output name=deprecations-${{ matrix.env.TEST }}::$(docker logs pulp 2>&1 | grep -i pulpcore.deprecation | base64 -w 0)"
324-
325-
- name: Logs
326-
if: always()
327-
run: |
328-
echo "Need to debug? Please check: https://github.com/marketplace/actions/debugging-with-tmate"
329-
http --timeout 30 --check-status --pretty format --print hb "https://pulp${PULP_API_ROOT}api/v3/status/" || true
330-
docker images || true
331-
docker ps -a || true
332-
docker logs pulp || true
333-
docker exec pulp ls -latr /etc/yum.repos.d/ || true
334-
docker exec pulp cat /etc/yum.repos.d/* || true
335-
docker exec pulp pip3 list
336208
deprecations:
337209
runs-on: ubuntu-latest
338210
if: always()
@@ -343,13 +215,11 @@ jobs:
343215
test -z "${{ needs.test.outputs.deprecations-pulp }}"
344216
test -z "${{ needs.test.outputs.deprecations-azure }}"
345217
test -z "${{ needs.test.outputs.deprecations-s3 }}"
346-
test -z "${{ needs.test.outputs.deprecations-upgrade }}"
347218
- name: Print deprecations
348219
if: failure()
349220
run: |
350221
echo "${{ needs.test.outputs.deprecations-pulp }}" | base64 -d
351222
echo "${{ needs.test.outputs.deprecations-azure }}" | base64 -d
352223
echo "${{ needs.test.outputs.deprecations-s3 }}" | base64 -d
353-
echo "${{ needs.test.outputs.deprecations-upgrade }}" | base64 -d
354224
355225

.github/workflows/scripts/before_install.sh

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -104,21 +104,6 @@ if [ -n "$PULP_OPENAPI_GENERATOR_PR_NUMBER" ]; then
104104
fi
105105

106106

107-
git clone --depth=1 https://github.com/pulp/pulp-cli.git
108-
if [ -n "$PULP_CLI_PR_NUMBER" ]; then
109-
cd pulp-cli
110-
git fetch origin pull/$PULP_CLI_PR_NUMBER/head:$PULP_CLI_PR_NUMBER
111-
git checkout $PULP_CLI_PR_NUMBER
112-
cd ..
113-
fi
114-
115-
cd pulp-cli
116-
pip install -e .
117-
pulp config create --base-url https://pulp --location tests/cli.toml
118-
mkdir ~/.config/pulp
119-
cp tests/cli.toml ~/.config/pulp/cli.toml
120-
cd ..
121-
122107

123108
git clone --depth=1 https://github.com/pulp/pulpcore.git --branch main
124109

@@ -131,16 +116,6 @@ fi
131116
cd ..
132117

133118

134-
135-
if [[ "$TEST" == "upgrade" ]]; then
136-
cd pulpcore
137-
git checkout -b ci_upgrade_test
138-
git fetch --depth=1 origin heads/$FROM_PULPCORE_BRANCH:$FROM_PULPCORE_BRANCH
139-
git checkout $FROM_PULPCORE_BRANCH
140-
cd ..
141-
fi
142-
143-
144119
# Intall requirements for ansible playbooks
145120
pip install docker netaddr boto3 ansible
146121

.github/workflows/scripts/script.sh

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -98,65 +98,6 @@ fi
9898
# Run functional tests
9999
export PYTHONPATH=$REPO_ROOT${PYTHONPATH:+:${PYTHONPATH}}
100100

101-
102-
if [[ "$TEST" == "upgrade" ]]; then
103-
# Handle app label change:
104-
sed -i "/require_pulp_plugins(/d" pulp_python/tests/functional/utils.py
105-
106-
# Running pre upgrade tests:
107-
pytest -v -r sx --color=yes --pyargs --capture=no pulp_python.tests.upgrade.pre
108-
109-
# Checking out ci_upgrade_test branch and upgrading plugins
110-
cmd_prefix bash -c "cd pulpcore; git checkout -f ci_upgrade_test; pip install --upgrade --force-reinstall ."
111-
cmd_prefix bash -c "cd pulp_python; git checkout -f ci_upgrade_test; pip install ."
112-
113-
# Migrating
114-
cmd_prefix bash -c "django-admin migrate --no-input"
115-
116-
# Restarting single container services
117-
cmd_prefix bash -c "s6-svc -r /var/run/s6/services/pulpcore-api"
118-
cmd_prefix bash -c "s6-svc -r /var/run/s6/services/pulpcore-content"
119-
cmd_prefix bash -c "s6-svc -d /var/run/s6/services/pulpcore-resource-manager"
120-
cmd_prefix bash -c "s6-svc -d /var/run/s6/services/pulpcore-worker@1"
121-
cmd_prefix bash -c "s6-svc -d /var/run/s6/services/pulpcore-worker@2"
122-
cmd_prefix bash -c "s6-svc -u /var/run/s6/services/new-pulpcore-resource-manager"
123-
cmd_prefix bash -c "s6-svc -u /var/run/s6/services/new-pulpcore-worker@1"
124-
cmd_prefix bash -c "s6-svc -u /var/run/s6/services/new-pulpcore-worker@2"
125-
126-
echo "Restarting in 60 seconds"
127-
sleep 60
128-
129-
# Let's reinstall pulpcore so we can ensure we have the correct dependencies
130-
cd ../pulpcore
131-
git checkout -f ci_upgrade_test
132-
pip install --upgrade --force-reinstall . ../pulp-cli ../pulp-smash
133-
# Hack: adding pulp CA to certifi.where()
134-
CERTIFI=$(python -c 'import certifi; print(certifi.where())')
135-
cat /usr/local/share/ca-certificates/pulp_webserver.crt | sudo tee -a "$CERTIFI" > /dev/null
136-
# CLI commands to display plugin versions and content data
137-
pulp status
138-
pulp content list
139-
CONTENT_LENGTH=$(pulp content list | jq length)
140-
if [[ "$CONTENT_LENGTH" == "0" ]]; then
141-
echo "Empty content list"
142-
exit 1
143-
fi
144-
145-
# Rebuilding bindings
146-
cd ../pulp-openapi-generator
147-
./generate.sh pulpcore python
148-
pip install ./pulpcore-client
149-
./generate.sh pulp_python python
150-
pip install ./pulp_python-client
151-
cd $REPO_ROOT
152-
153-
# Running post upgrade tests
154-
git checkout ci_upgrade_test -- pulp_python/tests/
155-
pytest -v -r sx --color=yes --pyargs --capture=no pulp_python.tests.upgrade.post
156-
exit
157-
fi
158-
159-
160101
if [[ "$TEST" == "performance" ]]; then
161102
if [[ -z ${PERFORMANCE_TEST+x} ]]; then
162103
pytest -vv -r sx --color=yes --pyargs --capture=no --durations=0 pulp_python.tests.performance

0 commit comments

Comments
 (0)