Skip to content

Commit 7dabc05

Browse files
nautobot-botbakebotgsnider2195
authored
Cookie updated by NetworkToCode Cookie Drift Manager Tool (#229)
* Cookie updated by NetworkToCode Cookie Drift Manager Tool Template: ``` { "template": "https://github.com/nautobot/cookiecutter-nautobot-app.git", "dir": "nautobot-app", "ref": "nautobot-app-v2.7.0", "path": null } ``` Cookie: ``` { "remote": "https://github.com/nautobot/nautobot-app-netbox-importer.git", "path": "/tmp/tmpt2jy1ug0/nautobot-app-netbox-importer", "repository_path": "/tmp/tmpt2jy1ug0/nautobot-app-netbox-importer", "dir": "", "branch_prefix": "drift-manager", "context": { "codeowner_github_usernames": "@nautobot/maintain-nautobot-apps", "full_name": "Network to Code, LLC", "email": "opensource@networktocode.com", "github_org": "nautobot", "app_name": "nautobot_netbox_importer", "verbose_name": "Nautobot NetBox Importer", "app_slug": "nautobot-netbox-importer", "project_slug": "nautobot-app-netbox-importer", "repo_url": "https://github.com/nautobot/nautobot-app-netbox-importer", "base_url": "netbox-importer", "camel_name": "NautobotNetboxImporter", "project_short_description": "Data importer from NetBox 3.x to Nautobot 2.x.", "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/netbox-importer/en/latest", "_extensions": [ "local_extensions.camel_case_to_kebab", "local_extensions.camel_case_to_words", "local_extensions.NautobotVersions" ], "_template": "https://github.com/nautobot/cookiecutter-nautobot-app.git", "_output_dir": "/tmp/tmpt2jy1ug0", "_repo_dir": "/github/home/.cookiecutters/cookiecutter-nautobot-app/nautobot-app", "_checkout": "nautobot-app-v2.7.0" }, "base_branch": "develop", "remote_name": "origin", "pull_request_strategy": "PullRequestStrategy.UPDATE_OR_CREATE", "post_actions": [], "baked_commit_ref": "200ba6cff7edd47c51c81277542af0fa864023b4", "draft": false } ``` CLI Arguments: ``` { "cookie_dir": "", "input": false, "json_filename": "", "output_dir": "", "push": true, "template": "", "template_dir": "", "template_ref": "nautobot-app-v2.7.0", "pull_request": "update-or-create", "post_action": [], "disable_post_actions": true, "draft": null } ``` * resolve merge conflicts --------- Co-authored-by: bakebot <info@networktocode.com> Co-authored-by: Gary Snider <75227981+gsnider2195@users.noreply.github.com>
1 parent 7947fe4 commit 7dabc05

21 files changed

+451
-428
lines changed

.cookiecutter.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
"_drift_manager": {
2020
"template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
2121
"template_dir": "nautobot-app",
22-
"template_ref": "nautobot-app-v2.6.0",
22+
"template_ref": "nautobot-app-v2.7.0",
2323
"cookie_dir": "",
2424
"branch_prefix": "drift-manager",
2525
"pull_request_strategy": "update-or-create",
2626
"post_actions": [],
2727
"draft": false,
28-
"baked_commit_ref": "200ba6cff7edd47c51c81277542af0fa864023b4"
28+
"baked_commit_ref": "1d837e45d6745ff3ea72db0d0e7fddad281ebe98"
2929
}
3030
}
3131
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ labels:
77

88
### Environment
99
* Python version: <!-- Example: 3.11.4 -->
10-
* Nautobot version: <!-- Example: 2.4.2 -->
10+
* Nautobot version: <!-- Example: 2.4.20 -->
1111
* nautobot-netbox-importer version: <!-- Example: 1.0.0 -->
1212

1313
<!-- What did you expect to happen? -->

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ labels:
66
---
77

88
### Environment
9-
* Nautobot version: <!-- Example: 2.4.2 -->
9+
* Nautobot version: <!-- Example: 2.4.20 -->
1010
* nautobot-netbox-importer version: <!-- Example: 1.0.0 -->
1111

1212
<!--

.github/workflows/ci.yml

