-
Notifications
You must be signed in to change notification settings - Fork 31
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 #218 from nautobot/develop
Release 4.4.0 - Main Branch
- Loading branch information
Showing
89 changed files
with
4,370 additions
and
1,487 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
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,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" |
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,9 @@ | ||
--- | ||
name: "Scheduled CI" | ||
on: # yamllint disable | ||
schedule: | ||
- cron: "20 3 * * 1" | ||
|
||
jobs: | ||
ci: | ||
uses: ./.github/workflows/jobs.yml |
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 |
---|---|---|
@@ -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 |
Oops, something went wrong.