Skip to content

Commit

Permalink
Merge pull request #218 from nautobot/develop
Browse files Browse the repository at this point in the history
Release 4.4.0 - Main Branch
  • Loading branch information
jvanderaa committed Jun 29, 2023
2 parents f763778 + ea48b99 commit 4e36c4d
Show file tree
Hide file tree
Showing 89 changed files with 4,370 additions and 1,487 deletions.
147 changes: 5 additions & 142 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
---
name: "CI"
concurrency: # Cancel any existing runs of this workflow for this same PR
group: "${{ '{{ github.workflow }}' }}-${{ '{{ github.ref }}' }}"
cancel-in-progress: true
on: # yamllint disable
push:
branches:
Expand All @@ -8,147 +11,7 @@ on: # yamllint disable
pull_request:
release:
types: [published]
schedule:
- cron: "20 3 * * 1"

jobs:
lint:
runs-on: "ubuntu-20.04"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Linting"
run: "invoke lint"
test:
runs-on: "ubuntu-20.04"
strategy:
fail-fast: true
matrix:
# Add 3.6 back once we fix the sanity decode issue
python-version: ["3.7", "3.8", "3.9"]
env:
INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Tests"
run: "invoke unit"
needs:
- "lint"
integration:
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
# Need to check what is needed for the integration step
# python-version: ["3.6", "3.7", "3.8", "3.9"]
# nautobot-version: ["1.0.3", "1.1.1"]
# ansible-release: ["base", "core"]
include:
- python-version: "3.8"
nautobot-version: "1.3"
ansible-release: "base" # Ansible 2.10
- python-version: "3.8"
nautobot-version: "1.3"
ansible-release: "2.11"
- python-version: "3.8"
nautobot-version: "1.3"
ansible-release: "2.9"
- python-version: "3.8"
nautobot-version: "1.4"
ansible-release: "2.10"
- python-version: "3.8"
nautobot-version: "1.4"
ansible-release: "2.12"
# - python-version: "3.8"
# nautobot-version: "1.5"
# ansible-release: "2.12"
env:
INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_NAUTOBOT_ANSIBLE_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Install poetry"
if: "${{ matrix.ansible-release == '2.11' }}"
run: "pip install poetry==1.1.15"
- name: "Remove ansible-base"
if: "${{ matrix.ansible-release == '2.11' }}"
run: "poetry remove ansible-base"
- name: "Add ansible-core"
if: "${{ matrix.ansible-release == '2.11' }}"
run: "poetry add ansible-core@~2.11"
- name: "Install poetry"
if: "${{ matrix.ansible-release == '2.9' }}"
run: "pip install poetry==1.1.15"
- name: "Remove ansible-base"
if: "${{ matrix.ansible-release == '2.9' }}"
run: "poetry remove ansible-base"
- name: "Add Ansible 2.9"
if: "${{ matrix.ansible-release == '2.9' }}"
run: "poetry add ansible@~2.9"
- name: "Install poetry"
if: "${{ matrix.ansible-release == '2.12' }}"
run: "pip install poetry==1.1.15"
- name: "Remove ansible-base"
if: "${{ matrix.ansible-release == '2.12' }}"
run: "poetry remove ansible-base"
- name: "Add Ansible 2.12"
if: "${{ matrix.ansible-release == '2.12' }}"
run: "poetry add ansible-core@~2.12 --python ^${{ matrix.python-version }}"
- name: "Start containers"
run: "invoke start"
- name: "Tests"
run: "invoke integration"
needs:
- "test"
publish_github:
name: "Publish to GitHub"
runs-on: "ubuntu-20.04"
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.9"
- name: "Install Python Packages"
run: "pip install ansible-core"
- name: "Build the collection"
run: "ansible-galaxy collection build --output-path build"
- name: "Upload binaries to release"
uses: "svenstaro/upload-release-action@v2"
with:
repo_token: "${{ secrets.NTC_GITHUB_TOKEN }}"
file: "build/*"
tag: "${{ github.ref }}"
overwrite: true
file_glob: true
needs:
- "integration"
publish_galaxy:
name: "Publish to Ansible Galaxy"
runs-on: "ubuntu-20.04"
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.9"
- name: "Install Python Packages"
run: "pip install ansible-core"
- name: "Build the collection"
run: "ansible-galaxy collection build --output-path build"
- name: "Publish the collection"
run: "ansible-galaxy collection publish build/* --api-key=${{ secrets.GALAXY_API_TOKEN }}"
needs:
- "integration"
ci:
uses: ./.github/workflows/jobs.yml
145 changes: 145 additions & 0 deletions .github/workflows/jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
---
name: "Jobs"
on: # yamllint disable
workflow_call:

