@codiac.io/codiac-cli 1.3.254 → 1.3.255

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.254",
2
+ "version": "1.3.255",
3
3
  "commands": {
4
4
  "branch": {
5
5
  "id": "branch",
@@ -2017,6 +2017,10 @@
2017
2017
  {
2018
2018
  "description": "Remove a deploy condition so the asset always deploys.",
2019
2019
  "command": "<%= config.bin %> <%= command.id %> -e myEnterprise -n my-api --remove-deploy-condition --silent"
2020
+ },
2021
+ {
2022
+ "description": "Re-point an asset at a corrected registry (by its Codiac code, not its url).",
2023
+ "command": "<%= config.bin %> <%= command.id %> -e myEnterprise -n my-api --registry devCodiacContainers --silent"
2020
2024
  }
2021
2025
  ],
2022
2026
  "flags": {
@@ -2044,6 +2048,14 @@
2044
2048
  "required": false,
2045
2049
  "multiple": false
2046
2050
  },
2051
+ "registry": {
2052
+ "name": "registry",
2053
+ "type": "option",
2054
+ "char": "r",
2055
+ "description": "Re-point this asset at a different container registry, given by its Codiac registry CODE (run `cod imageRegistry list`; NOT the registry url). Re-resolves the asset's embedded registry reference — use this after correcting a registry url so the asset picks up the fix.",
2056
+ "required": false,
2057
+ "multiple": false
2058
+ },
2047
2059
  "deploy-condition": {
2048
2060
  "name": "deploy-condition",
2049
2061
  "type": "option",
@@ -7445,6 +7457,96 @@
7445
7457
  },
7446
7458
  "args": {}
7447
7459
  },
