This repository has been archived by the owner on Oct 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: Update project dependencies in lockfile * chore: 🔧 Enable commit_version_number in semantic-release * test: 🚨 Fixes for black linter * Fix Main (#152) * chore: 🚚 Update test file name to match filepath of file being tested * style: 🚨 Fix formatting for black * build: Update to latest syntax for compose * build: Use Postgres 13 for Apple ARM support * fix: 🐛 Add check for existence of Relationship in source list before returning. Also refactored slightly to have it return a sorted list of VLANs based on VLAN ID * test: ✅ Add tests validating Nautobot utility methods * build: Update lockfile for latest dependencies * build: Set upper bound on nautobot-ssot to prevent conflict. * build: Update Dockerfile to latest pattern pinning poetry. * ci: Update CI to latest pattern and lock Nautobot version. * build: Remove extras all * ci: Remove py3.7 from unit tests * ci: Remove mySQL tests, simplify unittest matrix * build: Update lockfile * fix: Redo lockfile as messed up in merge * test: Address yamllint complaints --------- Co-authored-by: Justin Drew <[email protected]>
- Loading branch information
Showing
6 changed files
with
736 additions
and
748 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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
--- | ||
name: "CI" | ||
concurrency: # Cancel any existing runs of this workflow for this same PR | ||
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 | ||
on: # yamllint disable-line rule:truthy rule:comments | ||
push: | ||
branches: | ||
- "main" | ||
|
@@ -25,8 +25,6 @@ jobs: | |
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v2" | ||
with: | ||
python-version: "3.10" | ||
- name: "Linting: black" | ||
run: "poetry run invoke black" | ||
bandit: | ||
|
@@ -38,8 +36,6 @@ jobs: | |
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v2" | ||
with: | ||
python-version: "3.10" | ||
- name: "Linting: bandit" | ||
run: "poetry run invoke bandit" | ||
pydocstyle: | ||
|
@@ -51,8 +47,6 @@ jobs: | |
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v2" | ||
with: | ||
python-version: "3.10" | ||
- name: "Linting: pydocstyle" | ||
run: "poetry run invoke pydocstyle" | ||
flake8: | ||
|
@@ -64,8 +58,6 @@ jobs: | |
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v2" | ||
with: | ||
python-version: "3.10" | ||
- name: "Linting: flake8" | ||
run: "poetry run invoke flake8" | ||
yamllint: | ||
|
@@ -77,8 +69,6 @@ jobs: | |
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v2" | ||
with: | ||
python-version: "3.10" | ||
- name: "Linting: yamllint" | ||
run: "poetry run invoke yamllint" | ||
pylint: | ||
|
@@ -93,7 +83,7 @@ jobs: | |
fail-fast: true | ||
matrix: | ||
python-version: ["3.8"] | ||
nautobot-version: ["1.4.0"] | ||
nautobot-version: ["1.6.0"] | ||
env: | ||
INVOKE_NAUTOBOT_SSOT_INFOBLOX_PYTHON_VER: "${{ matrix.python-version }}" | ||
INVOKE_NAUTOBOT_SSOT_INFOBLOX_NAUTOBOT_VER: "${{ matrix.nautobot-version }}" | ||
|
@@ -102,8 +92,23 @@ jobs: | |
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v2" | ||
- name: "Set up Docker Buildx" | ||
id: "buildx" | ||
uses: "docker/setup-buildx-action@v1" | ||
- name: "Build" | ||
uses: "docker/build-push-action@v2" | ||
with: | ||
python-version: "3.10" | ||
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: "Linting: pylint" | ||
|
@@ -114,8 +119,9 @@ jobs: | |
strategy: | ||
fail-fast: true | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
nautobot-version: ["1.4.2", "latest"] | ||
python-version: ["3.8", "3.9", "3.10"] | ||
db-backend: ["postgresql"] | ||
nautobot-version: ["1.5.0"] | ||
runs-on: "ubuntu-20.04" | ||
env: | ||
INVOKE_NAUTOBOT_SSOT_INFOBLOX_PYTHON_VER: "${{ matrix.python-version }}" | ||
|
@@ -125,12 +131,25 @@ jobs: | |
uses: "actions/checkout@v3" | ||
- name: "Setup environment" | ||
uses: "networktocode/gh-action-setup-poetry-environment@v2" | ||
- name: "Set up Docker Buildx" | ||
id: "buildx" | ||
uses: "docker/setup-buildx-action@v1" | ||
- name: "Build" | ||
uses: "docker/build-push-action@v2" | ||
with: | ||
python-version: "${{ matrix.python-version }}" | ||
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: "Run Tests" | ||
run: "poetry run invoke unittest" | ||
publish_gh: | ||
|
@@ -188,38 +207,38 @@ jobs: | |
with: | ||
user: "__token__" | ||
password: "${{ secrets.PYPI_API_TOKEN }}" | ||
slack-notify: | ||
needs: | ||
- "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" | ||
# slack-notify: | ||
# needs: | ||
# - "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 |
---|---|---|
@@ -1,13 +1,13 @@ | ||
--- | ||
name: "Nautobot Upstream Testing" | ||
|
||
on: # yamllint disable-line rule:truthy rule:comments | ||
on: # yamllint disable-line rule:truthy rule:comments | ||
schedule: | ||
- cron: "0 4 */2 * *" # every other day at midnight | ||
- 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 | ||
with: # Below could potentially be collapsed into a single argument if a concrete relationship between both is enforced | ||
invoke_context_name: "NAUTOBOT_SSOT_INFOBLOX" | ||
plugin_name: "nautobot-ssot-infoblox" |
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.