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 from main branch #270

Merged
merged 1 commit into from
Jul 3, 2023
Merged
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: 3 additions & 1 deletion .ci/scripts/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def get_changelog_releases(changelog):
Get all versions in changelog.

"""
versions = re.findall(r"([0-9]+)\.([0-9]+)\.([0-9]+) \(", changelog)
versions = re.findall(
r"([0-9]+)\.([0-9]+)\.([0-9][0-9ab]*) \([0-9]{4}-[0-9]{2}-[0-9]{2}\)", changelog
)
return {".".join(v) for v in versions}


Expand Down
13 changes: 7 additions & 6 deletions .ci/scripts/check_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,13 @@
else:
errors.append(f"{filename}:{nr}: Unreadable requirement {line}")
else:
if not line.startswith("opentelemetry"):
if check_prereleases and req.specifier.prereleases:
if req.name != "pulp-certguard-client":
errors.append(
f"{filename}:{nr}: Prerelease versions found in {line}."
)
if check_prereleases and req.specifier.prereleases:
# Do not even think about begging for more exceptions!
if (
not req.name.startswith("opentelemetry")
and req.name != "pulp-certguard-client"
):
errors.append(f"{filename}:{nr}: Prerelease versions found in {line}.")
ops = [op for op, ver in req.specs]
spec = str(req.specs)
if "~=" in ops:
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-219-g66afab8
2021.08.26-225-gbfce9ef
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ jobs:
- name: Build docs
run: |
pip install towncrier==19.9.0
towncrier --yes --version 4.0.0.ci
towncrier --yes
export DJANGO_SETTINGS_MODULE=pulpcore.app.settings
export PULP_SETTINGS=$PWD/.ci/ansible/settings/settings.py
make -C docs/ PULP_URL="https://pulp" diagrams html
tar -cvf docs/docs.tar docs/_build

Expand Down Expand Up @@ -251,7 +253,7 @@ jobs:

- name: Publish docs to pulpproject.org
run: |
tar -xvf docs.tar -C ./docs
tar -xvf docs.tar
.github/workflows/scripts/publish_docs.sh tag ${{ github.event.inputs.release }}
- name: Deploy plugin to pypi
run: bash .github/workflows/scripts/publish_plugin_pypi.sh ${{ github.event.inputs.release }}
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/scripts/update_ci.sh
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
#!/usr/bin/env bash
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --github pulp_certguard' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template

set -eu

if [ ! -d ../plugin_template ]; then
echo "Checking out plugin_template"
git clone https://github.com/pulp/plugin_template.git ../plugin_template
fi


if [ ! -f "template_config.yml" ]; then
echo "No template_config.yml detected."
exit 1
fi

pip install -r ../plugin_template/test_requirements.txt

pushd ../plugin_template
pip install -r test_requirements.txt
./plugin-template --github pulp-certguard
popd

# Check if only gitref file has changed, so no effect on CI workflows.
if [[ `git diff --name-only` == ".github/template_gitref" ]]; then
echo "CI update has no effect on workflows, skipping PR creation."
git stash
exit 0
if [[ $(git diff --name-only) == ".github/template_gitref" ]]; then
echo "No changes detected in github section."
git restore ".github/template_gitref"
fi

if [[ `git status --porcelain` ]]; then
if [[ $(git status --porcelain) ]]; then
git add -A
git commit -m "Update CI files" -m "[noissue]"
else
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/update_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
with:
fetch-depth: 1

- uses: actions/checkout@v3
with:
repository: pulp/plugin_template
path: ../plugin_template

- uses: actions/setup-python@v3
with:
python-version: "3.8"
Expand Down
4 changes: 3 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-212-g18b9346
# generated with plugin_template@2021.08.26-225-gbfce9ef

additional_repos:
- branch: main
Expand All @@ -17,6 +17,7 @@ ci_trigger: '{pull_request: {branches: [''*'']}}'
ci_update_branches:
- 1.5
- 1.6
ci_update_docs: false
cli_package: pulp-cli
cli_repo: https://github.com/pulp/pulp-cli.git
core_import_allowed: []
Expand All @@ -28,6 +29,7 @@ disabled_redis_runners:
doc_requirements_from_pulpcore: false
docker_fixtures: false
docs_test: true
extra_docs_requirements: []
flake8: true
flake8_ignore: []
github_org: pulp
Expand Down
Loading