Skip to content

Commit 24a5c8f

Browse files
pulpbotmdellweg
authored andcommitted
Update CI files
[noissue]
1 parent 8d55651 commit 24a5c8f

13 files changed

+74
-145
lines changed

.ci/scripts/validate_commit_message.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,17 @@
99
import sys
1010
from pathlib import Path
1111
import subprocess
12-
13-
1412
import os
1513
import warnings
1614
from github import Github
1715

18-
1916
NO_ISSUE = "[noissue]"
2017
CHANGELOG_EXTS = [".feature", ".bugfix", ".doc", ".removal", ".misc", ".deprecation"]
18+
KEYWORDS = ["fixes", "closes"]
19+
2120
sha = sys.argv[1]
2221
message = subprocess.check_output(["git", "log", "--format=%B", "-n 1", sha]).decode("utf-8")
2322

24-
25-
KEYWORDS = ["fixes", "closes"]
26-
2723
g = Github(os.environ.get("GITHUB_TOKEN"))
2824
repo = g.get_repo("pulp/pulp_npm")
2925

.github/template_gitref

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.08.26-361-gcd6f9f0
1+
2021.08.26-378-g72f4b38

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
- "check-commits"
8585
- "lint"
8686
- "test"
87+
- "docs"
8788
if: "always()"
8889
steps:
8990
- name: "Collect needed jobs results"

.github/workflows/create-branch.yml

+7-8
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,20 @@ jobs:
2626
fetch-depth: 0
2727
path: "pulp_npm"
2828

29+
- uses: "actions/checkout@v4"
30+
with:
31+
fetch-depth: 1
32+
repository: "pulp/plugin_template"
33+
path: "plugin_template"
34+
2935
- uses: "actions/setup-python@v5"
3036
with:
3137
python-version: "3.11"
3238

3339
- name: "Install python dependencies"
3440
run: |
3541
echo ::group::PYDEPS
36-
pip install bump2version jinja2 pyyaml packaging
42+
pip install bump2version packaging -r plugin_template/requirements.txt
3743
echo ::endgroup::
3844
3945
- name: "Setting secrets"
@@ -71,13 +77,6 @@ jobs:
7177
run: |
7278
find CHANGES -type f -regex ".*\.\(bugfix\|doc\|feature\|misc\|deprecation\|removal\)" -exec git rm {} +
7379
74-
- name: Checkout plugin template
75-
uses: actions/checkout@v4
76-
with:
77-
repository: pulp/plugin_template
78-
path: plugin_template
79-
fetch-depth: 0
80-
8180
- name: Update CI branches in template_config
8281
working-directory: plugin_template
8382
run: |

.github/workflows/docs.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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_npm' to update this file.
5+
#
6+
# For more info visit https://github.com/pulp/plugin_template
7+
8+
---
9+
name: "Docs"
10+
on:
11+
workflow_call:
12+
13+
jobs:
14+
test:
15+
if: "endsWith(github.base_ref, 'main')"
16+
runs-on: "ubuntu-20.04"
17+
defaults:
18+
run:
19+
working-directory: "pulp_npm"
20+
steps:
21+
- uses: "actions/checkout@v4"
22+
with:
23+
fetch-depth: 1
24+
path: "pulp_npm"
25+
- uses: "actions/setup-python@v5"
26+
with:
27+
python-version: "3.11"
28+
- name: "Setup cache key"
29+
run: |
30+
git ls-remote https://github.com/pulp/pulp-docs main | tee pulp-docs-main-sha
31+
- uses: "actions/cache@v4"
32+
with:
33+
path: "~/.cache/pip"
34+
key: ${{ runner.os }}-pip-${{ hashFiles('pulp-docs-main-sha') }}
35+
restore-keys: |
36+
${{ runner.os }}-pip-
37+
- name: "Install python dependencies"
38+
run: |
39+
echo ::group::PYDEPS
40+
pip install -r doc_requirements.txt
41+
echo ::endgroup::
42+
- name: "Build changelog"
43+
run: |
44+
towncrier build --yes --version 4.0.0.ci
45+
- name: "Build docs"
46+
run: |
47+
pulp-docs build
48+
49+
no-test:
50+
if: "!endsWith(github.base_ref, 'main')"
51+
runs-on: "ubuntu-20.04"
52+
steps:
53+
- run: |
54+
echo "Skip docs testing on non-main branches."

.github/workflows/kanban.yml

-103
This file was deleted.

.github/workflows/scripts/before_install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ fi
5757

