@intentius/chant-lexicon-gitlab 0.122.0 → 0.123.0
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.
- package/dist/integrity.json +2 -2
- package/dist/manifest.json +1 -1
- package/package.json +3 -3
- package/src/components/generate-op-pipeline.test.ts +1 -1
- package/src/components/generate-op-pipeline.ts +1 -1
- package/src/components/generate-op-waves-pipeline.test.ts +15 -0
- package/src/components/generate-pipeline.test.ts +1 -1
- package/src/components/generate-pipeline.ts +1 -1
package/dist/integrity.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"algorithm": "sha256",
|
|
3
3
|
"artifacts": {
|
|
4
|
-
"manifest.json": "
|
|
4
|
+
"manifest.json": "de6071ce1fc3425f8df14b30ca8e50fe16a899cb6084aeb30d15a1845fa327c8",
|
|
5
5
|
"meta.json": "db082fbf90c5941c498b2bee0f106103449c1a4c257716ca2220f0dd490450b2",
|
|
6
6
|
"types/index.d.ts": "a048a66ebe20da0cb5fc889054cac69044d9bf882e2c56b5c5bf113d1f3ba57c",
|
|
7
7
|
"rules/artifact-no-expiry.ts": "3f3cabf9792cbf8207e53a25f506715466b19ec25e9c3b4d0d77fed6b2eb4542",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"skills/chant-gitlab-migrate.md": "4853d04980560b379e5b0f7267dcb0a1e5d5879cb9e9931681ce76b2a5fe69d8",
|
|
56
56
|
"skills/chant-gitlab-patterns.md": "6d9a44e9e8de4c3820be9d65381b0d2ede4cb3626aaaf0011e21838a9fbf556e"
|
|
57
57
|
},
|
|
58
|
-
"composite": "
|
|
58
|
+
"composite": "f0103f6a81eda94d93dbd0e14b78271c71543d1f90bd78f2ec217934635ea485"
|
|
59
59
|
}
|
package/dist/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentius/chant-lexicon-gitlab",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.123.0",
|
|
4
4
|
"description": "GitLab CI lexicon for chant — declarative IaC in TypeScript",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://intentius.io/chant",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"typescript": "^5.9.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@intentius/chant": "^0.
|
|
71
|
-
"@intentius/chant-lexicon-github": "^0.
|
|
70
|
+
"@intentius/chant": "^0.123.0",
|
|
71
|
+
"@intentius/chant-lexicon-github": "^0.123.0",
|
|
72
72
|
"typescript": "^5.9.3"
|
|
73
73
|
},
|
|
74
74
|
"peerDependenciesMeta": {
|
|
@@ -471,7 +471,7 @@ describe("generateGitlabOpPipeline: a deployment environment (#2257)", () => {
|
|
|
471
471
|
"",
|
|
472
472
|
"actions-audit:",
|
|
473
473
|
" stage: ops",
|
|
474
|
-
" image: node:22
|
|
474
|
+
" image: node:22",
|
|
475
475
|
" resource_group: actions-audit",
|
|
476
476
|
" rules:",
|
|
477
477
|
` - if: '$CI_PIPELINE_SOURCE == "schedule" && $CHANT_SCHEDULED_OP == "actions-audit"'`,
|
|
@@ -124,7 +124,7 @@ function toJobName(opName: string): string {
|
|
|
124
124
|
return opName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
const DEFAULT_IMAGE = "node:22
|
|
127
|
+
const DEFAULT_IMAGE = "node:22";
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* Default stage every generated job runs in, and the default base of the
|
|
@@ -44,4 +44,19 @@ describe("generateGitlabOpWavesPipeline", () => {
|
|
|
44
44
|
expect(yaml).toContain("chant run wave --spec waves.json --record-plans");
|
|
45
45
|
expect(yaml).toMatch(/stages:\n\s+- plans\n/);
|
|
46
46
|
});
|
|
47
|
+
|
|
48
|
+
test("a wave-level plan and apply, and stage hooks, render the same jobs: chant run wave runs them (#3762)", () => {
|
|
49
|
+
const { plan: _plan, ...rest } = spec;
|
|
50
|
+
const waveLevel: OpWavesSpec = {
|
|
51
|
+
...rest,
|
|
52
|
+
planWave: ["./bin/plan-wave", "{runs}", "{plans}"],
|
|
53
|
+
applyWave: ["./bin/apply-wave", "{runs}"],
|
|
54
|
+
hooks: { before: { apply: [{ command: ["./bin/check", "{runs}"], onFailure: "approve" }] } },
|
|
55
|
+
};
|
|
56
|
+
const plain = generateGitlabOpWavesPipeline(spec, { specFile: "waves.json" });
|
|
57
|
+
const rendered = generateGitlabOpWavesPipeline(waveLevel, { specFile: "waves.json" });
|
|
58
|
+
expect(rendered.files).toEqual(plain.files);
|
|
59
|
+
expect(rendered.jobs).toEqual(plain.jobs);
|
|
60
|
+
expect(() => generateGitlabOpWavesPipeline({ ...waveLevel, hooks: { after: { apply: [{ command: ["./bin/smoke"], onFailure: "approve" }] } } }, { specFile: "waves.json" })).toThrow(/nothing left to hold/);
|
|
61
|
+
});
|
|
47
62
|
});
|
|
@@ -288,7 +288,7 @@ describe("generateGitlabPipeline: a promote job (#2575)", () => {
|
|
|
288
288
|
expect(result.stages).toEqual(["wave-1", "wave-2"]);
|
|
289
289
|
expect(parsed["promote-prod"]).toEqual({
|
|
290
290
|
stage: "promote",
|
|
291
|
-
image: "node:22
|
|
291
|
+
image: "node:22",
|
|
292
292
|
script: ['chant components promote --from staging --to prod --digest "api=$(cut -d= -f2- api.digest)"'],
|
|
293
293
|
needs: ["api", "shared-alb"],
|
|
294
294
|
});
|
|
@@ -52,7 +52,7 @@ function toJobName(componentName: string): string {
|
|
|
52
52
|
return componentName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
const DEFAULT_IMAGE = "node:22
|
|
55
|
+
const DEFAULT_IMAGE = "node:22";
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* Synthesize a `.gitlab-ci.yml` pipeline from a set of components: one stage
|