Skip to content

Commit

Permalink
Merge pull request #687 from nautobot/develop
Browse files Browse the repository at this point in the history
Merge 2.0.1 into main
  • Loading branch information
itdependsnetworks authored Dec 14, 2023
2 parents 7392942 + 7d1626b commit e6f97ad
Show file tree
Hide file tree
Showing 44 changed files with 667 additions and 383 deletions.
12 changes: 7 additions & 5 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
"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",
"min_nautobot_version": "2.0.0",
"max_nautobot_version": "2.9999",
"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",
Expand All @@ -27,7 +25,11 @@
"cookie_dir": "",
"branch_prefix": "drift-manager",
"pull_request_strategy": "create",
"post_actions": []
"post_actions": [
"black"
],
"draft": true,
"baked_commit_ref": "c6963e367d835faf66a9f4ac63267b6ce5811577"
}
}
}
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ about: Report a reproducible bug in the current release of nautobot-golden-confi
---

### Environment
* Python version: <!-- Example: 3.7.7 -->
* Nautobot version: <!-- Example: 1.4.0 -->
* Python version: <!-- Example: 3.11.4 -->
* Nautobot version: <!-- Example: 2.0.0 -->
* nautobot-golden-config version: <!-- Example: 1.0.0 -->

<!-- What did you expect to happen? -->
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ about: Propose a new feature or enhancement
---

### Environment
* Nautobot version: <!-- Example: 1.4.0 -->
* Nautobot version: <!-- Example: 2.0.0 -->
* nautobot-golden-config version: <!-- Example: 1.0.0 -->

<!--
Expand Down
38 changes: 31 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
## New Pull Request
<!--
Thank you for your interest in contributing to Nautobot! Please note
that our contribution policy recommends that a feature request or bug
report be opened for approval prior to filing a pull request. This
helps avoid wasting time and effort on something that we might not
be able to accept.
Have you:
- [ ] Updated the README if necessary?
- [ ] Updated any configuration settings?
- [ ] Written a unit test?
Please indicate the relevant feature request or bug report below.
-->

## Change Notes
# Closes: #<ISSUE NUMBER GOES HERE>

## Justification
## What's Changed

<!--
Please include:
- A summary of the proposed changes
- A sectioned breakdown for larger features under ## subheadings
- Screenshots, example payloads where relevant:
- Before/After for bugfixes
- Using a new feature
-->

## To Do

<!--
Please feel free to update todos to keep track of your own notes for WIP PRs.
-->
- [ ] Explanation of Change(s)
- [ ] Attached Screenshots, Payload Example
- [ ] Unit, Integration Tests
- [ ] Documentation Updates (when adding/changing features)
- [ ] Example Plugin Updates (when adding/changing features)
- [ ] Outline Remaining Work, Constraints from Design
117 changes: 84 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on: # yamllint disable-line rule:truthy rule:comments
branches:
- "main"
- "develop"
- "ltm-1.6"
tags:
- "v*"
pull_request: ~
Expand All @@ -17,56 +18,67 @@ env:

jobs:
black:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: black"
run: "poetry run invoke black"
bandit:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: bandit"
run: "poetry run invoke bandit"
pydocstyle:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: pydocstyle"
run: "poetry run invoke pydocstyle"
flake8:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: flake8"
run: "poetry run invoke flake8"
poetry:
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Checking: poetry lock file"
run: "poetry run invoke lock --check"
yamllint:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: yamllint"
Expand All @@ -76,9 +88,10 @@ jobs:
- "bandit"
- "pydocstyle"
- "flake8"
- "poetry"
- "yamllint"
- "black"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
strategy:
fail-fast: true
matrix:
Expand All @@ -89,14 +102,14 @@ jobs:
INVOKE_NAUTOBOT_GOLDEN_CONFIG_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@v1"
uses: "docker/setup-buildx-action@v3"
- name: "Build"
uses: "docker/build-push-action@v2"
uses: "docker/build-push-action@v5"
with:
builder: "${{ steps.buildx.outputs.name }}"
context: "./"
Expand All @@ -113,42 +126,80 @@ jobs:
run: "cp development/creds.example.env development/creds.env"
- name: "Linting: pylint"
run: "poetry run invoke pylint"
check-migrations:
needs:
- "bandit"
- "pydocstyle"
- "flake8"
- "poetry"
- "yamllint"
- "black"
runs-on: "ubuntu-22.04"
strategy:
fail-fast: true
matrix:
python-version: ["3.11"]
nautobot-version: ["2.0.0"]
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@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@v3"
- name: "Build"
uses: "docker/build-push-action@v5"
with:
builder: "${{ steps.buildx.outputs.name }}"
context: "./"
push: false
load: true
tags: "${{ env.PLUGIN_NAME }}/nautobot:${{ matrix.nautobot-version }}-py${{ matrix.python-version }}"
file: "./development/Dockerfile"
cache-from: "type=gha,scope=${{ matrix.nautobot-version }}-py${{ matrix.python-version }}"
cache-to: "type=gha,scope=${{ matrix.nautobot-version }}-py${{ matrix.python-version }}"
build-args: |
NAUTOBOT_VER=${{ matrix.nautobot-version }}
PYTHON_VER=${{ matrix.python-version }}
- name: "Copy credentials"
run: "cp development/creds.example.env development/creds.env"
- name: "Checking: migrations"
run: "poetry run invoke check-migrations"
unittest:
needs:
- "pylint"
- "check-migrations"
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.11"]
db-backend: ["postgresql"]
nautobot-version: ["stable"]
# 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: "2.0.0"
- python-version: "3.11"
db-backend: "mysql"
nautobot-version: "2.0.0"
- python-version: "3.8"
db-backend: "mysql"
nautobot-version: "stable"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
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@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@v1"
uses: "docker/setup-buildx-action@v3"
- name: "Build"
uses: "docker/build-push-action@v2"
uses: "docker/build-push-action@v5"
with:
builder: "${{ steps.buildx.outputs.name }}"
context: "./"
Expand All @@ -172,13 +223,13 @@ jobs:
needs:
- "unittest"
name: "Publish to GitHub"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v2"
uses: "actions/setup-python@v4"
with:
python-version: "3.11"
- name: "Install Python Packages"
Expand All @@ -201,13 +252,13 @@ jobs:
needs:
- "unittest"
name: "Push Package to PyPI"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v2"
uses: "actions/setup-python@v4"
with:
python-version: "3.11"
- name: "Install Python Packages"
Expand All @@ -227,7 +278,7 @@ jobs:
needs:
- "publish_gh"
- "publish_pypi"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
SLACK_MESSAGE: >-
Expand All @@ -240,7 +291,7 @@ jobs:
# 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 != ''"
uses: "slackapi/slack-github-action@v1.17.0"
uses: "slackapi/slack-github-action@v1"
with:
payload: |
{
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/rebake.yaml

This file was deleted.

Loading

0 comments on commit e6f97ad

Please sign in to comment.