-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
91 changed files
with
1,771 additions
and
1,675 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"cookiecutter": { | ||
"codeowner_github_usernames": "@itdependsnetworks @jeffkala @nkallergis", | ||
"full_name": "Network to Code, LLC", | ||
"email": "[email protected]", | ||
"github_org": "nautobot", | ||
"plugin_name": "nautobot_golden_config", | ||
"verbose_name": "Golden Config", | ||
"plugin_slug": "nautobot-golden-config", | ||
"project_slug": "nautobot-plugin-golden-config", | ||
"repo_url": "https://github.com/nautobot/nautobot-plugin-golden-config", | ||
"base_url": "golden-config", | ||
"min_nautobot_version": "1.4.0", | ||
"max_nautobot_version": "1.9999", | ||
"nautobot_version": "latest", | ||
"camel_name": "NautobotGoldenConfig", | ||
"project_short_description": "A plugin for configuration on nautobot", | ||
"version": "1.0.0", | ||
"model_class_name": "None", | ||
"open_source_license": "Apache-2.0", | ||
"docs_base_url": "https://docs.nautobot.com", | ||
"docs_app_url": "https://docs.nautobot.com/projects/golden-config/en/latest", | ||
"_drift_manager": { | ||
"template": "https://github.com/nautobot/cookiecutter-nautobot-app.git", | ||
"template_dir": "nautobot-app", | ||
"template_ref": "develop", | ||
"cookie_dir": "", | ||
"branch_prefix": "drift-manager", | ||
"pull_request_strategy": "create", | ||
"post_actions": [] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Docker related | ||
development/Dockerfile | ||
development/docker-compose*.yml | ||
development/*.env | ||
*.env | ||
environments/ | ||
|
||
# Python | ||
**/*.pyc | ||
**/*.pyo | ||
**/__pycache__/ | ||
**/.pytest_cache/ | ||
**/.venv/ | ||
|
||
|
||
# Other | ||
docs/_build | ||
FAQ.md | ||
.git/ | ||
.gitignore | ||
.github | ||
tasks.py | ||
LICENSE | ||
**/*.log | ||
**/.vscode/ | ||
invoke*.yml | ||
tasks.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,15 @@ | ||
[flake8] | ||
# E501: Line length is enforced by Black, so flake8 doesn't need to check it | ||
# W503: Black disagrees with this rule, as does PEP 8; Black wins | ||
ignore = E501, W503 | ||
ignore = | ||
E501, # Line length is enforced by Black, so flake8 doesn't need to check it | ||
W503, # Black disagrees with this rule, as does PEP 8; Black wins | ||
# TODO: Review the following rules, not in the template | ||
F811, | ||
F401, | ||
F405, | ||
E203, | ||
exclude = | ||
migrations, | ||
__pycache__, | ||
manage.py, | ||
settings.py, | ||
.venv |
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Default owners for all files in this repository | ||
# Default owner(s) of all files in this repository | ||
* @itdependsnetworks @jeffkala @nkallergis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## New Pull Request | ||
|
||
Have you: | ||
- [ ] Updated the README if necessary? | ||
- [ ] Updated any configuration settings? | ||
- [ ] Written a unit test? | ||
|
||
## Change Notes | ||
|
||
## Justification |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
--- | ||
name: "CI" | ||
concurrency: # Cancel any existing runs of this workflow for this same PR | ||
group: "${{ github.workflow }}-${{ github.ref }}" | ||
cancel-in-progress: true | ||
on: # yamllint disable-line rule:truthy rule:comments | ||
push: | ||
branches: | ||
|
@@ -10,7 +13,7 @@ on: # yamllint disable-line rule:truthy rule:comments | |
pull_request: ~ | ||
|
||
env: | ||
PLUGIN_NAME: "nautobot-golden-config" | ||
PLUGIN_NAME: "nautobot-plugin-golden-config" | ||
|
||
jobs: | ||
black: | ||
|
@@ -19,7 +22,7 @@ jobs: | |
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Linting: black" | ||
|
@@ -30,7 +33,7 @@ jobs: | |
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Linting: bandit" | ||
|
@@ -41,7 +44,7 @@ jobs: | |
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Linting: pydocstyle" | ||
|
@@ -52,7 +55,7 @@ jobs: | |
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Linting: flake8" | ||
|
@@ -63,7 +66,7 @@ jobs: | |
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Linting: yamllint" | ||
|
@@ -80,13 +83,13 @@ jobs: | |
fail-fast: true | ||
matrix: | ||
python-version: ["3.11"] | ||
nautobot-version: ["1.6.1"] | ||
nautobot-version: ["2.0.0-rc.2"] | ||
env: | ||
INVOKE_NAUTOBOT_GOLDEN_CONFIG_PYTHON_VER: "${{ matrix.python-version }}" | ||
INVOKE_NAUTOBOT_GOLDEN_CONFIG_NAUTOBOT_VER: "${{ matrix.nautobot-version }}" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Set up Docker Buildx" | ||
|
@@ -118,18 +121,18 @@ jobs: | |
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
db-backend: ["postgresql"] | ||
nautobot-version: ["latest"] | ||
nautobot-version: ["2.0.0-rc.2"] # ["latest"] | ||
# The include is a method to limit the amount of jobs ran. This essentially | ||
# means that in addition to standard postgres and stable, also the lowest | ||
# supported version and with mysql | ||
include: | ||
- python-version: "3.11" | ||
db-backend: "postgresql" | ||
nautobot-version: "1.6.1" | ||
- python-version: "3.8" | ||
db-backend: "mysql" | ||
nautobot-version: "1.6.1" | ||
nautobot-version: "2.0.0-rc.2" | ||
- python-version: "3.11" | ||
db-backend: "mysql" | ||
nautobot-version: "2.0.0-rc.2" | ||
- python-version: "3.8" | ||
db-backend: "mysql" | ||
nautobot-version: "latest" | ||
runs-on: "ubuntu-20.04" | ||
|
@@ -138,7 +141,7 @@ jobs: | |
INVOKE_NAUTOBOT_GOLDEN_CONFIG_NAUTOBOT_VER: "${{ matrix.nautobot-version }}" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Set up Docker Buildx" | ||
|
@@ -173,7 +176,7 @@ jobs: | |
if: "startsWith(github.ref, 'refs/tags/v')" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
uses: "actions/checkout@v3" | ||
- name: "Set up Python" | ||
uses: "actions/setup-python@v2" | ||
with: | ||
|
@@ -202,7 +205,7 @@ jobs: | |
if: "startsWith(github.ref, 'refs/tags/v')" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
uses: "actions/checkout@v3" | ||
- name: "Set up Python" | ||
uses: "actions/setup-python@v2" | ||
with: | ||
|
@@ -226,7 +229,7 @@ jobs: | |
- "publish_pypi" | ||
runs-on: "ubuntu-20.04" | ||
env: | ||
SLACK_WEBHOOK_URL: "${{ '{{ secrets.SLACK_WEBHOOK_URL }}' }}" | ||
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}" | ||
SLACK_MESSAGE: >- | ||
*NOTIFICATION: NEW-RELEASE-PUBLISHED*\n | ||
Repository: <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>\n | ||
|
@@ -236,11 +239,12 @@ jobs: | |
- name: "Send a notification to Slack" | ||
# ENVs cannot be used directly in job.if. This is a workaround to check | ||
# if SLACK_WEBHOOK_URL is present. | ||
if: "${{ env.SLACK_WEBHOOK_URL != '' }}" | ||
if: "env.SLACK_WEBHOOK_URL != ''" | ||
uses: "slackapi/[email protected]" | ||
with: | ||
payload: | | ||
{ | ||
"text": "${{ env.SLACK_MESSAGE }}", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
name: "Rebake Cookie" | ||
on: # yamllint disable-line rule:truthy | ||
schedule: | ||
# Every Saturday at 5:00 am UTC | ||
- cron: "0 5 * * 6" | ||
workflow_dispatch: | ||
inputs: | ||
template-ref: | ||
description: "The branch or tag to use for the template, using the value from .cookiecutter.json when empty" | ||
default: "" | ||
jobs: | ||
rebake: | ||
runs-on: "ubuntu-22.04" | ||
permissions: | ||
actions: "write" | ||
contents: "write" | ||
packages: "read" | ||
pull-requests: "write" | ||
container: "ghcr.io/nautobot/cookiecutter-nautobot-app-drift-manager/prod:latest" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
steps: | ||
- name: "Configure" | ||
id: "config" | ||
run: | | ||
export REBAKE_ARGS='--push' | ||
if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then | ||
export REBAKE_ARGS="$REBAKE_ARGS --template-ref='${{ github.event.inputs.template-ref }}'" | ||
fi | ||
echo "rebake-args='$REBAKE_ARGS'" >> $GITHUB_OUTPUT | ||
- name: "Rebake" | ||
run: | | ||
python -m ntc_cookie_drift_manager rebake ${{ steps.config.outputs.rebake-args }} '${{ github.repositoryUrl }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.