jobs:
lint:
runs-on: "ubuntu-20.04"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Linting"
run: "invoke lint"
unit:
runs-on: "ubuntu-20.04"
strategy:
fail-fast: true
matrix:
python-version: ["3.7", "3.8", "3.9"]
env:
INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Tests"
run: "invoke unit"
needs:
- "lint"
integration:
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
# Need to check what is needed for the integration step
# python-version: ["3.6", "3.7", "3.8", "3.9"]
# nautobot-version: ["1.0.3", "1.1.1"]
# ansible-release: ["base", "core"]
include:
- python-version: "3.8"
nautobot-version: "1.3"
ansible-release: "base" # Ansible 2.10
- python-version: "3.8"
nautobot-version: "1.3"
ansible-release: "2.11"
- python-version: "3.8"
nautobot-version: "1.3"
ansible-release: "2.9"
- python-version: "3.8"
nautobot-version: "1.4"
ansible-release: "2.10"
- python-version: "3.8"
nautobot-version: "1.4"
ansible-release: "2.12"
- python-version: "3.8"
nautobot-version: "1.5"
ansible-release: "2.12"
env:
INVOKE_NAUTOBOT_ANSIBLE_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_NAUTOBOT_ANSIBLE_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
- name: "Install invoke"
run: "pip install -U pip && pip install invoke"
- name: "Install poetry"
if: "${{ matrix.ansible-release == '2.11' }}"
run: "curl -sSL https://install.python-poetry.org | python3 -"
- name: "Remove ansible-base"
if: "${{ matrix.ansible-release == '2.11' }}"
run: "poetry remove ansible-base"
- name: "Add ansible-core"
if: "${{ matrix.ansible-release == '2.11' }}"
run: "poetry add ansible-core@~2.11"
- name: "Install poetry"
if: "${{ matrix.ansible-release == '2.9' }}"
run: "curl -sSL https://install.python-poetry.org | python3 -"
- name: "Remove ansible-base"
if: "${{ matrix.ansible-release == '2.9' }}"
run: "poetry remove ansible-base"
- name: "Add Ansible 2.9"
if: "${{ matrix.ansible-release == '2.9' }}"
run: "poetry add ansible@~2.9"
- name: "Install poetry"
if: "${{ matrix.ansible-release == '2.12' }}"
run: "curl -sSL https://install.python-poetry.org | python3 -"
- name: "Remove ansible-base"
if: "${{ matrix.ansible-release == '2.12' }}"
run: "poetry remove ansible-base"
- name: "Add Ansible 2.12"
if: "${{ matrix.ansible-release == '2.12' }}"
run: "poetry add ansible-core@~2.12 --python ^${{ matrix.python-version }}"
- name: "Start containers"
run: "invoke start"
- name: "Tests"
run: "invoke integration"
needs:
- "unit"
publish_github:
name: "Publish to GitHub"
runs-on: "ubuntu-20.04"
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.9"
- name: "Install Python Packages"
run: "pip install ansible-core"
- name: "Build the collection"
run: "ansible-galaxy collection build --output-path build"
- name: "Upload binaries to release"
uses: "svenstaro/upload-release-action@v2"
with:
repo_token: "${{ secrets.NTC_GITHUB_TOKEN }}"
file: "build/*"
tag: "${{ github.ref }}"
overwrite: true
file_glob: true
needs:
- "integration"
publish_galaxy:
name: "Publish to Ansible Galaxy"
runs-on: "ubuntu-20.04"
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
- name: "Set up Python"
uses: "actions/setup-python@v2"
with:
python-version: "3.9"
- name: "Install Python Packages"
run: "pip install ansible-core"
- name: "Build the collection"
run: "ansible-galaxy collection build --output-path build"
- name: "Publish the collection"
run: "ansible-galaxy collection publish build/* --api-key=${{ secrets.GALAXY_API_TOKEN }}"
needs:
- "integration"
9 changes: 9 additions & 0 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: "Scheduled CI"
on: # yamllint disable
schedule:
- cron: "20 3 * * 1"

jobs:
ci:
uses: ./.github/workflows/jobs.yml
31 changes: 31 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@ networktocode.nautobot Release Notes

.. contents:: Topics

v4.4.0
======

Release Summary
---------------

Adds plugin module and makes updates to HTTP handling on GraphQL

Minor Changes
-------------
- (#211) Removes codecov from dev dependencies
- (#203) Adds plugin module
- (#209) Catches HTTPError for GraphQL query and enables Ansible retries

v4.3.1
======

Release Summary
---------------

Adds Location and Location Type modules.

Bugfixes
--------
- (#170) Updates incorrect key name
- (#175) Adds additional key options for circuit termination and manufacturer

Minor Changes
-------------
- (#191) Added Location and Location Type modules

v4.2.0
======

Expand Down
7 changes: 7 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,10 @@ releases:
changes:
bugfixes:
- (#196) Virtual Chassis return multiple result at times

4.4.0:
changes:
minor_changes:
- (#211) Removes codecov from dev dependencies
- (#203) Adds plugin module
- (#209) Catches HTTPError for GraphQL query and enables Ansible retries
16 changes: 16 additions & 0 deletions development/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ARG NAUTOBOT_VER
ARG PYTHON_VER

FROM ghcr.io/nautobot/nautobot:${NAUTOBOT_VER}-py${PYTHON_VER} as nautobot

# Capture the argument again
ARG NAUTOBOT_VER

# Copy in the requirements file
COPY ./development/requirements${NAUTOBOT_VER}.txt /opt/nautobot/requirements.txt

# Install the requirements
RUN pip install -r /opt/nautobot/requirements.txt

# Copy in the development configuration file
COPY ./development/nautobot_config.py /opt/nautobot/nautobot_config.py

0 comments on commit 4e36c4d

Please sign in to comment.