@klok-integration/cli 0.6.217 → 0.6.224
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.
|
@@ -13,7 +13,9 @@ templates). Changes here reach every tenant, so read the library's `klok-docs/`
|
|
|
13
13
|
* Builds: `./gradlew build` must stay green, tests run on the JUnit Platform, and the extension's runtime and
|
|
14
14
|
deployment modules must get exactly the same version (one timestamp per build).
|
|
15
15
|
* Releases happen from `main` only, in dependency order (klok-common, broker client, extension), each waiting for
|
|
16
|
-
its publish and the catalog update before the next is merged.
|
|
17
|
-
|
|
16
|
+
its publish and the catalog update before the next is merged. After that catalog update the job starts the
|
|
17
|
+
pipeline of each library built against an older version (`klok catalog release-dependents`); a library that pins
|
|
18
|
+
its framework versions itself instead of following `gradle/klok-libs.versions.toml` is only warned about. Maven
|
|
19
|
+
Central is immutable: a version is never republished.
|
|
18
20
|
* CI template changes are tested with a dry run (`KLOK_CATALOG_UPDATE_DRY_RUN=true`, a branch pointing at the
|
|
19
21
|
template branch) before they are merged to `main`, because every project includes the templates from `main`.
|
|
@@ -179,7 +179,10 @@ Klok templates choose which jobs run from the type of the change.
|
|
|
179
179
|
* Never pin or edit these versions by hand in a project. Refresh the project's copy with
|
|
180
180
|
`./gradlew updateKlokLibsToml` and commit the refreshed `gradle/klok-libs.versions.toml`.
|
|
181
181
|
* A change that spans framework libraries is merged and published in dependency order: klok-common, then the broker
|
|
182
|
-
client, then the Quarkus extension.
|
|
182
|
+
client, then the Quarkus extension. The catalog then releases the dependents automatically: when a library's
|
|
183
|
+
release reaches the catalog, its update job starts the pipeline of every framework library that follows the catalog
|
|
184
|
+
and was built against an older version of it (`klok catalog release-dependents`), so nobody releases the extension
|
|
185
|
+
again by hand.
|
|
183
186
|
|
|
184
187
|
## Pipelines, secrets and infrastructure
|
|
185
188
|
|
|
@@ -24,6 +24,9 @@ roles and secrets, catalog update) before acting.
|
|
|
24
24
|
catalog update of one before merging the next: the catalog's commit for that release, not the merge, which only
|
|
25
25
|
starts the pipeline that produces it:
|
|
26
26
|
`glab api --hostname git.klok.dev "projects/klok%2Fframework%2Fklok-gradle-dependency-catalog/repository/commits?ref_name=main&per_page=10" | jq -r '.[].title'`.
|
|
27
|
+
A library that needs no change of its own is not released by hand: after each catalog update the job runs
|
|
28
|
+
`klok catalog release-dependents`, which starts the pipeline of every framework library built against an older
|
|
29
|
+
version of what was released (its log says which; `--dry-run --library <artifact>` shows it by hand).
|
|
27
30
|
5. **Never cancel, stop or restart a running job, pipeline or deployment without a human's explicit yes.** A
|
|
28
31
|
release waiting on Maven Central or npm can take half an hour, and `main` pipelines queue behind each other or run
|
|
29
32
|
in parallel, so a long wait is normal. Check the current time with `date -u` before judging how long anything has run. Report the
|
|
@@ -47,7 +50,10 @@ as a red pipeline. Vault CI login is not one of them: it needs nothing per proje
|
|
|
47
50
|
|
|
48
51
|
* Nothing in Vault per project. Every job logs in with the tenant CI role `<tenant>-ci` (a Vault JWT role bound
|
|
49
52
|
to `namespace_path` `<tenant>` and `<tenant>/*`, carrying `default` and the tenant CI read policy
|
|
50
|
-
`<tenant>-cicd-read
|
|
53
|
+
`<tenant>-cicd-read`, which reads the CI environment object only). The templates set
|
|
54
|
+
`VAULT_AUTH_ROLE: $KLOK_TENANT-ci`. The deploy key (`secret/<tenant>/CICD_KEY`, manifest, catalog and pin pushes)
|
|
55
|
+
is read only through the second role `<tenant>-ci-protected`, bound to `ref_protected: "true"` as well: klok-cli
|
|
56
|
+
logs in with it on its own, so a merge request pipeline cannot read the key. A tenant without `<tenant>-ci` fails
|
|
51
57
|
every job at `auth/jwt/login` with `role "<tenant>-ci" could not be found`; the tenant setup is the
|
|
52
58
|
*Onboarding a tenant* runbook in `klok docs read klok-framework-development-guide`, every credential and the step
|
|
53
59
|
that uses it in `klok-docs/ci/authentication.md` of `klok/environment/build-ci-templates`.
|
|
@@ -71,6 +77,8 @@ field, and let a person run it.
|
|
|
71
77
|
| `role "<tenant>-ci" could not be found` at `auth/jwt/login` | the tenant has no CI role yet (tenant onboarding) |
|
|
72
78
|
| `claim "namespace_path" does not match` at `auth/jwt/login` | the project is outside the tenant's root group, or `VAULT_AUTH_ROLE` names another tenant's role |
|
|
73
79
|
| `permission denied` reading `secret/.../cicd-environment-variables` | the CI role lacks the tenant CI read policy (has only `default`) |
|
|
80
|
+
| `claim "ref_protected" does not match` at `auth/jwt/login` | a job that reads the deploy key runs for an unprotected branch; it belongs on `main` (or another protected branch) |
|
|
81
|
+
| `permission denied` reading `secret/<tenant>/CICD_KEY` | the job read the key with `<tenant>-ci` (an inline `vault kv get`); log in with `<tenant>-ci-protected`, or use `klok manifest update` |
|
|
74
82
|
| `403` on `groups/<tenant>/-/packages/maven/...` | job token allowlist of the package project lacks the reader's group |
|
|
75
83
|
| `Could not find dev.klok...:<version>` | the version is not published yet, or the catalog copy is stale (`updateKlokLibsToml`) |
|
|
76
84
|
| `already deployed` from JReleaser | Maven Central already has that version; a `main` build is a new timestamp, do not retry the same job |
|