Skip to content

Commit

Permalink
Update CI files
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pulpbot authored and mdellweg committed Aug 16, 2024
1 parent 8d55651 commit 24a5c8f
Show file tree
Hide file tree
Showing 13 changed files with 74 additions and 145 deletions.
8 changes: 2 additions & 6 deletions .ci/scripts/validate_commit_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,17 @@
import sys
from pathlib import Path
import subprocess


import os
import warnings
from github import Github


NO_ISSUE = "[noissue]"
CHANGELOG_EXTS = [".feature", ".bugfix", ".doc", ".removal", ".misc", ".deprecation"]
KEYWORDS = ["fixes", "closes"]

sha = sys.argv[1]
message = subprocess.check_output(["git", "log", "--format=%B", "-n 1", sha]).decode("utf-8")


KEYWORDS = ["fixes", "closes"]

g = Github(os.environ.get("GITHUB_TOKEN"))
repo = g.get_repo("pulp/pulp_npm")

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-361-gcd6f9f0
2021.08.26-378-g72f4b38
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ jobs:
- "check-commits"
- "lint"
- "test"
- "docs"
if: "always()"
steps:
- name: "Collect needed jobs results"
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/create-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,20 @@ jobs:
fetch-depth: 0
path: "pulp_npm"

- uses: "actions/checkout@v4"
with:
fetch-depth: 1
repository: "pulp/plugin_template"
path: "plugin_template"

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

- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install bump2version jinja2 pyyaml packaging
pip install bump2version packaging -r plugin_template/requirements.txt
echo ::endgroup::
- name: "Setting secrets"
Expand Down Expand Up @@ -71,13 +77,6 @@ jobs:
run: |
find CHANGES -type f -regex ".*\.\(bugfix\|doc\|feature\|misc\|deprecation\|removal\)" -exec git rm {} +
- name: Checkout plugin template
uses: actions/checkout@v4
with:
repository: pulp/plugin_template
path: plugin_template
fetch-depth: 0

- name: Update CI branches in template_config
working-directory: plugin_template
run: |
Expand Down
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 pulp_npm' 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: "pulp_npm"
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 1
path: "pulp_npm"
- 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."
103 changes: 0 additions & 103 deletions .github/workflows/kanban.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/scripts/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fi

for i in {1..3}
do
ansible-galaxy collection install "amazon.aws:1.5.0" && s=0 && break || s=$? && sleep 3
ansible-galaxy collection install "amazon.aws:8.1.0" && s=0 && break || s=$? && sleep 3
done
if [[ $s -gt 0 ]]
then
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ PLUGIN_SOURCE="./pulp_npm/dist/pulp_npm-${PLUGIN_VERSION}-py3-none-any.whl"
export PULP_API_ROOT="/pulp/"

PIP_REQUIREMENTS=("pulp-cli")
if [[ "$TEST" = "docs" || "$TEST" = "publish" ]]
then
PIP_REQUIREMENTS+=("-r" "doc_requirements.txt")
fi

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


Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" == "Npm CI" ]]; then
towncrier build --yes --version 4.0.0.ci
fi
pulp-docs build
exit
fi

REPORTED_STATUS="$(pulp status)"

echo "machine pulp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install towncrier twine wheel httpie docker netaddr boto3 ansible mkdocs jq jsonpatch
pip install towncrier twine wheel httpie docker netaddr boto3 'ansible~=10.3.0' mkdocs jq jsonpatch
echo "HTTPIE_CONFIG_DIR=$GITHUB_WORKSPACE/pulp_npm/.ci/assets/httpie/" >> $GITHUB_ENV
echo ::endgroup::
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ name: "Npm CI Update"
on:
schedule:
# * is a special character in YAML so you have to quote this string
# runs at 2:30 UTC every Sunday
- cron: '30 2 * * 0'
# runs at 19:30 UTC every Sunday
- cron: '30 19 * * 0'
workflow_dispatch:

jobs:
Expand All @@ -36,7 +36,7 @@ jobs:
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install gitpython requests packaging jinja2 pyyaml
pip install gitpython packaging -r plugin_template/requirements.txt
echo ::endgroup::
- name: "Configure Git with pulpbot name and email"
Expand Down
4 changes: 1 addition & 3 deletions doc_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# WARNING: DO NOT EDIT!
#
# This file was generated by plugin_template, and is managed by it. Please use
# './plugin-template --docs pulp_npm' to update this file.
# './plugin-template --github pulp_npm' to update this file.
#
# For more info visit https://github.com/pulp/plugin_template
-r requirements.txt
towncrier

pulp-docs @ git+https://github.com/pulp/pulp-docs@main
7 changes: 1 addition & 6 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 plugin_template@2021.08.26-354-g82d22de
# generated with plugin_template@2021.08.26-378-g72f4b38

api_root: /pulp/
black: true
Expand All @@ -12,22 +12,17 @@ check_stray_pulpcore_imports: true
ci_base_image: ghcr.io/pulp/pulp-ci-centos9
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: []
deploy_client_to_pypi: true
deploy_client_to_rubygems: true
deploy_to_pypi: true
disabled_redis_runners: []
doc_requirements_from_pulpcore: false
docker_fixtures: false
docs_test: null
flake8: true
flake8_ignore: []
github_org: pulp
issue_tracker: github
kanban: true
latest_release_branch: null
lint_requirements: true
noissue_marker: '[noissue]'
Expand Down

0 comments on commit 24a5c8f

Please sign in to comment.