Skip to content

Commit

Permalink
Cookie updated by NetworkToCode Cookie Drift Manager Tool (#337)
Browse files Browse the repository at this point in the history
* Cookie updated by NetworkToCode Cookie Drift Manager Tool

Template:

```
{
    "template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
    "dir": "nautobot-app",
    "ref": "refs/tags/nautobot-app-v2.4.0",
    "path": null
}
```

Cookie:

```
{
    "remote": "https://github.com/nautobot/nautobot-app-chatops.git",
    "path": "/tmp/tmp_5814wh_/nautobot-app-chatops",
    "repository_path": "/tmp/tmp_5814wh_/nautobot-app-chatops",
    "dir": "",
    "branch_prefix": "drift-manager",
    "context": {
        "codeowner_github_usernames": "@glennmatthews @jvanderaa @smk4664 @whitej6",
        "full_name": "Network to Code, LLC",
        "email": "[email protected]",
        "github_org": "nautobot",
        "app_name": "nautobot_chatops",
        "verbose_name": "Nautobot ChatOps App",
        "app_slug": "nautobot-chatops",
        "project_slug": "nautobot-app-chatops",
        "repo_url": "https://github.com/nautobot/nautobot-app-chatops",
        "base_url": "chatops",
        "min_nautobot_version": "2.0.0",
        "max_nautobot_version": "2.9999",
        "camel_name": "NautobotChatOpsApp",
        "project_short_description": "Nautobot ChatOps App",
        "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/chatops/en/latest",
        "_template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
        "_output_dir": "/tmp/tmp_5814wh_",
        "_repo_dir": "/github/home/.cookiecutters/cookiecutter-nautobot-app/nautobot-app",
        "_checkout": "refs/tags/nautobot-app-v2.4.0"
    },
    "base_branch": "develop",
    "remote_name": "origin",
    "pull_request_strategy": "PullRequestStrategy.CREATE",
    "post_actions": [
        "PostAction.RUFF",
        "PostAction.POETRY"
    ],
    "baked_commit_ref": "81d2070deb685f72fb02bf7f73be007d37ce3376",
    "draft": false
}
```

CLI Arguments:

```
{
    "cookie_dir": "",
    "input": false,
    "json_filename": "",
    "output_dir": "",
    "push": true,
    "template": "",
    "template_dir": "",
    "template_ref": "refs/tags/nautobot-app-v2.4.0",
    "pull_request": null,
    "post_action": [
        "ruff",
        "poetry"
    ],
    "disable_post_actions": true,
    "draft": false
}
```

* fix lock file

* Add back code removed by Drift Manager

* Fix RTD badge location

* Delete arch_decision.md

This file is unused and unreferenced in mkdocs.yml

* Remove duplicate run_command from tasks.py

---------

Co-authored-by: bakebot <[email protected]>
Co-authored-by: Gary Snider <[email protected]>
Co-authored-by: Stephen Kiely <[email protected]>
  • Loading branch information
4 people authored Oct 11, 2024
1 parent f734707 commit 5a49ede
Show file tree
Hide file tree
Showing 11 changed files with 650 additions and 434 deletions.
9 changes: 5 additions & 4 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@
"_drift_manager": {
"template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
"template_dir": "nautobot-app",
"template_ref": "refs/tags/nautobot-app-v2.3.2",
"template_ref": "refs/tags/nautobot-app-v2.4.0",
"cookie_dir": "",
"branch_prefix": "drift-manager",
"pull_request_strategy": "create",
"post_actions": [
"black"
"ruff",
"poetry"
],
"draft": true,
"baked_commit_ref": "81d2070deb685f72fb02bf7f73be007d37ce3376"
"draft": false,
"baked_commit_ref": "8b2952d1ee1fdae0ae408ac26a8d09c9485da662"
}
}
}
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
- name: "Linting: ruff"
run: "poetry run invoke ruff"
run: "poetry run invoke ruff --action lint"
check-docs-build:
runs-on: "ubuntu-22.04"
env:
Expand Down Expand Up @@ -176,9 +176,9 @@ jobs:
- name: "Run Tests"
run: "poetry run invoke unittest"
changelog:
if: |
if: >
contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) &&
(github.head_ref != 'main')
(github.head_ref != 'main') && (!startsWith(github.head_ref, 'release'))
runs-on: "ubuntu-22.04"
steps:
- name: "Check out repository code"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/upstream_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ name: "Nautobot Upstream Monitor"
on: # yamllint disable-line rule:truthy rule:comments
schedule:
- cron: "0 4 */2 * *" # every other day at midnight
workflow_dispatch:

