Skip to content

Commit 6038e7c

Browse files
committed
fix check-in-docker
1 parent 7ed7481 commit 6038e7c

5 files changed

Lines changed: 7 additions & 27 deletions

File tree

‎.github/workflows/ntc-ci.yml‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,9 @@ on: # yamllint disable-line rule:truthy rule:comments
2626
required: true
2727
type: "string"
2828
project_name:
29-
description: "Distribution / image name (e.g. nautobot-golden-config, pyntc, netutils)."
29+
description: "Distribution / image name (e.g. nautobot-golden-config, pyntc, netutils). INVOKE_<NAME>_* env vars use it upper-cased with '-' replaced by '_'."
3030
required: true
3131
type: "string"
32-
invoke_context_name:
33-
description: "Invoke context name used for INVOKE_<NAME>_* env vars. Defaults to project_name upper-cased with '-' replaced by '_'."
34-
required: false
35-
type: "string"
36-
default: ""
3732
min_nautobot_version:
3833
description: "nautobot-app only (required): lowest supported Nautobot version, used for the docker checks and the minimum unit test run."
3934
required: false
@@ -135,7 +130,6 @@ jobs:
135130
- name: "Resolve invoke context, matrices and PR type"
136131
id: "resolve"
137132
env:
138-
INVOKE_CONTEXT_NAME: "${{ inputs.invoke_context_name }}"
139133
MIN_NAUTOBOT_VERSION: "${{ inputs.min_nautobot_version }}"
140134
MIN_PYTHON_VERSION: "${{ inputs.min_python_version }}"
141135
MAX_PYTHON_VERSION: "${{ inputs.max_python_version }}"
@@ -163,9 +157,7 @@ jobs:
163157
*) echo "::error::project_type must be 'nautobot-app' or 'python-library' (got '$PROJECT_TYPE')"; exit 1 ;;
164158
esac
165159
166-
if [ -z "$INVOKE_CONTEXT_NAME" ]; then
167-
INVOKE_CONTEXT_NAME=$(echo "$PROJECT_NAME" | tr '[:lower:]-' '[:upper:]_')
168-
fi
160+
INVOKE_CONTEXT_NAME=$(echo "$PROJECT_NAME" | tr '[:lower:]-' '[:upper:]_')
169161
170162
if [ -z "$REGENERATE_LOCKFILE" ]; then
171163
[ "$PROJECT_TYPE" = "nautobot-app" ] && REGENERATE_LOCKFILE="true" || REGENERATE_LOCKFILE="false"
@@ -368,7 +360,7 @@ jobs:
368360
- name: "Constrain Nautobot version and regenerate lock file"
369361
if: "inputs.project_type == 'nautobot-app'"
370362
run: >-
371-
INVOKE_${INVOKE_CONTEXT_NAME}_LOCAL=true
363+
env "INVOKE_${INVOKE_CONTEXT_NAME}_LOCAL=true"
372364
poetry run invoke lock --constrain-nautobot-ver --constrain-python-ver="$PYTHON_VERSION"
373365
- name: "Set up Docker Buildx"
374366
id: "buildx"

‎.github/workflows/ntc-nautobot-upstream-testing.yml‎

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,9 @@ on: # yamllint disable-line rule:truthy rule:comments
99
workflow_call:
1010
inputs:
1111
project_name:
12-
description: "Distribution name of the app (e.g. nautobot-golden-config)."
12+
description: "Distribution name of the app (e.g. nautobot-golden-config). INVOKE_<NAME>_* env vars use it upper-cased with '-' replaced by '_'."
1313
required: true
1414
type: "string"
15-
invoke_context_name:
16-
description: "Invoke context name used for INVOKE_<NAME>_* env vars. Defaults to project_name upper-cased with '-' replaced by '_'."
17-
required: false
18-
type: "string"
19-
default: ""
2015
matrix:
2116
description: "JSON list of {nautobot_branch, app_branch} pairs to test."
2217
required: false
@@ -38,11 +33,8 @@ jobs:
3833
id: "resolve"
3934
env:
4035
PROJECT_NAME: "${{ inputs.project_name }}"
41-
INVOKE_CONTEXT_NAME: "${{ inputs.invoke_context_name }}"
4236
run: |
43-
if [ -z "$INVOKE_CONTEXT_NAME" ]; then
44-
INVOKE_CONTEXT_NAME=$(echo "$PROJECT_NAME" | tr '[:lower:]-' '[:upper:]_')
45-
fi
37+
INVOKE_CONTEXT_NAME=$(echo "$PROJECT_NAME" | tr '[:lower:]-' '[:upper:]_')
4638
echo "invoke_context_name=$INVOKE_CONTEXT_NAME" >> "$GITHUB_OUTPUT"
4739
4840
upstream-test:

‎README.md‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ What `project_type` changes:
9696
| Input | Default | Purpose |
9797
| --- | --- | --- |
9898
| `project_type` | required | `nautobot-app` or `python-library`. |
99-
| `project_name` | required | Distribution / image name, e.g. `nautobot-golden-config`, `pyntc`. |
100-
| `invoke_context_name` | derived | `INVOKE_<NAME>_*` env var prefix. Defaults to `project_name` upper-cased with `-` replaced by `_`. |
99+
| `project_name` | required | Distribution / image name, e.g. `nautobot-golden-config`, `pyntc`. The `INVOKE_<NAME>_*` env var prefix is `project_name` upper-cased with `-` replaced by `_`. |
101100
| `min_nautobot_version` | `""` | Apps (required): lowest supported Nautobot version. |
102101
| `min_python_version` | `"3.10"` | Lowest supported Python. |
103102
| `max_python_version` | `"3.14"` | Highest supported Python. |
@@ -176,8 +175,7 @@ so the matrix and the pinned Nautobot workflow ref live in one place.
176175

177176
| Input | Default | Purpose |
178177
| --- | --- | --- |
179-
| `project_name` | required | Distribution name of the app. |
180-
| `invoke_context_name` | derived | As in the CI workflow. |
178+
| `project_name` | required | Distribution name of the app; the `INVOKE_<NAME>_*` prefix is derived from it as in the CI workflow. |
181179
| `matrix` | develop/main and next/main | JSON list of `{"nautobot_branch": ..., "app_branch": ...}` pairs. |
182180

183181
## Composite actions

‎examples/nautobot-app/ci.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ jobs:
2424
changelog_base_branches: >-
2525
["develop", "ltm-1.6"]
2626
# Optional overrides (defaults shown):
27-
# invoke_context_name: "NAUTOBOT_GOLDEN_CONFIG"
2827
# min_python_version: "3.10"
2928
# max_python_version: "3.14"
3029
# poetry_version: "2.1.3"

‎examples/python-library/ci.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
project_type: "python-library"
1818
project_name: "netutils"
1919
# Optional overrides (defaults shown):
20-
# invoke_context_name: "NETUTILS"
2120
# min_python_version: "3.10"
2221
# max_python_version: "3.14"
2322
# python_versions: '["3.10", "3.14"]'

0 commit comments

Comments
 (0)