Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI files for branch 3.39 #5678

Merged
merged 1 commit into from
Aug 7, 2024
Merged
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
Update CI files
[noissue]
pulpbot committed Aug 7, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 8fe8b7cbe23b8e3227f7b80b83d54e9abae98f39
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-364-g6f9579c
2021.08.26-371-gc66a678
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -46,6 +46,9 @@ jobs:
run: |
python .ci/scripts/check_requirements.py

docs:
uses: "./.github/workflows/docs.yml"

lint:
uses: "./.github/workflows/lint.yml"

@@ -84,6 +87,7 @@ jobs:
- "check-commits"
- "lint"
- "test"
- "docs"
if: "always()"
steps:
- name: "Collect needed jobs results"
2 changes: 1 addition & 1 deletion .github/workflows/create-branch.yml
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ jobs:
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install bump2version jinja2 pyyaml packaging
pip install bump2version jinja2 pyyaml packaging requests
echo ::endgroup::

- name: "Setting secrets"
54 changes: 54 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --github pulpcore' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template

---
name: "Docs"
on:
workflow_call:

jobs:
test:
if: "endsWith(github.base_ref, 'main')"
runs-on: "ubuntu-20.04"
defaults:
run:
working-directory: "pulpcore"
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 1
path: "pulpcore"
- uses: "actions/setup-python@v5"
with:
python-version: "3.11"
- name: "Setup cache key"
run: |
git ls-remote https://github.com/pulp/pulp-docs main | tee pulp-docs-main-sha
- uses: "actions/cache@v4"
with:
path: "~/.cache/pip"
key: ${{ runner.os }}-pip-${{ hashFiles('pulp-docs-main-sha') }}
restore-keys: |
${{ runner.os }}-pip-
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install -r doc_requirements.txt
echo ::endgroup::
- name: "Build changelog"
run: |
towncrier build --yes --version 4.0.0.ci
- name: "Build docs"
run: |
pulp-docs build

no-test:
if: "!endsWith(github.base_ref, 'main')"
runs-on: "ubuntu-20.04"
steps:
- run: |
echo "Skip docs testing on non-main branches."
14 changes: 4 additions & 10 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -21,19 +21,15 @@ PLUGIN_SOURCE="./pulpcore/dist/pulpcore-${PLUGIN_VERSION}-py3-none-any.whl"
export PULP_API_ROOT="/pulp/"

PIP_REQUIREMENTS=("pulp-cli")
if [[ "$TEST" = "docs" || "$TEST" = "publish" ]]
if [[ "$TEST" = "publish" ]]
then
PIP_REQUIREMENTS+=("-r" "doc_requirements.txt")
PIP_REQUIREMENTS+=("psycopg2-binary")
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
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

cd .ci/ansible/
if [ "$TEST" = "s3" ]; then
@@ -137,9 +133,7 @@ if [ "${PULP_API_ROOT:-}" ]; then
fi

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

ansible-playbook build_container.yaml
ansible-playbook start_container.yaml
10 changes: 1 addition & 9 deletions .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
@@ -18,22 +18,14 @@ source .github/workflows/scripts/utils.sh
export POST_SCRIPT=$PWD/.github/workflows/scripts/post_script.sh
export FUNC_TEST_SCRIPT=$PWD/.github/workflows/scripts/func_test_script.sh

# Needed for both starting the service and building the docs.
# Needed for starting the service
# Gets set in .github/settings.yml, but doesn't seem to inherited by
# this script.
export DJANGO_SETTINGS_MODULE=pulpcore.app.settings
export PULP_SETTINGS=$PWD/.ci/ansible/settings/settings.py

export PULP_URL="https://pulp"

if [[ "$TEST" = "docs" ]]; then
if [[ "$GITHUB_WORKFLOW" == "Core CI" ]]; then
towncrier build --yes --version 4.0.0.ci
fi
pulp-docs build
exit
fi

REPORTED_STATUS="$(pulp status)"

echo "machine pulp
14 changes: 2 additions & 12 deletions doc_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --docs pulpcore' to update this file.
# './plugin-template --github pulpcore' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template
-r requirements.txt
towncrier

# Legacy docs
plantuml
sphinx~=7.1.2
sphinx-rtd-theme==1.3.0
sphinxcontrib-jquery
sphinxcontrib-openapi
mistune<4.0.0
Jinja2<3.2
# Extra requirements
pulp-docs @ git+https://github.com/pulp/pulp-docs@main
5 changes: 1 addition & 4 deletions 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 [email protected]364-g6f9579c
# generated with [email protected]371-gc66a678

api_root: /pulp/
black: true
@@ -12,7 +12,6 @@ check_stray_pulpcore_imports: false
ci_base_image: ghcr.io/pulp/pulp-ci-centos
ci_env: {}
ci_trigger: '{pull_request: {branches: [''*'']}}'
ci_update_docs: false
cli_package: pulp-cli
cli_repo: https://github.com/pulp/pulp-cli.git
core_import_allowed: []
@@ -21,9 +20,7 @@ deploy_client_to_rubygems: true
deploy_to_pypi: true
disabled_redis_runners:
- s3
doc_requirements_from_pulpcore: false
docker_fixtures: true
docs_test: false
flake8: true
flake8_ignore:
- ./pulpcore/app/protobuf/*