-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from nautobot/develop
Release 1.1.4
- Loading branch information
Showing
97 changed files
with
4,212 additions
and
2,405 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ skips: [] | |
# No need to check for security issues in the test scripts! | ||
exclude_dirs: | ||
- "./tests/" | ||
- "./.venv/" |
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,26 @@ | ||
{ | ||
"cookiecutter": { | ||
"codeowner_github_usernames": "@smith-ntc", | ||
"full_name": "Network to Code, LLC", | ||
"email": "[email protected]", | ||
"github_org": "nautobot", | ||
"plugin_name": "nautobot_welcome_wizard", | ||
"verbose_name": "Nautobot's Welcome Wizard", | ||
"plugin_slug": "nautobot-welcome-wizard", | ||
"project_slug": "nautobot-plugin-welcome-wizard", | ||
"repo_url": "https://github.com/nautobot/nautobot-plugin-welcome-wizard", | ||
"base_url": "welcome-wizard", | ||
"min_nautobot_version": "1.5.4", | ||
"max_nautobot_version": "1.9999", | ||
"nautobot_version": "stable", | ||
"camel_name": "NautobotWelcomeWizard", | ||
"project_short_description": "Nautobot's Welcome Wizard", | ||
"version": "0.1.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/welcome-wizard/en/latest", | ||
"_template": "../networktocode-llc/cookiecutter-ntc/nautobot-plugin", | ||
"_output_dir": "/opt/ntc/baked" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,8 +1,19 @@ | ||
--- | ||
name: "CI" | ||
on: # yamllint disable | ||
- "push" | ||
- "pull_request" | ||
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: | ||
- "main" | ||
- "develop" | ||
tags: | ||
- "v*" | ||
pull_request: ~ | ||
|
||
env: | ||
PLUGIN_NAME: "nautobot-plugin-welcome-wizard" | ||
|
||
jobs: | ||
black: | ||
|
@@ -13,7 +24,7 @@ jobs: | |
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v1" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Linting: black" | ||
run: "poetry run invoke black" | ||
bandit: | ||
|
@@ -24,11 +35,9 @@ jobs: | |
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v1" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Linting: bandit" | ||
run: "poetry run invoke bandit" | ||
needs: | ||
- "black" | ||
pydocstyle: | ||
runs-on: "ubuntu-20.04" | ||
env: | ||
|
@@ -37,11 +46,9 @@ jobs: | |
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v1" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Linting: pydocstyle" | ||
run: "poetry run invoke pydocstyle" | ||
needs: | ||
- "black" | ||
flake8: | ||
runs-on: "ubuntu-20.04" | ||
env: | ||
|
@@ -50,11 +57,9 @@ jobs: | |
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v1" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Linting: flake8" | ||
run: "poetry run invoke flake8" | ||
needs: | ||
- "black" | ||
yamllint: | ||
runs-on: "ubuntu-20.04" | ||
env: | ||
|
@@ -63,48 +68,70 @@ jobs: | |
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v1" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Linting: yamllint" | ||
run: "poetry run invoke yamllint" | ||
needs: | ||
- "black" | ||
build: | ||
runs-on: "ubuntu-20.04" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v1" | ||
- name: "Copy credentials" | ||
run: "cp development/creds.example.env development/creds.env" | ||
- name: "Build Container" | ||
run: "poetry run invoke build" | ||
pylint: | ||
needs: | ||
- "bandit" | ||
- "pydocstyle" | ||
- "flake8" | ||
- "yamllint" | ||
pylint: | ||
- "black" | ||
runs-on: "ubuntu-20.04" | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.8"] | ||
nautobot-version: ["1.5.0"] | ||
env: | ||
INVOKE_WELCOME_WIZARD_PYTHON_VER: "${{ matrix.python-version }}" | ||
INVOKE_WELCOME_WIZARD_NAUTOBOT_VER: "${{ matrix.nautobot-version }}" | ||
steps: | ||
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v1" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Set up Docker Buildx" | ||
id: "buildx" | ||
uses: "docker/setup-buildx-action@v1" | ||
- name: "Build" | ||
uses: "docker/build-push-action@v2" | ||
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: "Build Container" | ||
run: "poetry run invoke build" | ||
- name: "Linting: Pylint" | ||
- name: "Linting: pylint" | ||
run: "poetry run invoke pylint" | ||
needs: | ||
- "build" | ||
unittest: | ||
needs: | ||
- "pylint" | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9"] | ||
nautobot-version: ["1.2.11","1.3.7"] | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
db-backend: ["postgresql"] | ||
nautobot-version: ["stable"] | ||
include: | ||
- python-version: "3.10" | ||
db-backend: "postgresql" | ||
nautobot-version: "1.5.0" | ||
- python-version: "3.7" | ||
db-backend: "mysql" | ||
nautobot-version: "1.5.0" | ||
- python-version: "3.10" | ||
db-backend: "mysql" | ||
nautobot-version: "stable" | ||
runs-on: "ubuntu-20.04" | ||
env: | ||
INVOKE_WELCOME_WIZARD_PYTHON_VER: "${{ matrix.python-version }}" | ||
|
@@ -113,16 +140,34 @@ jobs: | |
- name: "Check out repository code" | ||
uses: "actions/checkout@v2" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v1" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v4" | ||
- name: "Set up Docker Buildx" | ||
id: "buildx" | ||
uses: "docker/setup-buildx-action@v1" | ||
- name: "Build" | ||
uses: "docker/build-push-action@v2" | ||
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: "Build Container" | ||
run: "poetry run invoke build" | ||
- name: "Use Mysql invoke settings when needed" | ||
run: "cp invoke.mysql.yml invoke.yml" | ||
if: "matrix.db-backend == 'mysql'" | ||
- name: "Run Tests" | ||
run: "poetry run invoke unittest" | ||
needs: | ||
- "pylint" | ||
publish_gh: | ||
needs: | ||
- "unittest" | ||
name: "Publish to GitHub" | ||
runs-on: "ubuntu-20.04" | ||
if: "startsWith(github.ref, 'refs/tags/v')" | ||
|
@@ -153,9 +198,9 @@ jobs: | |
tag: "${{ github.ref }}" | ||
overwrite: true | ||
file_glob: true | ||
publish_pypi: | ||
needs: | ||
- "unittest" | ||
publish_pypi: | ||
name: "Push Package to PyPI" | ||
runs-on: "ubuntu-20.04" | ||
if: "startsWith(github.ref, 'refs/tags/v')" | ||
|
@@ -183,5 +228,38 @@ jobs: | |
with: | ||
user: "__token__" | ||
password: "${{ secrets.PYPI_API_TOKEN }}" | ||
slack-notify: | ||
needs: | ||
- "unittest" | ||
- "publish_gh" | ||
- "publish_pypi" | ||
runs-on: "ubuntu-20.04" | ||
env: | ||
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}" | ||
SLACK_MESSAGE: >- | ||
*NOTIFICATION: NEW-RELEASE-PUBLISHED*\n | ||
Repository: <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>\n | ||
Release: <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>\n | ||
Published by: <${{ github.server_url }}/${{ github.actor }}|${{ github.actor }}> | ||
steps: | ||
- 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 != ''" | ||
uses: "slackapi/[email protected]" | ||
with: | ||
payload: | | ||
{ | ||
"text": "${{ env.SLACK_MESSAGE }}", | ||
"blocks": [ | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": "${{ env.SLACK_MESSAGE }}" | ||
} | ||
} | ||
] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}" | ||
SLACK_WEBHOOK_TYPE: "INCOMING_WEBHOOK" |
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,13 @@ | ||
--- | ||
name: "Nautobot Upstream Monitor" | ||
|
||
on: # yamllint disable-line rule:truthy rule:comments | ||
schedule: | ||
- cron: "0 4 */2 * *" # every other day at midnight | ||
|
||
jobs: | ||
upstream-test: | ||
uses: "nautobot/nautobot/.github/workflows/plugin_upstream_testing_base.yml@develop" | ||
with: # Below could potentially be collapsed into a single argument if a concrete relationship between both is enforced | ||
invoke_context_name: "WELCOME_WIZARD" | ||
plugin_name: "nautobot-plugin-welcome-wizard" |
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 was deleted.
Oops, something went wrong.
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.