7460
+ "imageRegistry:edit": {
7461
+ "id": "imageRegistry:edit",
7462
+ "description": "Changes the mutable attributes (url, private/public) of an existing container registry reference. The code, provider, and type are immutable.",
7463
+ "strict": true,
7464
+ "pluginName": "@codiac.io/codiac-cli",
7465
+ "pluginAlias": "@codiac.io/codiac-cli",
7466
+ "pluginType": "core",
7467
+ "aliases": [],
7468
+ "hiddenAliases": [],
7469
+ "examples": [
7470
+ {
7471
+ "description": "Edit a registry interactively (select it, then change its url).",
7472
+ "command": "<%= config.bin %> <%= command.id %>"
7473
+ },
7474
+ {
7475
+ "description": "Correct a registry's url (identified by its Codiac code, not its url).",
7476
+ "command": "<%= config.bin %> <%= command.id %> --registry devCodiacContainers --url newname.azurecr.io --silent"
7477
+ },
7478
+ {
7479
+ "description": "Flip a registry to public (no pull authentication).",
7480
+ "command": "<%= config.bin %> <%= command.id %> --registry 'Other|ghcr' --no-private --silent"
7481
+ },
7482
+ {
7483
+ "description": "Render the equivalent silent command without executing it.",
7484
+ "command": "<%= config.bin %> <%= command.id %> --registry devCodiacContainers --url newname.azurecr.io --to-script"
7485
+ }
7486
+ ],
7487
+ "flags": {
7488
+ "help": {
7489
+ "name": "help",
7490
+ "type": "boolean",
7491
+ "char": "h",
7492
+ "description": "Show CLI help.",
7493
+ "allowNo": false
7494
+ },
7495
+ "registry": {
7496
+ "name": "registry",
7497
+ "type": "option",
7498
+ "char": "r",
7499
+ "description": "The Codiac code identifying the registry to edit (NOT its url). Run `cod imageRegistry list` to see codes.",
7500
+ "required": false,
7501
+ "multiple": false
7502
+ },
7503
+ "url": {
7504
+ "name": "url",
7505
+ "type": "option",
7506
+ "char": "u",
7507
+ "description": "The corrected container registry url.",
7508
+ "required": false,
7509
+ "multiple": false
7510
+ },
7511
+ "private": {
7512
+ "name": "private",
7513
+ "type": "boolean",
7514
+ "description": "Whether pulling from this registry requires authentication. Pass --private or --no-private only to change it; omit to leave it unchanged.",
7515
+ "allowNo": true
7516
+ },
7517
+ "silent": {
7518
+ "name": "silent",
7519
+ "type": "boolean",
7520
+ "description": "Executes without any user interaction; fails on missing or invalid arguments.",
7521
+ "allowNo": false,
7522
+ "exclusive": [
7523
+ "echo",
7524
+ "to-script"
7525
+ ]
7526
+ },
7527
+ "echo": {
7528
+ "name": "echo",
7529
+ "type": "boolean",
7530
+ "description": "Renders the equivalent non-interactive command for future use before executing.",
7531
+ "allowNo": false,
7532
+ "exclusive": [
7533
+ "to-script",
7534
+ "silent"
7535
+ ]
7536
+ },
7537
+ "to-script": {
7538
+ "name": "to-script",
7539
+ "type": "boolean",
7540
+ "description": "Renders the equivalent non-interactive command without executing it.",
7541
+ "allowNo": false,
7542
+ "exclusive": [
7543
+ "echo",
7544
+ "silent"
7545
+ ]
7546
+ }
7547
+ },
7548
+ "args": {}
7549
+ },
7448
7550
  "imageRegistry:forget": {
7449
7551
  "id": "imageRegistry:forget",
7450
7552
  "description": "Removes the reference to the given container registry for the tenant. Does NOT delete the registry itself.",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codiac.io/codiac-cli",
3
3
  "description": "Local command line interface for managing enterprise assets and environments.",
4
- "version": "1.3.254",
4
+ "version": "1.3.255",
5
5
  "author": "Codiac",
6
6
  "bin": {
7
7
  "codiac": "./bin/run",
@@ -33,7 +33,7 @@ Top-level: `branch`, `build`, `cli`, `commit`, `deploy`, `dep`, `identity`, `ini
33
33
  - **filestore**: `capture`, `forget`, `list`
34
34
  - **host**: `map`, `list`, `view`, `delete`
35
35
  - **identity**: `list`, `delete`
36
- - **imageRegistry**: `capture`, `forget`, `list`; `pullSecret set/unset`
36
+ - **imageRegistry**: `capture`, `edit`, `forget`, `list`; `pullSecret set/unset` *(`-r`/`--registry` and `--chart-repo` take the registry **code**, e.g. `devCodiacContainers`, NOT its url; `edit` fixes an existing registry's url in place)*
37
37
  - **images**: `add`, `list`, `patch`, `remove`, `version`, `version bump`
38
38
  - **import**: `cluster`
39
39
  - **kit**: `create`
@@ -74,9 +74,32 @@ Lifecycle:
74
74
  4. Inspect/operate: `cod asset list`, `cod asset view` (logs/term/exec/env/config/status),
75
75
  `cod asset undeploy`, `cod asset recycle`.
76
76
 
77
- **Image registries policy:** never AWS ECR. Images live in **Docker Hub** or **Azure
78
- Container Registry (ACR)**. Registries are captured as first-class objects
79
- (`cod imageRegistry ...`, `cod secretStore ...` for pull secrets).
77
+ **Image registries.** Never AWS ECR images live in **Docker Hub** or **Azure Container
78
+ Registry (ACR)** (plus generic OCI registries like ghcr/quay/Harbor via provider `other`).
79
+ A registry is a first-class object with two fields you must **not** conflate:
80
+
81
+ - **`code`** — the Codiac identifier you reference everywhere: `-r`/`--registry` on
82
+ `asset create`, `--chart-repo`, `asset edit --registry`. Its shape depends on how it was
83
+ captured — Azure ACR → the resource name (`devCodiacContainers`); Docker Hub →
84
+ `DockerHub|<org>` (`DockerHub|codiacimages`); generic OCI → `Other|<label>` (`Other|ghcr`);
85
+ Helm repo → `helm|<provider>|<name>` (`helm|artifactHub|hermes-agent`).
86
+ - **`url`** — the registry endpoint (`devCodiacContainers.azurecr.io`, `index.docker.io`).
87
+
88
+ `-r`/`--registry` matches the **code**, never the url. Passing the url
89
+ (`devCodiacContainers.azurecr.io`) fails with *"No image registry has code […]"* — which
90
+ reads like it was never registered. **Always `cod imageRegistry list` first** to read the
91
+ exact code.
92
+
93
+ Managing them: `cod imageRegistry capture` (add — create-only; it *throws* if the code already
94
+ exists), `cod imageRegistry edit` (fix an existing registry's **url** or private/public in
95
+ place — `code`/`provider`/`type` are immutable), `cod imageRegistry forget` (drop the
96
+ reference), `cod imageRegistry list`, and `cod imageRegistry pullSecret set/unset` for auth.
97
+ `cod secretStore ...` holds the pull secrets themselves.
98
+
99
+ **Gotcha — assets snapshot their registry.** An asset stores a *copy* of `image.registry`
100
+ (url included) at create time, and the deploy path reads that copy, not the registry record.
101
+ So after `cod imageRegistry edit` corrects a url, already-created assets still carry the old
102
+ one — run `cod asset edit --registry <code>` on each to re-resolve its embedded reference.
80
103
 
81
104
  The `type` of an asset (`helm` vs `service`) changes which config `targetFile`s apply (see §3):
82
105
  `[helm]` values for charts, `[env]`/`[footprint]`/etc. for services.