Skip to content
Open
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
8 changes: 8 additions & 0 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,15 @@
"pull_request_strategy": "update-or-create",
"post_actions": [],
"draft": false,
<<<<<<< HEAD
<<<<<<< HEAD
"baked_commit_ref": "f89190c77817921c07423320bec1f944ed584503",
=======
"baked_commit_ref": "aa4dc9d386b4803f0fc02e7889aef37acf55849c",
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
"baked_commit_ref": "a5cb520a1b5dd235ec93fb92b8d91bd029d1d6bf",
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
"drift_managed_branch": "develop"
}
}
Expand Down
103 changes: 95 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,79 @@ on: # yamllint disable-line rule:truthy rule:comments
pull_request: ~

env:
<<<<<<< HEAD
<<<<<<< HEAD
INVOKE_PARSER_IMAGE_NAME: "circuit_maintenance_parser"
INVOKE_PARSER_IMAGE_VER: "latest"
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_NAME: "circuit-maintenance-parser"
INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER: "latest"
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_NAME: "circuit-maintenance-parser"
INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER: "latest"
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)

jobs:
ruff-format:
runs-on: "ubuntu-latest"
env:
<<<<<<< HEAD
<<<<<<< HEAD
INVOKE_PARSER_LOCAL: "True"
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True"
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True"
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
uses: "networktocode/gh-action-setup-poetry-environment@v7"
with:
poetry-version: "2.1.3"
- name: "Linting: ruff format"
run: "poetry run invoke ruff --action format"
ruff-lint:
runs-on: "ubuntu-latest"
env:
<<<<<<< HEAD
<<<<<<< HEAD
INVOKE_PARSER_LOCAL: "True"
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True"
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True"
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
uses: "networktocode/gh-action-setup-poetry-environment@v7"
with:
poetry-version: "2.1.3"
- name: "Linting: ruff"
run: "poetry run invoke ruff --action lint"
check-docs-build:
runs-on: "ubuntu-latest"
env:
<<<<<<< HEAD
<<<<<<< HEAD
INVOKE_PARSER_LOCAL: "True"
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True"
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True"
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
uses: "networktocode/gh-action-setup-poetry-environment@v7"
with:
poetry-version: "2.1.3"
poetry-install-options: "--only dev,docs"
Expand All @@ -58,25 +92,41 @@ jobs:
poetry:
runs-on: "ubuntu-latest"
env:
<<<<<<< HEAD
<<<<<<< HEAD
INVOKE_PARSER_LOCAL: "True"
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True"
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True"
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
uses: "networktocode/gh-action-setup-poetry-environment@v7"
with:
poetry-version: "2.1.3"
- name: "Checking: poetry lock file"
run: "poetry run invoke lock --check"
yamllint:
runs-on: "ubuntu-latest"
env:
<<<<<<< HEAD
<<<<<<< HEAD
INVOKE_PARSER_LOCAL: "True"
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True"
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_LOCAL: "True"
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
uses: "networktocode/gh-action-setup-poetry-environment@v7"
with:
poetry-version: "2.1.3"
- name: "Linting: yamllint"
Expand All @@ -91,18 +141,36 @@ jobs:
strategy:
fail-fast: true
matrix:
<<<<<<< HEAD
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
env:
<<<<<<< HEAD
INVOKE_PARSER_PYTHON_VER: "${{ matrix.python-version }}"
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_PYTHON_VER: "${{ matrix.python-version }}"
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
python-version: ["3.10"]
env:
INVOKE_CIRCUIT_MAINTENANCE_PARSER_PYTHON_VER: "${{ matrix.python-version }}"
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
uses: "networktocode/gh-action-setup-poetry-environment@v7"
with:
poetry-version: "2.1.3"
- name: "Get image version"
<<<<<<< HEAD
<<<<<<< HEAD
run: "echo INVOKE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
=======
run: "echo INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
run: "echo INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0
Expand All @@ -127,19 +195,38 @@ jobs:
strategy:
fail-fast: true
matrix:
<<<<<<< HEAD
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
runs-on: "ubuntu-latest"
env:
<<<<<<< HEAD
INVOKE_PARSER_PYTHON_VER: "${{ matrix.python-version }}"
=======
INVOKE_CIRCUIT_MAINTENANCE_PARSER_PYTHON_VER: "${{ matrix.python-version }}"
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
python-version: ["3.10", "3.14"]
runs-on: "ubuntu-latest"
env:
INVOKE_CIRCUIT_MAINTENANCE_PARSER_PYTHON_VER: "${{ matrix.python-version }}"
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
uses: "networktocode/gh-action-setup-poetry-environment@v7"
with:
poetry-version: "2.1.3"
- name: "Get image version"
<<<<<<< HEAD
<<<<<<< HEAD
run: "echo INVOKE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
=======
run: "echo INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
>>>>>>> 85666b3 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
=======
run: "echo INVOKE_CIRCUIT_MAINTENANCE_PARSER_IMAGE_VER=`poetry version -s`-py${{ matrix.python-version }} >> $GITHUB_ENV"
>>>>>>> 9bea393 (Cookie updated targeting develop by NetworkToCode Cookie Drift Manager Tool)
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0
Expand Down Expand Up @@ -169,7 +256,7 @@ jobs:
with:
fetch-depth: "0"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
uses: "networktocode/gh-action-setup-poetry-environment@v7"
with:
poetry-version: "2.1.3"
- name: "Check for changelog entry"
Expand Down
34 changes: 29 additions & 5 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on: # yamllint disable-line rule:truthy rule:comments
description: "Date of the release YYYY-MM-DD (defaults to today's date in the US Eastern TZ)."
required: false
default: ""
previous_version:
description: "The previous version tag to use for generating release notes (defaults to the latest tag or initial commit if no tags exist)."
required: false
default: ""

