Skip to content

Commit

Permalink
Update CI files
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pulpbot committed Nov 29, 2023
1 parent 189e4be commit ab4f80e
Show file tree
Hide file tree
Showing 22 changed files with 223 additions and 249 deletions.
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-276-g45ce134
2021.08.26-282-g53132bb
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
fetch-depth: 1
path: "pulp_container"
- uses: actions/setup-python@v4
- uses: "actions/setup-python@v4"
with:
python-version: "3.8"
- name: Install python dependencies
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install packaging wheel
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,53 @@
# For more info visit https://github.com/pulp/plugin_template

---
name: Container changelog update
name: "Container changelog update"
on:
push:
branches:
- main
- "main"
paths:
- CHANGES.rst
- CHANGES.md
- "CHANGES.rst"
- "CHANGES.md"
workflow_dispatch:

jobs:

update-changelog:
runs-on: ubuntu-latest
runs-on: "ubuntu-latest"
strategy:
fail-fast: false

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

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

- name: Install python dependencies
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install -r doc_requirements.txt
echo ::endgroup::
- name: Fake api schema
- name: "Fake api schema"
run: |
mkdir -p docs/_build/html
echo "{}" > docs/_build/html/api.json
mkdir -p docs/_static
echo "{}" > docs/_static/api.json
- name:
- name: "Build Docs"
run: |
pip install "Jinja2<3.1"
make diagrams html
working-directory: ./docs
working-directory: "./docs"
env:
PULP_CONTENT_ORIGIN: "http://localhost/"

- name: Publish changlog to pulpproject.org
run: .github/workflows/scripts/publish_docs.sh changelog ${GITHUB_REF##*/}
- name: "Publish changlog to pulpproject.org"
run: |
.github/workflows/scripts/publish_docs.sh changelog ${GITHUB_REF##*/}
env:
PULP_DOCS_KEY: ${{ secrets.PULP_DOCS_KEY }}
PULP_DOCS_KEY: "${{ secrets.PULP_DOCS_KEY }}"
40 changes: 21 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# For more info visit https://github.com/pulp/plugin_template

---
name: Container CI
name: "Container CI"
on: {pull_request: {branches: ['*']}}

concurrency:
Expand All @@ -18,39 +18,41 @@ defaults:
working-directory: "pulp_container"

jobs:

ready-to-ship:
runs-on: ubuntu-latest
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
path: "pulp_container"
- uses: actions/setup-python@v4
- uses: "actions/setup-python@v4"
with:
python-version: "3.8"
- name: Install requirements
run: pip3 install github
- name: Check commit message
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install requests pygithub
echo ::endgroup::
- name: "Check commit message"
if: github.event_name == 'pull_request'
env:
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_CONTEXT: ${{ github.event.pull_request.commits_url }}
run: sh .github/workflows/scripts/check_commit.sh
- name: Verify requirements files
run: python .ci/scripts/check_requirements.py
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
GITHUB_CONTEXT: "${{ github.event.pull_request.commits_url }}"
run: |
.github/workflows/scripts/check_commit.sh
- name: "Verify requirements files"
run: |
python .ci/scripts/check_requirements.py
lint:
uses: "./.github/workflows/lint.yml"

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

test:
needs: build
needs: "build"
uses: "./.github/workflows/test.yml"


16 changes: 8 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:
language: [ 'python' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
15 changes: 8 additions & 7 deletions .github/workflows/create-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,27 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
path: "pulp_container"

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

- name: Install python dependencies
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install bump2version jinja2 pyyaml
echo ::endgroup::
- name: Setting secrets
working-directory: pulp_container
run: python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT"
- name: "Setting secrets"
working-directory: "pulp_container"
run: |
python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT"
env:
SECRETS_CONTEXT: ${{ toJson(secrets) }}
SECRETS_CONTEXT: "${{ toJson(secrets) }}"

- name: Determine new branch name
working-directory: pulp_container
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kanban.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
runs-on: ubuntu-latest
name: Find issues linked to a PR
outputs:
linked-issues: ${{ steps.linked-issues.outputs.issues }}
linked-issues: ${{ steps.linked-issues.outputs.issues }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
fetch-depth: 1
path: "pulp_container"

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

# lint_requirements contains tools needed for flake8, etc.
- name: Install requirements
run: pip3 install -r lint_requirements.txt
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install -r lint_requirements.txt
echo ::endgroup::
- name: Lint workflow files
run: |
yamllint -s -d '{extends: relaxed, rules: {line-length: disable}}' .github/workflows
# run black separately from flake8 to get a diff
- name: Run black
Expand Down
48 changes: 17 additions & 31 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,28 @@ jobs:
uses: "./.github/workflows/build.yml"

test:
runs-on: "ubuntu-latest"
needs: "build"
uses: "./.github/workflows/test.yml"

changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
path: "pulp_container"

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

- name: Install python dependencies
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install gitpython toml
echo ::endgroup::
- name: Configure Git with pulpbot name and email
- name: "Configure Git with pulpbot name and email"
run: |
git config --global user.name 'pulpbot'
git config --global user.email '[email protected]'
Expand All @@ -72,31 +71,30 @@ jobs:
needs: test

steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
fetch-depth: 1
path: "pulp_container"

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

- uses: actions/download-artifact@v3
with:
name: "plugin_package"
path: "pulp_container/dist/"

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

- name: Set environment variables
- name: "Install python dependencies"
run: |
echo ::group::PYDEPS
pip install requests packaging~=21.3 mkdocs pymdown-extensions Jinja2<3.1
echo ::endgroup::
- name: "Set environment variables"
run: |
echo "TEST=${{ matrix.env.TEST }}" >> $GITHUB_ENV
- name: Download built docs
uses: actions/download-artifact@v3
with:
Expand All @@ -109,25 +107,13 @@ jobs:
name: "python-client-docs.tar"
path: "pulp_container"

- name: Setting secrets
run: python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT"
- name: "Setting secrets"
run: |
python3 .github/workflows/scripts/secrets.py "$SECRETS_CONTEXT"
env:
SECRETS_CONTEXT: ${{ toJson(secrets) }}
SECRETS_CONTEXT: "${{ toJson(secrets) }}"

- name: Publish docs to pulpproject.org
run: |
tar -xvf docs.tar -C ./docs
.github/workflows/scripts/publish_docs.sh nightly ${GITHUB_REF##*/}

- name: Logs
if: always()
run: |
echo "Need to debug? Please check: https://github.com/marketplace/actions/debugging-with-tmate"
http --timeout 30 --check-status --pretty format --print hb "https://pulp${PULP_API_ROOT}api/v3/status/" || true
docker images || true
docker ps -a || true
docker logs pulp || true
docker exec pulp ls -latr /etc/yum.repos.d/ || true
docker exec pulp cat /etc/yum.repos.d/* || true
docker exec pulp bash -c "pip3 list && pip3 install pipdeptree && pipdeptree"
2 changes: 1 addition & 1 deletion .github/workflows/pr_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
- name: Commit Count Check
Expand Down
Loading

0 comments on commit ab4f80e

Please sign in to comment.