Lines changed: 7 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on: # yamllint disable-line rule:truthy rule:comments
88
branches:
99
- "main"
1010
- "develop"
11-
tags:
12-
- "v*"
1311
pull_request: ~
1412

1513
env:
@@ -106,8 +104,8 @@ jobs:
106104
strategy:
107105
fail-fast: true
108106
matrix:
109-
python-version: ["3.12"]
110-
nautobot-version: ["2.4.9"]
107+
python-version: ["3.11"]
108+
nautobot-version: ["2.4.20"]
111109
env:
112110
INVOKE_NAUTOBOT_NETBOX_IMPORTER_PYTHON_VER: "${{ matrix.python-version }}"
113111
INVOKE_NAUTOBOT_NETBOX_IMPORTER_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
@@ -121,8 +119,7 @@ jobs:
121119
- name: "Constrain Nautobot version and regenerate lock file"
122120
env:
123121
INVOKE_NAUTOBOT_NETBOX_IMPORTER_LOCAL: "true"
124-
PY_CONSTRAINT: "${{ matrix.python-version == '3.9' && '3.9.2' || matrix.python-version }}"
125-
run: "poetry run invoke lock --constrain-nautobot-ver --constrain-python-ver=${{ env.PY_CONSTRAINT }}"
122+
run: "poetry run invoke lock --constrain-nautobot-ver --constrain-python-ver=${{ matrix.python-version }}"
126123
- name: "Set up Docker Buildx"
127124
id: "buildx"
128125
uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0
@@ -153,9 +150,9 @@ jobs:
153150
strategy:
154151
fail-fast: true
155152
matrix:
156-
python-version: ["3.9"] # 3.12 2.4 is tested in unittest_report stage.
153+
python-version: ["3.10"] # 3.12 2.4 is tested in unittest_report stage.
157154
db-backend: ["postgresql"]
158-
nautobot-version: ["2.4.9"]
155+
nautobot-version: ["2.4.20"]
159156
runs-on: "ubuntu-latest"
160157
env:
161158
INVOKE_NAUTOBOT_NETBOX_IMPORTER_PYTHON_VER: "${{ matrix.python-version }}"
@@ -170,8 +167,7 @@ jobs:
170167
- name: "Constrain Nautobot version and regenerate lock file"
171168
env:
172169
INVOKE_NAUTOBOT_NETBOX_IMPORTER_LOCAL: "true"
173-
PY_CONSTRAINT: "${{ matrix.python-version == '3.9' && '3.9.2' || matrix.python-version }}"
174-
run: "poetry run invoke lock --constrain-nautobot-ver --constrain-python-ver=${{ env.PY_CONSTRAINT }}"
170+
run: "poetry run invoke lock --constrain-nautobot-ver --constrain-python-ver=${{ matrix.python-version }}"
175171
- name: "Set up Docker Buildx"
176172
id: "buildx"
177173
uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0
@@ -222,8 +218,7 @@ jobs:
222218
- name: "Constrain Nautobot version and regenerate lock file"
223219
env:
224220
INVOKE_NAUTOBOT_NETBOX_IMPORTER_LOCAL: "true"
225-
PY_CONSTRAINT: "${{ matrix.python-version == '3.9' && '3.9.2' || matrix.python-version }}"
226-
run: "poetry run invoke lock --constrain-nautobot-ver --constrain-python-ver=${{ env.PY_CONSTRAINT }}"
221+
run: "poetry run invoke lock --constrain-nautobot-ver --constrain-python-ver=${{ matrix.python-version }}"
227222
- name: "Set up Docker Buildx"
228223
id: "buildx"
229224
uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0
@@ -288,101 +283,3 @@ jobs:
288283
run: |
289284
git fetch --no-tags origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
290285
poetry run towncrier check --compare-with origin/${{ github.base_ref }}
291-
publish_gh:
292-
needs:
293-
- "unittest"
294-
- "unittest_report"
295-
name: "Publish to GitHub"
296-
runs-on: "ubuntu-latest"
297-
if: "startsWith(github.ref, 'refs/tags/v')"
298-
env:
299-
INVOKE_NAUTOBOT_NETBOX_IMPORTER_LOCAL: "True"
300-
permissions:
301-
contents: "write"
302-
steps:
303-
- name: "Check out repository code"
304-
uses: "actions/checkout@v4"
305-
- name: "Setup environment"
306-
uses: "networktocode/gh-action-setup-poetry-environment@v6"
307-
with:
308-
poetry-version: "2.1.3"
309-
python-version: "3.12"
310-
poetry-install-options: "--no-root"
311-
- name: "Set env"
312-
run: "echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV"
313-
- name: "Run Poetry Version"
314-
run: "poetry version $RELEASE_VERSION"
315-
- name: "Build Documentation"
316-
run: "poetry run invoke build-and-check-docs"
317-
- name: "Run Poetry Build"
318-
run: "poetry build"
319-
- name: "Upload binaries to release"
320-
run: "gh release upload ${{ github.ref_name }} dist/*.{tar.gz,whl}"
321-
env:
322-
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
323-
publish_pypi:
324-
needs:
325-
- "unittest"
326-
- "unittest_report"
327-
name: "Push Package to PyPI"
328-
runs-on: "ubuntu-latest"
329-
if: "startsWith(github.ref, 'refs/tags/v')"
330-
env:
331-
INVOKE_NAUTOBOT_NETBOX_IMPORTER_LOCAL: "True"
332-
steps:
333-
- name: "Check out repository code"
334-
uses: "actions/checkout@v4"
335-
- name: "Setup environment"
336-
uses: "networktocode/gh-action-setup-poetry-environment@v6"
337-
with:
338-
poetry-version: "2.1.3"
339-
python-version: "3.12"
340-
poetry-install-options: "--no-root"
341-
- name: "Set env"
342-
run: "echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV"
343-
- name: "Run Poetry Version"
344-
run: "poetry version $RELEASE_VERSION"
345-
- name: "Build Documentation"
346-
run: "poetry run invoke build-and-check-docs"
347-
- name: "Run Poetry Build"
348-
run: "poetry build"
349-
- name: "Push to PyPI"
350-
uses: "pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc" # v1.12.4
351-
with:
352-
user: "__token__"
353-
password: "${{ secrets.PYPI_API_TOKEN }}"
354-
slack-notify:
355-
needs:
356-
- "publish_gh"
357-
- "publish_pypi"
358-
runs-on: "ubuntu-latest"
359-
env:
360-
SLACK_WEBHOOK_URL: "${{ secrets.OSS_PYPI_SLACK_WEBHOOK_URL }}"
361-
SLACK_MESSAGE: >-
362-
*NOTIFICATION: NEW-RELEASE-PUBLISHED*\n
363-
Repository: <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>\n
364-
Release: <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>\n
365-
Published by: <${{ github.server_url }}/${{ github.actor }}|${{ github.actor }}>
366-
steps:
367-
- name: "Send a notification to Slack"
368-
# ENVs cannot be used directly in job.if. This is a workaround to check
369-
# if SLACK_WEBHOOK_URL is present.
370-
if: "env.SLACK_WEBHOOK_URL != ''"
371-
uses: "slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3" # v1.27.1
372-
with:
373-
payload: |
374-
{
375-
"text": "${{ env.SLACK_MESSAGE }}",
376-
"blocks": [
377-
{
378-
"type": "section",
379-
"text": {
380-
"type": "mrkdwn",
381-
"text": "${{ env.SLACK_MESSAGE }}"
382-
}
383-
}
384-
]
385-
}
386-
env:
387-
SLACK_WEBHOOK_URL: "${{ secrets.OSS_PYPI_SLACK_WEBHOOK_URL }}"
388-
SLACK_WEBHOOK_TYPE: "INCOMING_WEBHOOK"

