shell
Open an interactive shell in the live container app for a service.
v2: reads IaC variables (subscription + common RG) from the cross-project IaC repo via ADO REST, discovers the container app via az containerapp list, and exec's az containerapp exec for an interactive /bin/sh session. Override via SVC_APP_NAME_OVERRIDE + SVC_RG_OVERRIDE. --command runs a single command non-interactively; --container picks a non-default container in a multi-container app; --revision picks a non-active revision.
Category: Inspect / observe
Tags: exec shell container-app interactive sh
Usage
noclickops shell <service> [test|prod] [--command CMD] [--container NAME] [--revision NAME]
Flags
| Flag | Description |
|---|---|
test | Shell into the test environment (default). |
prod | Shell into production. |
--command CMD | Run a single command non-interactively, then exit. |
--container NAME | Pick a specific container in a multi-container app. |
--revision NAME | Pick a specific revision (default: currently active). |
-h, --help | Show this help and exit. |
Example
noclickops shell frontend test
Example output
noclickops shell v1.7.6 — frontend (test, cmd: /bin/sh)
ℹ Container app: ca-abc100001-frontend (env: test, cmd: /bin/sh)
/app $ ls
package.json server.js
/app $ exit
# Gate behaviour when discovery fails — structured probe diagnostic (v1.7.1+):
✗ FAILED: discover container app for frontend
Looked for: ca-abc100001-frontend in RG rg-test-myteam-frontend-common of sub 3aec5ff4-...
Reason: You do not have access to subscription "3aec5ff4-...".
Action: → Ask your admin for Reader on "3aec5ff4-...", or use PIM to activate eligibility.
Subscriptions you DO have access to:
DEV - <team> - <name> <sub-id>
...
Override (skip discovery): SVC_APP_NAME_OVERRIDE=<name> SVC_RG_OVERRIDE=<rg>
Auth
az login + Reader on the IaC-declared subscription.
Depends on
azgit
Exit codes
| Code | Meaning |
|---|---|
0 | Shell session exited cleanly (or single command ran successfully). |
1 | Service / container / revision not found, or access denied. |
See also
Full --help output
Show full --help
noclickops v1.7.6 — shell
Open an interactive shell in the live container app for a service.
v2: reads IaC variables (subscription + common RG) from the cross-project IaC repo via ADO REST, discovers the container app via az containerapp list, and exec's az containerapp exec for an interactive /bin/sh session. Override via SVC_APP_NAME_OVERRIDE + SVC_RG_OVERRIDE. --command runs a single command non-interactively; --container picks a non-default container in a multi-container app; --revision picks a non-active revision.
Category: inspect
Tags: exec shell container-app interactive sh
Usage:
noclickops shell <service> [test|prod] [--command CMD] [--container NAME] [--revision NAME]
Flags:
test Shell into the test environment (default).
prod Shell into production.
--command CMD Run a single command non-interactively, then exit.
--container NAME Pick a specific container in a multi-container app.
--revision NAME Pick a specific revision (default: currently active).
-h, --help Show this help and exit.
Example:
noclickops shell frontend test
Example output:
noclickops shell v1.7.6 — frontend (test, cmd: /bin/sh)
ℹ Container app: ca-abc100001-frontend (env: test, cmd: /bin/sh)
/app $ ls
package.json server.js
/app $ exit
# Gate behaviour when discovery fails — structured probe diagnostic (v1.7.1+):
✗ FAILED: discover container app for frontend
Looked for: ca-abc100001-frontend in RG rg-test-myteam-frontend-common of sub 3aec5ff4-...
Reason: You do not have access to subscription "3aec5ff4-...".
Action: → Ask your admin for Reader on "3aec5ff4-...", or use PIM to activate eligibility.
Subscriptions you DO have access to:
DEV - <team> - <name> <sub-id>
...
Override (skip discovery): SVC_APP_NAME_OVERRIDE=<name> SVC_RG_OVERRIDE=<rg>
Auth:
az login + Reader on the IaC-declared subscription.
Depends on:
az git
Exit codes:
0 Shell session exited cleanly (or single command ran successfully).
1 Service / container / revision not found, or access denied.
See also:
info logs deploy