Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev to main to fix docs #119

Merged
merged 12 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
"project_slug": "nautobot-plugin-secrets-providers",
"repo_url": "https://github.com/nautobot/nautobot-plugin-secrets-providers",
"base_url": "secrets-providers",
"min_nautobot_version": "1.4.0",
"max_nautobot_version": "1.9999",
"nautobot_version": "latest",
"min_nautobot_version": "2.0.0",
"max_nautobot_version": "2.9999",
"camel_name": "NautobotSecretsProviders",
"project_short_description": "Nautobot's Secrets Providers Plugin",
"version": "0.1.0",
"model_class_name": "None",
"open_source_license": "Apache-2.0",
"docs_base_url": "https://docs.nautobot.com",
Expand All @@ -25,7 +23,13 @@
"template_dir": "nautobot-app",
"template_ref": "develop",
"cookie_dir": "",
"branch_prefix": "drift-manager"
"branch_prefix": "drift-manager",
"pull_request_strategy": "create",
"post_actions": [
"black"
],
"draft": true,
"baked_commit_ref": "7aafeac5f8c1fb13196084cd328043b2e9d74a3a"
}
}
}
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ about: Report a reproducible bug in the current release of nautobot-secrets-prov
---

### Environment
* Python version: <!-- Example: 3.7.7 -->
* Nautobot version: <!-- Example: 1.4.0 -->
* nautobot-secrets-providers version: <!-- Example: 0.1.0 -->
* Python version: <!-- Example: 3.11.4 -->
* Nautobot version: <!-- Example: 2.0.0 -->
* nautobot-secrets-providers version: <!-- Example: 1.0.0 -->

<!-- What did you expect to happen? -->
### Expected Behavior
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ about: Propose a new feature or enhancement
---

### Environment
* Nautobot version: <!-- Example: 1.4.0 -->
* nautobot-secrets-providers version: <!-- Example: 0.1.0 -->
* Nautobot version: <!-- Example: 2.0.0 -->
* nautobot-secrets-providers version: <!-- Example: 1.0.0 -->

<!--
Describe in detail the new functionality you are proposing.
Expand Down
39 changes: 32 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
## New Pull Request
<!--
Thank you for your interest in contributing to Nautobot! Please note
that our contribution policy recommends that a feature request or bug
report be opened for approval prior to filing a pull request. This
helps avoid wasting time and effort on something that we might not
be able to accept.

Have you:
- [ ] Updated the README if necessary?
- [ ] Updated any configuration settings?
- [ ] Written a unit test?
Please indicate the relevant feature request or bug report below.
-->

## Change Notes
# Closes: #<ISSUE NUMBER GOES HERE>

## Justification
## What's Changed

<!--
Please include:
- A summary of the proposed changes
- A sectioned breakdown for larger features under ## subheadings
- Screenshots, example payloads where relevant:
- Before/After for bugfixes
- Using a new feature
-->

## To Do

<!--
Please feel free to update todos to keep track of your own notes for WIP PRs.
-->
- [ ] Explanation of Change(s)
- [ ] Added change log fragment(s) (for more information see [the documentation](https://docs.nautobot.com/projects/core/en/stable/development/#creating-changelog-fragments))
- [ ] Attached Screenshots, Payload Example
- [ ] Unit, Integration Tests
- [ ] Documentation Updates (when adding/changing features)
- [ ] Example Plugin Updates (when adding/changing features)
- [ ] Outline Remaining Work, Constraints from Design
126 changes: 95 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,56 +18,67 @@ env:

jobs:
black:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: black"
run: "poetry run invoke black"
bandit:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: bandit"
run: "poetry run invoke bandit"
pydocstyle:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: pydocstyle"
run: "poetry run invoke pydocstyle"
flake8:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: flake8"
run: "poetry run invoke flake8"
poetry:
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Checking: poetry lock file"
run: "poetry run invoke lock --check"
yamllint:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Linting: yamllint"
Expand All @@ -78,26 +89,28 @@ jobs:
- "bandit"
- "pydocstyle"
- "flake8"
- "poetry"
- "yamllint"
runs-on: "ubuntu-20.04"
- "black"
runs-on: "ubuntu-22.04"
strategy:
fail-fast: true
matrix:
python-version: ["3.8"]
python-version: ["3.11"]
nautobot-version: ["2.0.0"]
env:
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@v1"
uses: "docker/setup-buildx-action@v3"
- name: "Build"
uses: "docker/build-push-action@v2"
uses: "docker/build-push-action@v5"
with:
builder: "${{ steps.buildx.outputs.name }}"
context: "./"
Expand All @@ -114,29 +127,80 @@ jobs:
run: "cp development/creds.example.env development/creds.env"
- name: "Linting: pylint"
run: "poetry run invoke pylint"
check-migrations:
needs:
- "bandit"
- "pydocstyle"
- "flake8"
- "poetry"
- "yamllint"
- "black"
runs-on: "ubuntu-22.04"
strategy:
fail-fast: true
matrix:
python-version: ["3.11"]
nautobot-version: ["2.0.0"]
env:
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@v3"
- name: "Build"
uses: "docker/build-push-action@v5"
with:
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: "Checking: migrations"
run: "poetry run invoke check-migrations"
unittest:
needs:
- "pylint"
- "check-migrations"
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.11"]
nautobot-version: ["2.0.0", "stable"]
db-backend: ["postgresql", "mysql"]
runs-on: "ubuntu-20.04"
db-backend: ["postgresql"]
nautobot-version: ["stable"]
include:
- python-version: "3.11"
db-backend: "postgresql"
nautobot-version: "2.0.0"
- python-version: "3.11"
db-backend: "mysql"
nautobot-version: "stable"
runs-on: "ubuntu-22.04"
env:
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_NAUTOBOT_SECRETS_PROVIDERS_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v4"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@v1"
uses: "docker/setup-buildx-action@v3"
- name: "Build"
uses: "docker/build-push-action@v2"
uses: "docker/build-push-action@v5"
with:
builder: "${{ steps.buildx.outputs.name }}"
context: "./"
Expand All @@ -160,15 +224,15 @@ jobs:
needs:
- "unittest"
name: "Publish to GitHub"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v2"
uses: "actions/setup-python@v4"
with:
python-version: "3.9"
python-version: "3.11"
- name: "Install Python Packages"
run: "pip install poetry"
- name: "Set env"
Expand All @@ -189,15 +253,15 @@ jobs:
needs:
- "unittest"
name: "Push Package to PyPI"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
if: "startsWith(github.ref, 'refs/tags/v')"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v3"
uses: "actions/checkout@v4"
- name: "Set up Python"
uses: "actions/setup-python@v2"
uses: "actions/setup-python@v4"
with:
python-version: "3.9"
python-version: "3.11"
- name: "Install Python Packages"
run: "pip install poetry"
- name: "Set env"
Expand All @@ -215,7 +279,7 @@ jobs:
needs:
- "publish_gh"
- "publish_pypi"
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
env:
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
SLACK_MESSAGE: >-
Expand All @@ -228,7 +292,7 @@ jobs:
# 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/slack-github-action@v1.17.0"
uses: "slackapi/slack-github-action@v1"
with:
payload: |
{
Expand Down
Loading
Loading