5858
for i in {1..3}
5959
do
60-
ansible-galaxy collection install "amazon.aws:1.5.0" && s=0 && break || s=$? && sleep 3
60+
ansible-galaxy collection install "amazon.aws:8.1.0" && s=0 && break || s=$? && sleep 3
6161
done
6262
if [[ $s -gt 0 ]]
6363
then

.github/workflows/scripts/install.sh

+1-4
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,8 @@ PLUGIN_SOURCE="./pulp_npm/dist/pulp_npm-${PLUGIN_VERSION}-py3-none-any.whl"
2121
export PULP_API_ROOT="/pulp/"
2222

2323
PIP_REQUIREMENTS=("pulp-cli")
24-
if [[ "$TEST" = "docs" || "$TEST" = "publish" ]]
25-
then
26-
PIP_REQUIREMENTS+=("-r" "doc_requirements.txt")
27-
fi
2824

25+
# This must be the **only** call to "pip install" on the test runner.
2926
pip install ${PIP_REQUIREMENTS[*]}
3027

3128

.github/workflows/scripts/script.sh

+1-9
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,14 @@ source .github/workflows/scripts/utils.sh
1818
export POST_SCRIPT=$PWD/.github/workflows/scripts/post_script.sh
1919
export FUNC_TEST_SCRIPT=$PWD/.github/workflows/scripts/func_test_script.sh
2020

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

2727
export PULP_URL="https://pulp"
2828

29-
if [[ "$TEST" = "docs" ]]; then
30-
if [[ "$GITHUB_WORKFLOW" == "Npm CI" ]]; then
31-
towncrier build --yes --version 4.0.0.ci
32-
fi
33-
pulp-docs build
34-
exit
35-
fi
36-
3729
REPORTED_STATUS="$(pulp status)"
3830

3931
echo "machine pulp

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
- name: "Install python dependencies"
7272
run: |
7373
echo ::group::PYDEPS
74-
pip install towncrier twine wheel httpie docker netaddr boto3 ansible mkdocs jq jsonpatch
74+
pip install towncrier twine wheel httpie docker netaddr boto3 'ansible~=10.3.0' mkdocs jq jsonpatch
7575
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/pulp_npm/.ci/assets/httpie/" >> $GITHUB_ENV
7676
echo ::endgroup::
7777

.github/workflows/update_ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ name: "Npm CI Update"
1111
on:
1212
schedule:
1313
# * is a special character in YAML so you have to quote this string
14-
# runs at 2:30 UTC every Sunday
15-
- cron: '30 2 * * 0'
14+
# runs at 19:30 UTC every Sunday
15+
- cron: '30 19 * * 0'
1616
workflow_dispatch:
1717

1818
jobs:
@@ -36,7 +36,7 @@ jobs:
3636
- name: "Install python dependencies"
3737
run: |
3838
echo ::group::PYDEPS
39-
pip install gitpython requests packaging jinja2 pyyaml
39+
pip install gitpython packaging -r plugin_template/requirements.txt
4040
echo ::endgroup::
4141
4242
- name: "Configure Git with pulpbot name and email"

doc_requirements.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
# WARNING: DO NOT EDIT!
22
#
33
# This file was generated by plugin_template, and is managed by it. Please use
4-
# './plugin-template --docs pulp_npm' to update this file.
4+
# './plugin-template --github pulp_npm' to update this file.
55
#
66
# For more info visit https://github.com/pulp/plugin_template
7-
-r requirements.txt
87
towncrier
9-
108
pulp-docs @ git+https://github.com/pulp/pulp-docs@main

template_config.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This config represents the latest values used when running the plugin-template. Any settings that
22
# were not present before running plugin-template have been added with their default values.
33

4-
# generated with [email protected]354-g82d22de
4+
# generated with [email protected]378-g72f4b38
55

66
api_root: /pulp/
77
black: true
@@ -12,22 +12,17 @@ check_stray_pulpcore_imports: true
1212
ci_base_image: ghcr.io/pulp/pulp-ci-centos9
1313
ci_env: {}
1414
ci_trigger: '{pull_request: {branches: [''*'']}}'
15-
ci_update_docs: false
1615
cli_package: pulp-cli
1716
cli_repo: https://github.com/pulp/pulp-cli.git
1817
core_import_allowed: []
1918
deploy_client_to_pypi: true
2019
deploy_client_to_rubygems: true
2120
deploy_to_pypi: true
2221
disabled_redis_runners: []
23-
doc_requirements_from_pulpcore: false
2422
docker_fixtures: false
25-
docs_test: null
2623
flake8: true
2724
flake8_ignore: []
2825
github_org: pulp
29-
issue_tracker: github
30-
kanban: true
3126
latest_release_branch: null
3227
lint_requirements: true
3328
noissue_marker: '[noissue]'

0 commit comments

Comments
 (0)