jobs:
prepare-release:
Expand All @@ -38,7 +42,7 @@ jobs:
fetch-depth: 0 # Fetch all history for git tags

- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
uses: "networktocode/gh-action-setup-poetry-environment@v7"
with:
poetry-version: "2.1.3"
poetry-install-options: "--with dev"
Expand All @@ -53,7 +57,11 @@ jobs:

# 2. Try to get the previous version tag
# If it fails (no tags), get the hash of the first commit
if PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null); then
if [ -n "${{ github.event.inputs.previous_version }}" ]; then
PREV_TAG="${{ github.event.inputs.previous_version }}"
echo "Using user-specified previous version: $PREV_TAG"
echo "PREVIOUS_TAG=$PREV_TAG" >> $GITHUB_ENV
elif PREV_TAG=$(git describe --tags --abbrev=0 2>/dev/null); then
echo "PREVIOUS_TAG=$PREV_TAG" >> $GITHUB_ENV
echo "Found previous tag: $PREV_TAG"
else
Expand All @@ -65,9 +73,25 @@ jobs:

- name: "Determine New Version"
id: "versioning"
env:
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
# Perform the bump based on the user input
poetry version ${{ github.event.inputs.bump_rule }}
# Bump the poetry version based on the user input
CURRENT_POETRY_VER=$(poetry version --short)
set +e # continue running if the next command fails
GITHUB_RELEASE_EXISTS=$(gh release view v$CURRENT_POETRY_VER --json publishedAt --jq '.publishedAt')
set -e
# Unconditionally bump the version if the current version is alpha0 or beta0
if [[ $CURRENT_POETRY_VER == *a0 || $CURRENT_POETRY_VER == *b0 || $CURRENT_POETRY_VER == *rc0 ]]; then
poetry version ${{ github.event.inputs.bump_rule }}
# If the bump rule is prerelease and a release doesn't already exist in github we don't bump the version

# This is because we've already bumped to the prerelease version after the previous release
elif [[ "${{ github.event.inputs.bump_rule }}" == "prerelease" && "$CURRENT_POETRY_VER" =~ (a|b|rc)[0-9]+$ && -z "$GITHUB_RELEASE_EXISTS" ]]; then
echo "Prerelease v$CURRENT_POETRY_VER does not exist in github, using this version"
else
poetry version ${{ github.event.inputs.bump_rule }}
fi

# Capture the New version string for use in other steps
NEW_VER=$(poetry version --short)
Expand Down Expand Up @@ -138,7 +162,7 @@ jobs:
# 7. Save to a temporary file to avoid shell argument length limits
echo "$FINAL_NOTES" > ../consolidated_notes.md

- name: "Generate Release Notes"
- name: "Generate App Release Notes and update mkdocs.yml"
run: "poetry run inv generate-release-notes --version '${{ env.NEW_VERSION }}' --date '${{ env.RELEASE_DATE }}'"

- name: "Commit Changes and Push"
Expand Down
Loading