Skip to content

Commit 468d553

Browse files
authored
Merge pull request #332 from fao89/require_pulp_plugins
Update require_pulp_plugins
2 parents 100d50e + d2efc04 commit 468d553

15 files changed

Lines changed: 111 additions & 22 deletions

File tree

.ci/ansible/smash-config.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,5 @@
2929
}
3030
}
3131
}
32-
],
33-
"custom": {
34-
"fixtures_origin": "http://pulp-fixtures:8080/"
35-
}
32+
]
3633
}

.ci/ansible/start_container.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
follow_redirects: none
7575
register: result
7676
until: result.status == 200
77-
retries: 6
77+
retries: 12
7878
delay: 5
7979
rescue:
8080
- name: "Output pulp container log"

.ci/scripts/check_gettext.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
# WARNING: DO NOT EDIT!
4+
#
5+
# This file was generated by plugin_template, and is managed by it. Please use
6+
# './plugin-template --github pulp_python' to update this file.
7+
#
8+
# For more info visit https://github.com/pulp/plugin_template
9+
10+
# make sure this script runs at the repo root
11+
cd "$(dirname "$(realpath -e "$0")")"/../..
12+
13+
set -uv
14+
15+
# check for imports not from pulpcore.plugin. exclude tests
16+
MATCHES=$(grep -n -r --include \*.py "_(f")
17+
18+
if [ $? -ne 1 ]; then
19+
printf "\nERROR: Detected mix of f-strings and gettext:\n"
20+
echo "$MATCHES"
21+
exit 1
22+
fi

.ci/scripts/publish_client_gem.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ echo "---
1818
:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
1919
sudo chmod 600 ~/.gem/credentials
2020

21-
export REPORTED_VERSION=$(http pulp/pulp/api/v3/status/ | jq --arg plugin pulp_python -r '.versions[] | select(.component == $plugin) | .version')
21+
export REPORTED_VERSION=$(http pulp/pulp/api/v3/status/ | jq --arg plugin python -r '.versions[] | select(.component == $plugin) | .version')
2222
export DESCRIPTION="$(git describe --all --exact-match `git rev-parse HEAD`)"
2323
if [[ $DESCRIPTION == 'tags/'$REPORTED_VERSION ]]; then
2424
export VERSION=${REPORTED_VERSION}

.ci/scripts/publish_client_pypi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ cd "$(dirname "$(realpath -e "$0")")"/../..
1414

1515
pip install twine
1616

17-
export REPORTED_VERSION=$(http pulp/pulp/api/v3/status/ | jq --arg plugin pulp_python -r '.versions[] | select(.component == $plugin) | .version')
17+
export REPORTED_VERSION=$(http pulp/pulp/api/v3/status/ | jq --arg plugin python -r '.versions[] | select(.component == $plugin) | .version')
1818
export DESCRIPTION="$(git describe --all --exact-match `git rev-parse HEAD`)"
1919
if [[ $DESCRIPTION == 'tags/'$REPORTED_VERSION ]]; then
2020
export VERSION=${REPORTED_VERSION}

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ jobs:
5353
- name: Check for pulpcore imports outside of pulpcore.plugin
5454
run: sh .ci/scripts/check_pulpcore_imports.sh
5555

