Skip to content

Commit

Permalink
Update CI files (#1447)
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pulpbot committed May 10, 2023
1 parent 3e1d6b1 commit 4fd307a
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-207-g81d81f6
2021.08.26-213-ge6bd9ec
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
---
name: Ansible CI
on: {pull_request: {branches: ['*']}}

concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true

jobs:

ready-to-ship:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
schedule:
- cron: '37 1 * * 6'

concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
- cron: '00 3 * * *'
workflow_dispatch:

concurrency:
group: ${{ github.ref_name }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
fetch-depth: 0

- uses: actions/setup-python@v3
with:
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/scripts/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ cd ..

git clone --depth=1 https://github.com/pulp/pulp-openapi-generator.git

pip install pulp-cli

PULP_CLI_VERSION="$(pip freeze | sed -n -e 's/pulp-cli==//p')"
git clone --depth 1 --branch "$PULP_CLI_VERSION" https://github.com/pulp/pulp-cli.git


# Intall requirements for ansible playbooks
pip install docker netaddr boto3 ansible

Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@ source .github/workflows/scripts/utils.sh

export PULP_API_ROOT="/pulp/"

if [[ "$TEST" = "docs" || "$TEST" = "publish" ]]; then
cd ..
git clone https://github.com/pulp/pulpcore.git
cd -
pip install -r ../pulpcore/doc_requirements.txt
pip install -r doc_requirements.txt
PIP_REQUIREMENTS=("pulp-cli")
if [[ "$TEST" = "docs" || "$TEST" = "publish" ]]
then
PIP_REQUIREMENTS+=("-r" "doc_requirements.txt")
git clone https://github.com/pulp/pulpcore.git ../pulpcore
PIP_REQUIREMENTS+=("psycopg2-binary" "-r" "../pulpcore/doc_requirements.txt")
fi

pip install ${PIP_REQUIREMENTS[*]}

if [[ "$TEST" != "docs" ]]
then
PULP_CLI_VERSION="$(pip freeze | sed -n -e 's/pulp-cli==//p')"
git clone --depth 1 --branch "$PULP_CLI_VERSION" https://github.com/pulp/pulp-cli.git ../pulp-cli
fi

cd .ci/ansible/
Expand Down Expand Up @@ -121,7 +129,9 @@ if [ "${PULP_API_ROOT:-}" ]; then
fi

pulp config create --base-url https://pulp --api-root "$PULP_API_ROOT"
cp ~/.config/pulp/cli.toml "${REPO_ROOT}/../pulp-cli/tests/cli.toml"
if [[ "$TEST" != "docs" ]]; then
cp ~/.config/pulp/cli.toml "${REPO_ROOT}/../pulp-cli/tests/cli.toml"
fi

ansible-playbook build_container.yaml
ansible-playbook start_container.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ cmd_prefix bash -c "cat /etc/pulp/certs/pulp_webserver.crt | tee -a "$CERTIFI"

# check for any uncommitted migrations
echo "Checking for uncommitted migrations..."
cmd_user_prefix bash -c "django-admin makemigrations --check --dry-run"
cmd_user_prefix bash -c "django-admin makemigrations ansible --check --dry-run"

# Run unit tests.
cmd_user_prefix bash -c "PULP_DATABASES__default__USER=postgres pytest -v -r sx --color=yes -p no:pulpcore --pyargs pulp_ansible.tests.unit"
Expand Down
3 changes: 2 additions & 1 deletion template_config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 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-202-g6f2c165
# generated with plugin_template@2021.08.26-213-ge6bd9ec

additional_repos: []
api_root: /pulp/
Expand All @@ -25,6 +25,7 @@ deploy_client_to_rubygems: true
deploy_to_pypi: true
disabled_redis_runners:
- s3
doc_requirements_from_pulpcore: true
docker_fixtures: false
docs_test: true
flake8: true
Expand Down

0 comments on commit 4fd307a

Please sign in to comment.