.github/workflows/release.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
name: "Release"
3+
on: # yamllint disable-line rule:truthy rule:comments
4+
release:
5+
types: ["published"]
6+
7+
jobs:
8+
build:
9+
name: "Build package with poetry"
10+
runs-on: "ubuntu-latest"
11+
if: "startsWith(github.ref, 'refs/tags/v')"
12+
steps:
13+
- uses: "actions/checkout@v4"
14+
- name: "Setup environment"
15+
uses: "networktocode/gh-action-setup-poetry-environment@v6"
16+
with:
17+
poetry-version: "2.1.3"
18+
poetry-install-options: "--dry-run"
19+
- name: "Run Poetry Build"
20+
run: "poetry build"
21+
22+
- name: "Check that the release tag matches the version in pyproject.toml"
23+
run: |
24+
if [ "${{ github.ref_name }}" != "v$(poetry version -s)" ]; then exit 1; fi
25+
26+
- uses: "actions/upload-artifact@v4"
27+
with:
28+
name: "distfiles"
29+
path: "dist/"
30+
if-no-files-found: "error"
31+
32+
publish-github:
33+
name: "Publish to GitHub"
34+
runs-on: "ubuntu-latest"
35+
if: "startsWith(github.ref, 'refs/tags/v')"
36+
permissions:
37+
contents: "write"
38+
needs: "build"
39+
steps:
40+
- uses: "actions/checkout@v4"
41+
- name: "Retrieve built package from cache"
42+
uses: "actions/download-artifact@v4"
43+
with:
44+
name: "distfiles"
45+
path: "dist/"
46+
47+
- name: "Upload binaries to release"
48+
run: "gh release upload ${{ github.ref_name }} dist/*.{tar.gz,whl}"
49+
env:
50+
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
51+
52+
publish-pypi:
53+
name: "Push Package to PyPI"
54+
runs-on: "ubuntu-latest"
55+
if: "startsWith(github.ref, 'refs/tags/v')"
56+
needs: "build"
57+
environment: "pypi"
58+
permissions:
59+
# IMPORTANT: this permission is mandatory for Trusted Publishing
60+
id-token: "write"
61+
steps:
62+
- name: "Retrieve built package from cache"
63+
uses: "actions/download-artifact@v4"
64+
with:
65+
name: "distfiles"
66+
path: "dist/"
67+
68+
- name: "Publish package distributions to PyPI"
69+
uses: "pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e" # v1.13.0
70+
71+
slack-notify:
72+
needs:
73+
- "publish-github"
74+
- "publish-pypi"
75+
runs-on: "ubuntu-latest"
76+
env:
77+
# Secrets cannot be directly referenced in if: conditionals. They must be set as a job env var first.
78+
# Ref: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-using-secrets
79+
SLACK_WEBHOOK_URL: "${{ secrets.OSS_PYPI_SLACK_WEBHOOK_URL }}"
80+
SLACK_WEBHOOK_TYPE: "INCOMING_WEBHOOK"
81+
SLACK_MESSAGE: >-
82+
*NOTIFICATION: NEW-RELEASE-PUBLISHED*\n
83+
Repository: <${{ github.server_url }}/${{ github.repository }}|${{ github.repository }}>\n
84+
Release: <${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}|${{ github.ref_name }}>\n
85+
Published by: <${{ github.server_url }}/${{ github.actor }}|${{ github.actor }}>
86+
steps:
87+
- name: "Send a notification to Slack"
88+
if: "${{ env.SLACK_WEBHOOK_URL != '' }}"
89+
uses: "slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3" # v1.27.1
90+
with:
91+
payload: |
92+
{
93+
"text": "${{ env.SLACK_MESSAGE }}",
94+
"blocks": [
95+
{
96+
"type": "section",
97+
"text": {
98+
"type": "mrkdwn",
99+
"text": "${{ env.SLACK_MESSAGE }}"
100+
}
101+
}
102+
]
103+
}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,10 @@ fabric.properties
296296
.vscode/*
297297
*.code-workspace
298298

299-
# Rando
299+
# Random
300300
creds.env
301301
development/*.txt
302+
!development/towncrier_header.txt
302303

303304
# Invoke overrides
304305
invoke.yml
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Rebaked from the cookie `nautobot-app-v2.7.0`.

development/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
# -------------------------------------------------------------------------------------
77
# !!! USE CAUTION WHEN MODIFYING LINES BELOW
88

9-
# Accepts a desired Nautobot version as build argument, default to 2.4.9
10-
ARG NAUTOBOT_VER="2.4.9"
9+
# Accepts a desired Nautobot version as build argument, default to 2.4.20
10+
ARG NAUTOBOT_VER="2.4.20"
1111

1212
# Accepts a desired Python version as build argument, default to 3.12
1313
ARG PYTHON_VER="3.12"

0 commit comments

Comments
 (0)