Skip to content

Commit

Permalink
Update CI, enable docs template
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
mdellweg committed Sep 18, 2023
1 parent edc9970 commit d5a64a6
Show file tree
Hide file tree
Showing 19 changed files with 201 additions and 165 deletions.
70 changes: 0 additions & 70 deletions .ci/scripts/changelog.py

This file was deleted.

7 changes: 0 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,3 @@ updates:
open-pull-requests-limit: 10
commit-message:
prefix: "[noissue]"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
commit-message:
prefix: "[noissue]"
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-246-g98b439a
2021.08.26-247-g1ee39ae
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
ready-to-ship:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install requirements
Expand All @@ -45,7 +45,7 @@ jobs:
name: Assert single commit
if: github.base_ref == 'main'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout main
Expand All @@ -59,10 +59,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
# lint_requirements contains tools needed for flake8, etc.
Expand Down Expand Up @@ -112,11 +112,11 @@ jobs:
deprecations-lowerbounds: ${{ steps.deprecations.outputs.deprecations-lowerbounds }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"

Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
GITHUB_REPO_SLUG: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
REDIS_DISABLED: ${{ contains('', matrix.env.TEST) }}
REDIS_DISABLED: ${{ contains('s3', matrix.env.TEST) }}

- name: Setting secrets
if: github.event_name != 'pull_request'
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/create-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
name: Create New Release Branch
on:
workflow_dispatch:
inputs:
name:
description: "Branch name (e.g. 3.14)"
required: true

env:
RELEASE_WORKFLOW: true
Expand All @@ -25,12 +21,12 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
fetch-depth: 0
path: pulp_maven

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"

Expand All @@ -46,26 +42,27 @@ jobs:
env:
SECRETS_CONTEXT: ${{ toJson(secrets) }}

- name: Verify that branch name matches current version string on main branch
- name: Determine new branch name
working-directory: pulp_maven
run: |
X_Y_VERSION=$(grep version setup.py | sed -rn 's/version="(.*)\.0((a[0-9]+)|(b[0-9]+))?\.dev",/\1/p' | awk '{$1=$1};1')
if [[ "$X_Y_VERSION" != "${{ inputs.name }}" ]]
# Just to be sure...
git checkout main
NEW_BRANCH="$(bump2version --dry-run --list release | sed -Ene 's/^new_version=([[:digit:]]+\.[[:digit:]]+)\..*$/\1/p')"
if [ -z "$NEW_BRANCH" ]
then
echo "Branch name doesn't match the current version string $X_Y_VERSION."
echo Could not determine the new branch name.
exit 1
fi
echo "NEW_BRANCH=${NEW_BRANCH}" >> "$GITHUB_ENV"
- name: Create ${{ inputs.name }} release branch
- name: Create release branch
working-directory: pulp_maven
run: |
git checkout -b ${{ inputs.name }}
git push origin ${{ inputs.name }}
git branch "${NEW_BRANCH}"
- name: Bump version on main branch
working-directory: pulp_maven
run: |
git checkout main
bump2version --no-commit minor
- name: Remove entries from CHANGES directory
Expand All @@ -88,3 +85,8 @@ jobs:
Bump minor version
[noissue]
delete-branch: true

- name: Push release branch
working-directory: pulp_maven
run: |
git push origin "${NEW_BRANCH}"
16 changes: 8 additions & 8 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:
- TEST: lowerbounds

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"

Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
GITHUB_REPO_SLUG: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
REDIS_DISABLED: ${{ contains('', matrix.env.TEST) }}
REDIS_DISABLED: ${{ contains('s3', matrix.env.TEST) }}

- name: Setting secrets
run: python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT"
Expand Down Expand Up @@ -168,11 +168,11 @@ jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"

Expand Down Expand Up @@ -207,11 +207,11 @@ jobs:
TEST: publish

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"

Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
GITHUB_REPO_SLUG: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
REDIS_DISABLED: ${{ contains('', matrix.env.TEST) }}
REDIS_DISABLED: ${{ contains('s3', matrix.env.TEST) }}

- name: Setting secrets
run: python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"

Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
with:
name: pulp_maven.tar

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- uses: ruby/setup-ruby@v1
Expand Down Expand Up @@ -201,7 +201,7 @@ jobs:
with:
name: pulp_maven.tar

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ PIP_REQUIREMENTS=("pulp-cli-maven")
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[*]}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
update_backport_labels:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Configure Git with pulpbot name and email
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
path: plugin_template
fetch-depth: 0

- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
with:
python-version: "3.8"

Expand Down
20 changes: 12 additions & 8 deletions doc_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
coreapi
django
djangorestframework
django-filter
drf-nested-routers
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --docs pulp_maven' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template
-r requirements.txt
plantuml
pyyaml
sphinx
sphinx-rtd-theme
sphinx~=7.1.2
sphinx-rtd-theme==1.3.0
sphinxcontrib-jquery
sphinxcontrib-openapi
towncrier
mistune<4.0.0
Jinja2<3.2
Loading

0 comments on commit d5a64a6

Please sign in to comment.