-
Notifications
You must be signed in to change notification settings - Fork 966
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'netbox-community:master' into master
- Loading branch information
Showing
6,717 changed files
with
336,220 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "netbox_devicetype-library", | ||
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye", | ||
"remoteEnv": { | ||
"HISTSIZE": "10000", | ||
"HISTFILESIZE": "20000" | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "pip install -r requirements.txt", | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"DavidAnson.vscode-markdownlint", | ||
"EditorConfig.EditorConfig", | ||
"Percy.vscode-pydata-viewer", | ||
"Tyriar.sort-lines", | ||
"charliermarsh.ruff", | ||
"esbenp.prettier-vscode", | ||
"ms-python.python", | ||
"ms-vscode-remote.vscode-remote-extensionpack", | ||
"redhat.vscode-yaml" | ||
] | ||
} | ||
} | ||
} |
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,8 @@ | ||
root = true | ||
|
||
[*] | ||
insert_final_newline = true | ||
|
||
[*.{yaml,yml}] | ||
indent_style = space | ||
indent_size = 2 |
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,30 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
labels: | ||
- dependencies | ||
target-branch: master | ||
assignees: | ||
- danner26 | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
labels: | ||
- dependencies | ||
target-branch: master | ||
assignees: | ||
- danner26 | ||
- package-ecosystem: devcontainers | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
labels: | ||
- dependencies | ||
target-branch: master | ||
assignees: | ||
- danner26 |
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,60 @@ | ||
--- | ||
name: update-cache | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build-validate-cache: | ||
name: Build Lint and Format Cache | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
id: setup_python | ||
with: | ||
python-version: '3.9' | ||
- name: cache virtualenv | ||
uses: actions/cache@v4 | ||
id: cache-venv | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}- | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
build-pytest-cache: | ||
name: Build PyTest Cache | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
id: setup_python | ||
with: | ||
python-version: '3.9' | ||
- name: cache virtualenv | ||
uses: actions/cache@v4 | ||
id: cache-venv-pytest | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}-pytest-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}-pytest- | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
python -m pip install pytest-github-actions-annotate-failures | ||
if: steps.cache-venv-pytest.outputs.cache-hit != 'true' |
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,58 @@ | ||
--- | ||
name: Create Master Slug List on PR Merge | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build: | ||
if: "!contains(github.event.head_commit.message, 'Regenerate master slug list after successful PR merge')" | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ssh-key: ${{secrets.SLUG_DEPLOY_KEY}} | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
id: setup_python | ||
with: | ||
python-version: '3.9' | ||
- name: cache virtualenv | ||
uses: actions/cache@v4 | ||
id: cache-venv | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}- | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
if: steps.cache-venv.outputs.cache-hit != 'true' | ||
- name: Regenerate Master Slug List | ||
run: python3 tests/generate-slug-list.py | ||
- name: Set-Up Git | ||
run: | | ||
git config --global user.name 'NetBox-Bot' | ||
git config --global user.email 'info@netboxlabs.com' | ||
- name: Commit | ||
run: | | ||
git add . | ||
git commit -m "Regenerate master slug list after successful PR merge" | ||
- name: Push to remote | ||
run: | | ||
git push | ||
# - name: Commit and Push Changes to Master | ||
# uses: EndBug/add-and-commit@v9 | ||
# with: | ||
# author_name: NetBox-Bot | ||
# author_email: info@netboxlabs.com | ||
# committer_name: NetBox-Bot | ||
# committer_email: info@netboxlabs.com | ||
# default_author: github_actions | ||
# message: "Regenerate master slug list after successful PR merge" | ||
# push: true |
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 @@ | ||
--- | ||
# https://github.com/actions/stale | ||
name: Close stale PRs | ||
on: | ||
schedule: | ||
- cron: 0 4 * * * | ||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
close-pr-message: > | ||
This PR has been automatically closed due to lack of activity. Please reopen if you would like to to re-review it. | ||
days-before-stale: 30 | ||
days-before-close: 7 | ||
operations-per-run: 100 | ||
remove-stale-when-updated: false | ||
stale-pr-label: stale | ||
stale-pr-message: > | ||
This PR has been automatically marked as stale because it has not | ||
had recent activity. It will be closed automatically if no further | ||
progress is made. |
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,69 @@ | ||
--- | ||
name: Gather New NetBox Generated Schema JSON | ||
on: | ||
schedule: | ||
- cron: 0 */12 * * * | ||
jobs: | ||
schema-update: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: write | ||
issues: write | ||
pull-requests: write | ||
contents: write | ||
steps: | ||
- name: Get NetBox Latest Release | ||
id: netbox-release | ||
uses: pozetroninc/github-action-get-latest-release@master | ||
with: | ||
repository: netbox-community/netbox | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
if: ${{ steps.netbox-release.outputs.release != vars.SCHEMA_VERSION }} | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
id: setup_python | ||
with: | ||
python-version: '3.9' | ||
if: ${{ steps.netbox-release.outputs.release != vars.SCHEMA_VERSION }} | ||
- name: cache virtualenv | ||
uses: actions/cache@v4 | ||
id: cache-venv | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}-${{ env.pythonLocation }}- | ||
if: ${{ steps.netbox-release.outputs.release != vars.SCHEMA_VERSION }} | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements.txt | ||
if: ${{ steps.cache-venv.outputs.cache-hit != 'true' && steps.netbox-release.outputs.release != vars.SCHEMA_VERSION }} | ||
- name: Regenerate Master Slug List | ||
run: python3 scripts/update-schema.py | ||
if: ${{ steps.netbox-release.outputs.release != vars.SCHEMA_VERSION }} | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
commit-message: Regenerate master slug list after successful PR merge | ||
committer: NetBox-Bot <info@netboxlabs.com> | ||
author: NetBox-Bot <info@netboxlabs.com> | ||
branch: ${{ steps.netbox-release.outputs.release }} | ||
delete-branch: true | ||
base: master | ||
title: NetBox ${{ steps.netbox-release.outputs.release }} Generated Schema JSON | ||
body: | | ||
Adding generated_schema.json from NetBox ${{ steps.netbox-release.outputs.release }} | ||
assignees: danner26 | ||
reviewers: danner26 | ||
if: ${{ steps.netbox-release.outputs.release != vars.SCHEMA_VERSION }} | ||
# - name: Update Repository SCHEMA_VERSION | ||
# uses: action-pack/set-variable@v1 | ||
# with: | ||
# name: 'SCHEMA_VERSION' | ||
# value: ${{ steps.netbox-release.outputs.release }} | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# if: ${{ steps.netbox-release.outputs.release != vars.SCHEMA_VERSION }} |
Oops, something went wrong.