jobs:
upstream-test:
uses: "nautobot/nautobot/.github/workflows/plugin_upstream_testing_base.yml@develop"
with: # Below could potentially be collapsed into a single argument if a concrete relationship between both is enforced
invoke_context_name: "NAUTOBOT_CHATOPS"
plugin_name: "nautobot-app-chatops"
plugin_name: "nautobot-chatops"
1 change: 1 addition & 0 deletions changes/+nautobot-app-v2.4.0.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rebaked from the cookie `nautobot-app-v2.4.0`.
6 changes: 4 additions & 2 deletions development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ WORKDIR /source
COPY . /source

# Build args must be declared in each stage
ARG NAUTOBOT_VER
ARG PYTHON_VER

# Constrain the Nautobot version to NAUTOBOT_VER
# Constrain the Nautobot version to NAUTOBOT_VER, fall back to installing from git branch if not available on PyPi
# In CI, this should be done outside of the Dockerfile to prevent cross-compile build failures
ARG CI
RUN if [ -z "${CI+x}" ]; then \
INSTALLED_NAUTOBOT_VER=$(pip show nautobot | grep "^Version" | sed "s/Version: //"); \
poetry add --lock nautobot@${INSTALLED_NAUTOBOT_VER} --python ${PYTHON_VER}; fi
poetry add --lock nautobot@${INSTALLED_NAUTOBOT_VER} --python ${PYTHON_VER} || \
poetry add --lock git+https://github.com/nautobot/nautobot.git#${NAUTOBOT_VER} --python ${PYTHON_VER}; fi

# Install the app
RUN poetry install --extras all --with dev
Expand Down
1 change: 1 addition & 0 deletions development/development.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ NAUTOBOT_BANNER_TOP="Local"
NAUTOBOT_CHANGELOG_RETENTION=0

NAUTOBOT_DEBUG=True
NAUTOBOT_LOG_DEPRECATION_WARNINGS=True
NAUTOBOT_LOG_LEVEL=DEBUG
NAUTOBOT_METRICS_ENABLED=True
NAUTOBOT_NAPALM_TIMEOUT=5
Expand Down
15 changes: 15 additions & 0 deletions development/towncrier_template.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@

# v{{ versiondata.version.split(".")[:2] | join(".") }} Release Notes

This document describes all new features and changes in the release. The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic
Versioning](https://semver.org/spec/v2.0.0.html).

## Release Overview

- Major features or milestones
- Changes to compatibility with Nautobot and/or other apps, libraries etc.

{% if render_title %}
## [v{{ versiondata.version }} ({{ versiondata.date }})](https://github.com/nautobot/nautobot-app-chatops/releases/tag/v{{ versiondata.version}})

Expand All @@ -12,7 +23,11 @@
{% if definitions[category]['showcontent'] %}
{% for text, values in sections[section][category].items() %}
{% for item in text.split('\n') %}
{% if values %}
- {{ values|join(', ') }} - {{ item.strip() }}
{% else %}
- {{ item.strip() }}
{% endif %}
{% endfor %}
{% endfor %}

Expand Down
24 changes: 7 additions & 17 deletions docs/dev/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,24 +187,14 @@ The branching policy includes the following tenets:

Nautobot ChatOps App will observe semantic versioning, as of 1.0. This may result in a quick turnaround in minor versions to keep pace with an ever-growing feature set.

### Backporting to Older Releases

If you are backporting any fixes to a prior major or minor version of this app, please open an issue, comment on an existing issue, or post in the [Network to Code Slack](https://networktocode.slack.com/) (channel `#nautobot`).

We will create a `release-X.Y` branch for you to open your PR against and cut a new release once the PR is successfully merged.

## Release Policy

Nautobot ChatOps App has currently no intended scheduled release schedule, and will release new features in minor versions.

When a new release, from `develop` to `main`, is created the following should happen.

- A release PR is created from `develop` with:
- Update the release notes in `docs/admin/release_notes/version_<major>.<minor>.md` file to reflect the changes.
- Change the version from `<major>.<minor>.<patch>-beta` to `<major>.<minor>.<patch>` in `pyproject.toml`.
- Set the PR to the `main` branch.
- Ensure the tests for the PR pass.
- Merge the PR.
- Create a new tag:
- The tag should be in the form of `v<major>.<minor>.<patch>`.
- The title should be in the form of `v<major>.<minor>.<patch>`.
- The description should be the changes that were added to the `version_<major>.<minor>.md` document.
- If merged into `main`, then push from `main` to `develop`, in order to retain the merge commit created when the PR was merged
- A post release PR is created with:
- Change the version from `<major>.<minor>.<patch>` to `<major>.<minor>.<patch + 1>-beta` in both `pyproject.toml` and `nautobot.__init__.__version__`.
- Set the PR to the proper branch, `develop`.
- Once tests pass, merge.
The steps taken by maintainers when creating a new release are documented in the [release checklist](./release_checklist.md).
Loading

0 comments on commit 5a49ede

Please sign in to comment.