56+
- name: Check for gettext problems
57+
run: sh .ci/scripts/check_gettext.sh
58+
5659
test:
5760
runs-on: ubuntu-latest
5861
# run only after lint finishes
@@ -120,3 +123,4 @@ jobs:
120123
docker logs pulp || true
121124
docker exec pulp ls -latr /etc/yum.repos.d/ || true
122125
docker exec pulp cat /etc/yum.repos.d/* || true
126+
docker exec pulp pip3 list

.github/workflows/fips.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# WARNING: DO NOT EDIT!
2+
#
3+
# This file was generated by plugin_template, and is managed by it. Please use
4+
# './plugin-template --github pulp_python' to update this file.
5+
#
6+
# For more info visit https://github.com/pulp/plugin_template
7+
---
8+
name: Pulp FIPS CI
9+
on:
10+
11+
workflow_dispatch:
12+
13+
jobs:
14+
vagrant:
15+
runs-on: ubuntu-20.04
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- test_type: pulp3-source-centos8-fips
21+
- test_type: pulp3-source-centos7-fips
22+
steps:
23+
- uses: actions/checkout@v2.3.1
24+
with:
25+
submodules: true
26+
- name: Set up Python
27+
uses: actions/setup-python@v2
28+
with:
29+
python-version: 3.7
30+
- name: Ansible
31+
run: |
32+
pip3 install -U pip
33+
pip3 install "ansible>2.9,<3"
34+
ansible --version
35+
- name: Pulp Installer
36+
run: |
37+
cd ..
38+
git clone --depth=1 https://github.com/pulp/pulp_installer
39+
- name: Install Vagrant
40+
shell: bash
41+
run: |
42+
cd ../pulp_installer/
43+
git submodule update --init
44+
.github/workflows/scripts/install.sh ${{ matrix.test_type }}
45+
cd ..
46+
git clone https://github.com/pulp/pulpcore
47+
- name: Run Vagrant
48+
shell: bash
49+
run: |
50+
cd ../pulp_installer
51+
sed -e "s/pulp-file/pulp-python/g" -e "s/pulp_file/pulp_python/g" -e "/pulp_source_dir/a pulp_webserver_disable_https: true" example.dev-config.yml > local.dev-config.yml
52+
echo "vagrant ssh \$1 -c \"workon pulp && cd devel/pulp_python && pip install -r functest_requirements.txt\"" >> .github/workflows/scripts/script.sh
53+
echo "vagrant ssh \$1 -c \"workon pulp && cd devel/pulp_python/ && pytest -v -r sx --color=yes --pyargs pulp_python.tests.functional\"" >> .github/workflows/scripts/script.sh
54+
.github/workflows/scripts/script.sh ${{ matrix.test_type }}
55+
env:
56+
PY_COLORS: '1'
57+
ANSIBLE_FORCE_COLOR: '1'
58+
- name: After failure
59+
if: failure()
60+
run: |
61+
cd ../pulp_installer
62+
.github/workflows/scripts/after_failure.sh ${{ matrix.test_type }}

.github/workflows/nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,4 @@ jobs:
146146
docker logs pulp || true
147147
docker exec pulp ls -latr /etc/yum.repos.d/ || true
148148
docker exec pulp cat /etc/yum.repos.d/* || true
149+
docker exec pulp pip3 list

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,4 @@ jobs:
138138
docker logs pulp || true
139139
docker exec pulp ls -latr /etc/yum.repos.d/ || true
140140
docker exec pulp cat /etc/yum.repos.d/* || true
141+
docker exec pulp pip3 list

.github/workflows/scripts/install.sh

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ REPO_ROOT="$PWD"
1313

1414
set -euv
1515

16+
source .github/workflows/scripts/utils.sh
17+
1618
if [ "${GITHUB_REF##refs/tags/}" = "${GITHUB_REF}" ]
1719
then
1820
TAG_BUILD=0
@@ -75,12 +77,9 @@ cat >> vars/main.yaml << VARSYAML
7577
pulp_settings: null
7678
VARSYAML
7779

78-
if [[ "$TEST" == "pulp" || "$TEST" == "performance" || "$TEST" == "s3" || "$TEST" == "plugin-from-pypi" ]]; then
79-
sed -i -e '/^services:/a \
80-
- name: pulp-fixtures\
81-
image: docker.io/pulp/pulp-fixtures:latest\
82-
env: {BASE_URL: "http://pulp-fixtures:8080"}' vars/main.yaml
83-
fi
84-
8580
ansible-playbook build_container.yaml
8681
ansible-playbook start_container.yaml
82+
83+
echo ::group::PIP_LIST
84+
cmd_prefix bash -c "pip3 list && pip3 install pipdeptree && pipdeptree"
85+
echo ::endgroup::

0 commit comments

Comments
 (0)