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

Cookie initialy baked by NetworkToCode Cookie Drift Manager Tool #240

Merged
merged 4 commits into from
Oct 31, 2023

Conversation

snaselj
Copy link
Contributor

@snaselj snaselj commented Oct 20, 2023

Template:

{
    "template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
    "dir": "nautobot-app",
    "ref": "develop",
    "path": null
}

Cookie:

{
    "remote": "https://github.com/nautobot/nautobot-plugin-device-lifecycle-mgmt.git",
    "path": "/opt/ntc/drift-manager/outputs/nautobot-plugin-device-lifecycle-mgmt",
    "repository_path": "/opt/ntc/drift-manager/outputs/nautobot-plugin-device-lifecycle-mgmt",
    "dir": "",
    "branch_prefix": "drift-manager",
    "context": {
        "codeowner_github_usernames": "@smith-ntc",
        "full_name": "Network to Code, LLC",
        "email": "[email protected]",
        "github_org": "nautobot",
        "plugin_name": "nautobot_device_lifecycle_mgmt",
        "verbose_name": "Device Lifecycle Management",
        "plugin_slug": "nautobot-device-lifecycle-mgmt",
        "project_slug": "nautobot-plugin-device-lifecycle-mgmt",
        "repo_url": "https://github.com/nautobot/nautobot-plugin-device-lifecycle-mgmt",
        "base_url": "nautobot-device-lifecycle-mgmt",
        "min_nautobot_version": "2.0.0",
        "max_nautobot_version": "2.9999",
        "camel_name": "NautobotDeviceLifecycleManagement",
        "project_short_description": "Device Lifecycle Management",
        "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/device-lifecycle/en/latest",
        "_template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
        "_output_dir": "/opt/ntc/drift-manager/outputs",
        "_repo_dir": "/opt/ntc/drift-manager/outputs/.cookiecutters/cookiecutter-nautobot-app/nautobot-app",
        "_checkout": "develop"
    },
    "base_branch": "develop",
    "remote_name": "origin",
    "pull_request_strategy": "PullRequestStrategy.CREATE",
    "post_actions": [
        "PostAction.BLACK"
    ],
    "baked_commit_ref": "",
    "draft": true
}

CLI Arguments:

{
    "cookie_dir": "",
    "input": false,
    "json_filename": "setup-cookie-device-lifecycle-mgmt.json",
    "output_dir": "./outputs",
    "push": true,
    "template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
    "template_dir": "nautobot-app",
    "template_ref": "develop",
    "pull_request": null,
    "post_action": [
        "black"
    ],
    "disable_post_actions": false,
    "draft": true
}

bakebot and others added 3 commits October 20, 2023 11:51
Template:

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

Cookie:

```
{
    "remote": "https://github.com/nautobot/nautobot-plugin-device-lifecycle-mgmt.git",
    "path": "/opt/ntc/drift-manager/outputs/nautobot-plugin-device-lifecycle-mgmt",
    "repository_path": "/opt/ntc/drift-manager/outputs/nautobot-plugin-device-lifecycle-mgmt",
    "dir": "",
    "branch_prefix": "drift-manager",
    "context": {
        "codeowner_github_usernames": "@smith-ntc",
        "full_name": "Network to Code, LLC",
        "email": "[email protected]",
        "github_org": "nautobot",
        "plugin_name": "nautobot_device_lifecycle_mgmt",
        "verbose_name": "Device Lifecycle Management",
        "plugin_slug": "nautobot-device-lifecycle-mgmt",
        "project_slug": "nautobot-plugin-device-lifecycle-mgmt",
        "repo_url": "https://github.com/nautobot/nautobot-plugin-device-lifecycle-mgmt",
        "base_url": "nautobot-device-lifecycle-mgmt",
        "min_nautobot_version": "2.0.0",
        "max_nautobot_version": "2.9999",
        "camel_name": "NautobotDeviceLifecycleManagement",
        "project_short_description": "Device Lifecycle Management",
        "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/device-lifecycle/en/latest",
        "_template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
        "_output_dir": "/opt/ntc/drift-manager/outputs",
        "_repo_dir": "/opt/ntc/drift-manager/outputs/.cookiecutters/cookiecutter-nautobot-app/nautobot-app",
        "_checkout": "develop"
    },
    "base_branch": "develop",
    "remote_name": "origin",
    "pull_request_strategy": "PullRequestStrategy.CREATE",
    "post_actions": [
        "PostAction.BLACK"
    ],
    "baked_commit_ref": "",
    "draft": true
}
```

CLI Arguments:

```
{
    "cookie_dir": "",
    "input": false,
    "json_filename": "setup-cookie-device-lifecycle-mgmt.json",
    "output_dir": "./outputs",
    "push": true,
    "template": "https://github.com/nautobot/cookiecutter-nautobot-app.git",
    "template_dir": "nautobot-app",
    "template_ref": "develop",
    "pull_request": null,
    "post_action": [
        "black"
    ],
    "disable_post_actions": false,
    "draft": true
}
```
@snaselj snaselj marked this pull request as ready for review October 20, 2023 12:58
@snaselj
Copy link
Contributor Author

snaselj commented Oct 20, 2023

This PR is ready for review now.

cc.: @whitej6

@@ -19,14 +19,15 @@ FROM ghcr.io/nautobot/nautobot-dev:${NAUTOBOT_VER}-py${PYTHON_VER}
ARG NAUTOBOT_ROOT=/opt/nautobot

ENV prometheus_multiproc_dir=/prom_cache
ENV NAUTOBOT_ROOT ${NAUTOBOT_ROOT}
ENV NAUTOBOT_ROOT=${NAUTOBOT_ROOT}
ENV INVOKE_NAUTOBOT_DEVICE_LIFECYCLE_MGMT_LOCAL=true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems a little strange to be inside the dockerfile, do we need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, with this, when running invoke inside the docker container, it uses local by default.

Without this environment variable, it would try to use docker compose inside the docker container.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah. Didn't realize we were running invoke within the container ever. Thought it was always run from local environment only. Is that new?

Copy link
Contributor Author

@snaselj snaselj Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using it quite often, adding this environment variable into the image is safe. Can be used in CI in the future as well.

@progala
Copy link
Contributor

progala commented Oct 31, 2023

LGTM. Thanks @snaselj !

@bradh11 bradh11 merged commit c17fb34 into develop Oct 31, 2023
14 checks passed
@bradh11 bradh11 deleted the drift-manager/pr branch October 31, 2023 14:07
This was referenced Oct 31, 2023
@progala progala mentioned this pull request Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants