@catladder/cli 0.0.0-next-52feb889 → 0.0.0-next-c177efda
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/bundles/catci/index.js +19 -0
- package/dist/bundles/catenv/index.js +88 -13
- package/dist/bundles/cli/index.js +88 -13
- package/dist/bundles/runner-images/semantic-release/Dockerfile +2 -7
- package/dist/bundles/runner-images/semantic-release/scripts/semanticRelease +18 -1
- package/dist/bundles/runner-images/semantic-release-central.Dockerfile +34 -0
- package/dist/cli/src/catci.d.ts +1 -0
- package/dist/cli/src/catci.js +100 -0
- package/dist/cli/src/catci.js.map +1 -0
- package/dist/pipeline/src/backends/github/GithubBackend.js +4 -1
- package/dist/pipeline/src/backends/github/GithubBackend.js.map +1 -1
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.js +9 -2
- package/dist/pipeline/src/backends/gitlab/GitlabBackend.js.map +1 -1
- package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.d.ts +2 -1
- package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.js +11 -4
- package/dist/pipeline/src/backends/gitlab/gitlabReleaseJobs.js.map +1 -1
- package/dist/pipeline/src/bash/bashEscape.js +5 -1
- package/dist/pipeline/src/bash/bashEscape.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +1 -1
- package/dist/pipeline/src/catci/shippedCatci.d.ts +8 -0
- package/dist/pipeline/src/catci/shippedCatci.js +39 -0
- package/dist/pipeline/src/catci/shippedCatci.js.map +1 -0
- package/dist/pipeline/src/constants.js +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +1 -1
- package/dist/pipeline/src/customImages/shippedImages.d.ts +5 -3
- package/dist/pipeline/src/customImages/shippedImages.js +6 -4
- package/dist/pipeline/src/customImages/shippedImages.js.map +1 -1
- package/dist/pipeline/src/deploy/types/index.d.ts +2 -2
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js +6 -0
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js.map +1 -1
- package/dist/pipeline/src/types/config.d.ts +3 -3
- package/dist/runner-images/semantic-release/Dockerfile +2 -7
- package/dist/runner-images/semantic-release/scripts/semanticRelease +18 -1
- package/dist/runner-images/semantic-release-central.Dockerfile +34 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/scripts/bundle +4 -0
- package/src/catci.ts +123 -0
|
@@ -1533,6 +1533,7 @@ const ciVariables_1 = __nccwpck_require__(25474);
|
|
|
1533
1533
|
const createGithubJobs_1 = __nccwpck_require__(14016);
|
|
1534
1534
|
const jobImagesPlan_1 = __nccwpck_require__(11585);
|
|
1535
1535
|
const scriptFunctions_1 = __nccwpck_require__(75759);
|
|
1536
|
+
const shippedCatci_1 = __nccwpck_require__(93401);
|
|
1536
1537
|
const utils_1 = __nccwpck_require__(20595);
|
|
1537
1538
|
const githubReleaseJobs_1 = __nccwpck_require__(55611);
|
|
1538
1539
|
const scriptFiles_1 = __nccwpck_require__(59189);
|
|
@@ -1594,7 +1595,9 @@ class GithubBackend {
|
|
|
1594
1595
|
content: workflow
|
|
1595
1596
|
})),
|
|
1596
1597
|
// materialized job scripts and image definitions (repo mode)
|
|
1597
|
-
...scripts.getGeneratedFiles(), ...images.getGeneratedFiles()
|
|
1598
|
+
...scripts.getGeneratedFiles(), ...images.getGeneratedFiles(),
|
|
1599
|
+
// catci: the CI companion the release job's security audit runs
|
|
1600
|
+
...(0, shippedCatci_1.getCatciGeneratedFiles)()];
|
|
1598
1601
|
}
|
|
1599
1602
|
createImagesPlan(config) {
|
|
1600
1603
|
return new jobImagesPlan_1.JobImagesPlan((0, jobImagesPlan_1.getJobImagesMode)(config, this.type), this.type);
|
|
@@ -2299,6 +2302,7 @@ const rules_1 = __nccwpck_require__(44565);
|
|
|
2299
2302
|
const config_1 = __nccwpck_require__(96925);
|
|
2300
2303
|
const createAllJobs_1 = __nccwpck_require__(83671);
|
|
2301
2304
|
const jobImagesPlan_1 = __nccwpck_require__(11585);
|
|
2305
|
+
const shippedCatci_1 = __nccwpck_require__(93401);
|
|
2302
2306
|
const createGitlabJobs_1 = __nccwpck_require__(80512);
|
|
2303
2307
|
const createGitlabPipeline_1 = __nccwpck_require__(61862);
|
|
2304
2308
|
const gitlabReleaseJobs_1 = __nccwpck_require__(35531);
|
|
@@ -2328,7 +2332,9 @@ class GitlabBackend {
|
|
|
2328
2332
|
};
|
|
2329
2333
|
return [mainFile, ...includes,
|
|
2330
2334
|
// materialized image definitions (repo mode)
|
|
2331
|
-
...images.getGeneratedFiles()
|
|
2335
|
+
...images.getGeneratedFiles(),
|
|
2336
|
+
// catci: the CI companion the release job's security audit runs
|
|
2337
|
+
...(0, shippedCatci_1.getCatciGeneratedFiles)()];
|
|
2332
2338
|
}
|
|
2333
2339
|
createImagesPlan(config) {
|
|
2334
2340
|
return new jobImagesPlan_1.JobImagesPlan((0, jobImagesPlan_1.getJobImagesMode)(config, this.type), this.type);
|
|
@@ -2392,6 +2398,10 @@ class GitlabBackend {
|
|
|
2392
2398
|
}
|
|
2393
2399
|
async createPipeline(config, images) {
|
|
2394
2400
|
const stages = (0, getPipelineStages_1.getPipelineStages)(config);
|
|
2401
|
+
// release jobs first: they register their image on the plan, and the
|
|
2402
|
+
// per-trigger job creation below emits the build jobs of all images
|
|
2403
|
+
// registered so far
|
|
2404
|
+
const releaseJobs = (0, gitlabReleaseJobs_1.getGitlabReleaseJobs)(config, images);
|
|
2395
2405
|
// for all triggers create jobs and add base rules
|
|
2396
2406
|
const allJobsPerTrigger = await Promise.all(config_1.ALL_PIPELINE_TRIGGERS.map(async trigger => await (0, createGitlabJobs_1.createGitlabJobs)(await (0, createAllJobs_1.createAllJobs)({
|
|
2397
2407
|
config,
|
|
@@ -2451,7 +2461,7 @@ class GitlabBackend {
|
|
|
2451
2461
|
stages: [...stages, "release"],
|
|
2452
2462
|
jobs: {
|
|
2453
2463
|
...allJobs,
|
|
2454
|
-
...Object.fromEntries(Object.entries(
|
|
2464
|
+
...Object.fromEntries(Object.entries(releaseJobs).map(([name, gitlabJob]) => [name, {
|
|
2455
2465
|
gitlabJob,
|
|
2456
2466
|
context: null
|
|
2457
2467
|
}]))
|
|
@@ -2988,15 +2998,22 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
2988
2998
|
}));
|
|
2989
2999
|
exports.getGitlabReleaseJobs = void 0;
|
|
2990
3000
|
const rules_1 = __nccwpck_require__(44565);
|
|
2991
|
-
const runner_1 = __nccwpck_require__(92348);
|
|
2992
3001
|
const EXPIRED_TOKEN_HELP = "echo '👉 If this job failed with access denied, the project access token might be invald - run `project-renew-token` in catladder CLI to fix.'";
|
|
2993
3002
|
const baseReleaseRules = [rules_1.RULE_NEVER_ON_RELEASE_COMMIT, rules_1.RULE_NEVER_ON_AGENT_TRIGGER, rules_1.RULE_NEVER_ON_SCHEDULE];
|
|
2994
|
-
const getGitlabReleaseJobs = config => {
|
|
3003
|
+
const getGitlabReleaseJobs = (config, images) => {
|
|
2995
3004
|
var _a;
|
|
3005
|
+
// NOTE: only the resolved image url is used, not the `need`: release
|
|
3006
|
+
// jobs have no `needs` on purpose — their stage ordering already
|
|
3007
|
+
// guarantees the image build job (setup stage) ran, and adding a
|
|
3008
|
+
// `needs` would switch gitlab to DAG mode, so the release job would no
|
|
3009
|
+
// longer wait for the build/deploy stages.
|
|
3010
|
+
const releaseImage = images.resolveRef({
|
|
3011
|
+
catladderImage: "semantic-release"
|
|
3012
|
+
}).image;
|
|
2996
3013
|
return {
|
|
2997
3014
|
["create release"]: {
|
|
2998
3015
|
stage: "release",
|
|
2999
|
-
image:
|
|
3016
|
+
image: releaseImage,
|
|
3000
3017
|
script: ["semanticRelease"],
|
|
3001
3018
|
after_script: [EXPIRED_TOKEN_HELP],
|
|
3002
3019
|
rules: [...baseReleaseRules, {
|
|
@@ -3009,7 +3026,7 @@ const getGitlabReleaseJobs = config => {
|
|
|
3009
3026
|
},
|
|
3010
3027
|
["⚠️ force create release"]: {
|
|
3011
3028
|
stage: "release",
|
|
3012
|
-
image:
|
|
3029
|
+
image: releaseImage,
|
|
3013
3030
|
script: ["semanticRelease"],
|
|
3014
3031
|
after_script: [EXPIRED_TOKEN_HELP],
|
|
3015
3032
|
needs: [],
|
|
@@ -3367,8 +3384,12 @@ const escapeForDotEnv = (value, options = {
|
|
|
3367
3384
|
// instead of doing it part-wise, we just do it all at once
|
|
3368
3385
|
const containsAnyBashExpression = value.parts.some(part => part instanceof BashExpression_1.BashExpression);
|
|
3369
3386
|
if (!containsAnyBashExpression) {
|
|
3387
|
+
// all parts are literal: the value never passes through bash, so it
|
|
3388
|
+
// must NOT be bash-escaped — `quotes: "double"` would bake literal
|
|
3389
|
+
// \" into the env value (e.g. JSON values, since the deterministic
|
|
3390
|
+
// cloud run urls made such values fully literal)
|
|
3370
3391
|
return (0, exports.escapeForDotEnv)(value.toString({
|
|
3371
|
-
quotes:
|
|
3392
|
+
quotes: false
|
|
3372
3393
|
}));
|
|
3373
3394
|
} else {
|
|
3374
3395
|
const result = escapeBashExpressionForDotEnv(new BashExpression_1.BashExpression(value.toString({
|
|
@@ -4974,6 +4995,52 @@ exports.isOfBuildType = isOfBuildType;
|
|
|
4974
4995
|
|
|
4975
4996
|
/***/ }),
|
|
4976
4997
|
|
|
4998
|
+
/***/ 93401:
|
|
4999
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
5000
|
+
|
|
5001
|
+
"use strict";
|
|
5002
|
+
|
|
5003
|
+
|
|
5004
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
5005
|
+
value: true
|
|
5006
|
+
}));
|
|
5007
|
+
exports.getCatciGeneratedFiles = exports.GENERATED_CATCI_FOLDER = void 0;
|
|
5008
|
+
const fs_1 = __nccwpck_require__(79896);
|
|
5009
|
+
const path_1 = __nccwpck_require__(16928);
|
|
5010
|
+
exports.GENERATED_CATCI_FOLDER = ".catladder-generated/catci";
|
|
5011
|
+
/**
|
|
5012
|
+
* the ncc-bundled catci (catladder's CI companion), shipped with the
|
|
5013
|
+
* package. Built by the cli workspace (`scripts/bundle`); pipeline
|
|
5014
|
+
* generation materializes it into `.catladder-generated/catci/` so CI
|
|
5015
|
+
* jobs (e.g. the release job's security audit) can run it with plain
|
|
5016
|
+
* `node` — no install step, no catladder baked into job images, and
|
|
5017
|
+
* always the exact version that generated the pipeline.
|
|
5018
|
+
*/
|
|
5019
|
+
const getShippedCatciBundle = () => {
|
|
5020
|
+
const candidates = [
|
|
5021
|
+
// ncc bundle (what consumers run): dist/bundles/<entry> -> dist/bundles/catci
|
|
5022
|
+
(0, path_1.join)(__dirname, "..", "catci", "index.js"),
|
|
5023
|
+
// cli tsc dist (catenv-dev): dist/pipeline/src/catci -> dist/bundles/catci
|
|
5024
|
+
(0, path_1.join)(__dirname, "..", "..", "..", "bundles", "catci", "index.js"),
|
|
5025
|
+
// repository (pipeline/src/catci): <root>/cli/dist/bundles/catci
|
|
5026
|
+
(0, path_1.join)(__dirname, "..", "..", "..", "cli", "dist", "bundles", "catci", "index.js")];
|
|
5027
|
+
const found = candidates.find(candidate => (0, fs_1.existsSync)(candidate));
|
|
5028
|
+
if (!found) {
|
|
5029
|
+
throw new Error("shipped catci bundle not found — run a full catladder build (`yarn build`) first");
|
|
5030
|
+
}
|
|
5031
|
+
return found;
|
|
5032
|
+
};
|
|
5033
|
+
/**
|
|
5034
|
+
* the catci files to materialize into the generated folder
|
|
5035
|
+
*/
|
|
5036
|
+
const getCatciGeneratedFiles = () => [{
|
|
5037
|
+
path: (0, path_1.join)(exports.GENERATED_CATCI_FOLDER, "index.js"),
|
|
5038
|
+
content: (0, fs_1.readFileSync)(getShippedCatciBundle(), "utf-8")
|
|
5039
|
+
}];
|
|
5040
|
+
exports.getCatciGeneratedFiles = getCatciGeneratedFiles;
|
|
5041
|
+
|
|
5042
|
+
/***/ }),
|
|
5043
|
+
|
|
4977
5044
|
/***/ 35233:
|
|
4978
5045
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
4979
5046
|
|
|
@@ -5145,7 +5212,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
5145
5212
|
value: true
|
|
5146
5213
|
}));
|
|
5147
5214
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
5148
|
-
exports.PIPELINE_IMAGE_TAG = "next-
|
|
5215
|
+
exports.PIPELINE_IMAGE_TAG = "next-c177efda" || 0;
|
|
5149
5216
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
5150
5217
|
|
|
5151
5218
|
/***/ }),
|
|
@@ -6139,11 +6206,13 @@ exports.RUNNER_IMAGE_DEPENDENCIES = {
|
|
|
6139
6206
|
*/
|
|
6140
6207
|
/**
|
|
6141
6208
|
* images that cannot be built from the shipped definitions and always
|
|
6142
|
-
* come from the central registry
|
|
6143
|
-
*
|
|
6144
|
-
*
|
|
6209
|
+
* come from the central registry. Empty since the semantic-release
|
|
6210
|
+
* image became self-contained (the security audit runs the
|
|
6211
|
+
* materialized catci bundle instead of a baked-in catladder cli) —
|
|
6212
|
+
* kept as the escape hatch should an image ever need central-only
|
|
6213
|
+
* treatment again.
|
|
6145
6214
|
*/
|
|
6146
|
-
exports.CENTRAL_ONLY_IMAGES = new Set(
|
|
6215
|
+
exports.CENTRAL_ONLY_IMAGES = new Set();
|
|
6147
6216
|
exports.RUNNER_IMAGE_BUILD_CONTEXT = {
|
|
6148
6217
|
"jobs-default": "root",
|
|
6149
6218
|
"jobs-meteor": "root",
|
|
@@ -9271,6 +9340,7 @@ const path_1 = __nccwpck_require__(16928);
|
|
|
9271
9340
|
const backends_1 = __nccwpck_require__(93243);
|
|
9272
9341
|
const gitlab_1 = __nccwpck_require__(8475);
|
|
9273
9342
|
const jobImagesPlan_1 = __nccwpck_require__(11585);
|
|
9343
|
+
const shippedCatci_1 = __nccwpck_require__(93401);
|
|
9274
9344
|
/**
|
|
9275
9345
|
* generates the pipeline files of all pipeline types enabled in the
|
|
9276
9346
|
* config (see `pipelines`). Pass an explicit `pipelineType` to generate
|
|
@@ -9287,6 +9357,11 @@ async function generatePipelineFiles(context, pipelineType) {
|
|
|
9287
9357
|
recursive: true,
|
|
9288
9358
|
force: true
|
|
9289
9359
|
});
|
|
9360
|
+
// same for the materialized catci bundle (union across backends)
|
|
9361
|
+
await (0, promises_1.rm)(shippedCatci_1.GENERATED_CATCI_FOLDER, {
|
|
9362
|
+
recursive: true,
|
|
9363
|
+
force: true
|
|
9364
|
+
});
|
|
9290
9365
|
}
|
|
9291
9366
|
for (const type of pipelineTypes) {
|
|
9292
9367
|
await generatePipelineFilesForBackend(context, (0, backends_1.getPipelineBackend)(type));
|
|
@@ -6784,6 +6784,7 @@ const ciVariables_1 = __nccwpck_require__(25474);
|
|
|
6784
6784
|
const createGithubJobs_1 = __nccwpck_require__(14016);
|
|
6785
6785
|
const jobImagesPlan_1 = __nccwpck_require__(11585);
|
|
6786
6786
|
const scriptFunctions_1 = __nccwpck_require__(75759);
|
|
6787
|
+
const shippedCatci_1 = __nccwpck_require__(93401);
|
|
6787
6788
|
const utils_1 = __nccwpck_require__(20595);
|
|
6788
6789
|
const githubReleaseJobs_1 = __nccwpck_require__(55611);
|
|
6789
6790
|
const scriptFiles_1 = __nccwpck_require__(59189);
|
|
@@ -6845,7 +6846,9 @@ class GithubBackend {
|
|
|
6845
6846
|
content: workflow
|
|
6846
6847
|
})),
|
|
6847
6848
|
// materialized job scripts and image definitions (repo mode)
|
|
6848
|
-
...scripts.getGeneratedFiles(), ...images.getGeneratedFiles()
|
|
6849
|
+
...scripts.getGeneratedFiles(), ...images.getGeneratedFiles(),
|
|
6850
|
+
// catci: the CI companion the release job's security audit runs
|
|
6851
|
+
...(0, shippedCatci_1.getCatciGeneratedFiles)()];
|
|
6849
6852
|
}
|
|
6850
6853
|
createImagesPlan(config) {
|
|
6851
6854
|
return new jobImagesPlan_1.JobImagesPlan((0, jobImagesPlan_1.getJobImagesMode)(config, this.type), this.type);
|
|
@@ -7550,6 +7553,7 @@ const rules_1 = __nccwpck_require__(44565);
|
|
|
7550
7553
|
const config_1 = __nccwpck_require__(96925);
|
|
7551
7554
|
const createAllJobs_1 = __nccwpck_require__(83671);
|
|
7552
7555
|
const jobImagesPlan_1 = __nccwpck_require__(11585);
|
|
7556
|
+
const shippedCatci_1 = __nccwpck_require__(93401);
|
|
7553
7557
|
const createGitlabJobs_1 = __nccwpck_require__(80512);
|
|
7554
7558
|
const createGitlabPipeline_1 = __nccwpck_require__(61862);
|
|
7555
7559
|
const gitlabReleaseJobs_1 = __nccwpck_require__(35531);
|
|
@@ -7579,7 +7583,9 @@ class GitlabBackend {
|
|
|
7579
7583
|
};
|
|
7580
7584
|
return [mainFile, ...includes,
|
|
7581
7585
|
// materialized image definitions (repo mode)
|
|
7582
|
-
...images.getGeneratedFiles()
|
|
7586
|
+
...images.getGeneratedFiles(),
|
|
7587
|
+
// catci: the CI companion the release job's security audit runs
|
|
7588
|
+
...(0, shippedCatci_1.getCatciGeneratedFiles)()];
|
|
7583
7589
|
}
|
|
7584
7590
|
createImagesPlan(config) {
|
|
7585
7591
|
return new jobImagesPlan_1.JobImagesPlan((0, jobImagesPlan_1.getJobImagesMode)(config, this.type), this.type);
|
|
@@ -7643,6 +7649,10 @@ class GitlabBackend {
|
|
|
7643
7649
|
}
|
|
7644
7650
|
async createPipeline(config, images) {
|
|
7645
7651
|
const stages = (0, getPipelineStages_1.getPipelineStages)(config);
|
|
7652
|
+
// release jobs first: they register their image on the plan, and the
|
|
7653
|
+
// per-trigger job creation below emits the build jobs of all images
|
|
7654
|
+
// registered so far
|
|
7655
|
+
const releaseJobs = (0, gitlabReleaseJobs_1.getGitlabReleaseJobs)(config, images);
|
|
7646
7656
|
// for all triggers create jobs and add base rules
|
|
7647
7657
|
const allJobsPerTrigger = await Promise.all(config_1.ALL_PIPELINE_TRIGGERS.map(async trigger => await (0, createGitlabJobs_1.createGitlabJobs)(await (0, createAllJobs_1.createAllJobs)({
|
|
7648
7658
|
config,
|
|
@@ -7702,7 +7712,7 @@ class GitlabBackend {
|
|
|
7702
7712
|
stages: [...stages, "release"],
|
|
7703
7713
|
jobs: {
|
|
7704
7714
|
...allJobs,
|
|
7705
|
-
...Object.fromEntries(Object.entries(
|
|
7715
|
+
...Object.fromEntries(Object.entries(releaseJobs).map(([name, gitlabJob]) => [name, {
|
|
7706
7716
|
gitlabJob,
|
|
7707
7717
|
context: null
|
|
7708
7718
|
}]))
|
|
@@ -8239,15 +8249,22 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
8239
8249
|
}));
|
|
8240
8250
|
exports.getGitlabReleaseJobs = void 0;
|
|
8241
8251
|
const rules_1 = __nccwpck_require__(44565);
|
|
8242
|
-
const runner_1 = __nccwpck_require__(92348);
|
|
8243
8252
|
const EXPIRED_TOKEN_HELP = "echo '👉 If this job failed with access denied, the project access token might be invald - run `project-renew-token` in catladder CLI to fix.'";
|
|
8244
8253
|
const baseReleaseRules = [rules_1.RULE_NEVER_ON_RELEASE_COMMIT, rules_1.RULE_NEVER_ON_AGENT_TRIGGER, rules_1.RULE_NEVER_ON_SCHEDULE];
|
|
8245
|
-
const getGitlabReleaseJobs = config => {
|
|
8254
|
+
const getGitlabReleaseJobs = (config, images) => {
|
|
8246
8255
|
var _a;
|
|
8256
|
+
// NOTE: only the resolved image url is used, not the `need`: release
|
|
8257
|
+
// jobs have no `needs` on purpose — their stage ordering already
|
|
8258
|
+
// guarantees the image build job (setup stage) ran, and adding a
|
|
8259
|
+
// `needs` would switch gitlab to DAG mode, so the release job would no
|
|
8260
|
+
// longer wait for the build/deploy stages.
|
|
8261
|
+
const releaseImage = images.resolveRef({
|
|
8262
|
+
catladderImage: "semantic-release"
|
|
8263
|
+
}).image;
|
|
8247
8264
|
return {
|
|
8248
8265
|
["create release"]: {
|
|
8249
8266
|
stage: "release",
|
|
8250
|
-
image:
|
|
8267
|
+
image: releaseImage,
|
|
8251
8268
|
script: ["semanticRelease"],
|
|
8252
8269
|
after_script: [EXPIRED_TOKEN_HELP],
|
|
8253
8270
|
rules: [...baseReleaseRules, {
|
|
@@ -8260,7 +8277,7 @@ const getGitlabReleaseJobs = config => {
|
|
|
8260
8277
|
},
|
|
8261
8278
|
["⚠️ force create release"]: {
|
|
8262
8279
|
stage: "release",
|
|
8263
|
-
image:
|
|
8280
|
+
image: releaseImage,
|
|
8264
8281
|
script: ["semanticRelease"],
|
|
8265
8282
|
after_script: [EXPIRED_TOKEN_HELP],
|
|
8266
8283
|
needs: [],
|
|
@@ -8618,8 +8635,12 @@ const escapeForDotEnv = (value, options = {
|
|
|
8618
8635
|
// instead of doing it part-wise, we just do it all at once
|
|
8619
8636
|
const containsAnyBashExpression = value.parts.some(part => part instanceof BashExpression_1.BashExpression);
|
|
8620
8637
|
if (!containsAnyBashExpression) {
|
|
8638
|
+
// all parts are literal: the value never passes through bash, so it
|
|
8639
|
+
// must NOT be bash-escaped — `quotes: "double"` would bake literal
|
|
8640
|
+
// \" into the env value (e.g. JSON values, since the deterministic
|
|
8641
|
+
// cloud run urls made such values fully literal)
|
|
8621
8642
|
return (0, exports.escapeForDotEnv)(value.toString({
|
|
8622
|
-
quotes:
|
|
8643
|
+
quotes: false
|
|
8623
8644
|
}));
|
|
8624
8645
|
} else {
|
|
8625
8646
|
const result = escapeBashExpressionForDotEnv(new BashExpression_1.BashExpression(value.toString({
|
|
@@ -10225,6 +10246,52 @@ exports.isOfBuildType = isOfBuildType;
|
|
|
10225
10246
|
|
|
10226
10247
|
/***/ }),
|
|
10227
10248
|
|
|
10249
|
+
/***/ 93401:
|
|
10250
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
10251
|
+
|
|
10252
|
+
"use strict";
|
|
10253
|
+
|
|
10254
|
+
|
|
10255
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
10256
|
+
value: true
|
|
10257
|
+
}));
|
|
10258
|
+
exports.getCatciGeneratedFiles = exports.GENERATED_CATCI_FOLDER = void 0;
|
|
10259
|
+
const fs_1 = __nccwpck_require__(79896);
|
|
10260
|
+
const path_1 = __nccwpck_require__(16928);
|
|
10261
|
+
exports.GENERATED_CATCI_FOLDER = ".catladder-generated/catci";
|
|
10262
|
+
/**
|
|
10263
|
+
* the ncc-bundled catci (catladder's CI companion), shipped with the
|
|
10264
|
+
* package. Built by the cli workspace (`scripts/bundle`); pipeline
|
|
10265
|
+
* generation materializes it into `.catladder-generated/catci/` so CI
|
|
10266
|
+
* jobs (e.g. the release job's security audit) can run it with plain
|
|
10267
|
+
* `node` — no install step, no catladder baked into job images, and
|
|
10268
|
+
* always the exact version that generated the pipeline.
|
|
10269
|
+
*/
|
|
10270
|
+
const getShippedCatciBundle = () => {
|
|
10271
|
+
const candidates = [
|
|
10272
|
+
// ncc bundle (what consumers run): dist/bundles/<entry> -> dist/bundles/catci
|
|
10273
|
+
(0, path_1.join)(__dirname, "..", "catci", "index.js"),
|
|
10274
|
+
// cli tsc dist (catenv-dev): dist/pipeline/src/catci -> dist/bundles/catci
|
|
10275
|
+
(0, path_1.join)(__dirname, "..", "..", "..", "bundles", "catci", "index.js"),
|
|
10276
|
+
// repository (pipeline/src/catci): <root>/cli/dist/bundles/catci
|
|
10277
|
+
(0, path_1.join)(__dirname, "..", "..", "..", "cli", "dist", "bundles", "catci", "index.js")];
|
|
10278
|
+
const found = candidates.find(candidate => (0, fs_1.existsSync)(candidate));
|
|
10279
|
+
if (!found) {
|
|
10280
|
+
throw new Error("shipped catci bundle not found — run a full catladder build (`yarn build`) first");
|
|
10281
|
+
}
|
|
10282
|
+
return found;
|
|
10283
|
+
};
|
|
10284
|
+
/**
|
|
10285
|
+
* the catci files to materialize into the generated folder
|
|
10286
|
+
*/
|
|
10287
|
+
const getCatciGeneratedFiles = () => [{
|
|
10288
|
+
path: (0, path_1.join)(exports.GENERATED_CATCI_FOLDER, "index.js"),
|
|
10289
|
+
content: (0, fs_1.readFileSync)(getShippedCatciBundle(), "utf-8")
|
|
10290
|
+
}];
|
|
10291
|
+
exports.getCatciGeneratedFiles = getCatciGeneratedFiles;
|
|
10292
|
+
|
|
10293
|
+
/***/ }),
|
|
10294
|
+
|
|
10228
10295
|
/***/ 35233:
|
|
10229
10296
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
10230
10297
|
|
|
@@ -10396,7 +10463,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
10396
10463
|
value: true
|
|
10397
10464
|
}));
|
|
10398
10465
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
10399
|
-
exports.PIPELINE_IMAGE_TAG = "next-
|
|
10466
|
+
exports.PIPELINE_IMAGE_TAG = "next-c177efda" || 0;
|
|
10400
10467
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
10401
10468
|
|
|
10402
10469
|
/***/ }),
|
|
@@ -11390,11 +11457,13 @@ exports.RUNNER_IMAGE_DEPENDENCIES = {
|
|
|
11390
11457
|
*/
|
|
11391
11458
|
/**
|
|
11392
11459
|
* images that cannot be built from the shipped definitions and always
|
|
11393
|
-
* come from the central registry
|
|
11394
|
-
*
|
|
11395
|
-
*
|
|
11460
|
+
* come from the central registry. Empty since the semantic-release
|
|
11461
|
+
* image became self-contained (the security audit runs the
|
|
11462
|
+
* materialized catci bundle instead of a baked-in catladder cli) —
|
|
11463
|
+
* kept as the escape hatch should an image ever need central-only
|
|
11464
|
+
* treatment again.
|
|
11396
11465
|
*/
|
|
11397
|
-
exports.CENTRAL_ONLY_IMAGES = new Set(
|
|
11466
|
+
exports.CENTRAL_ONLY_IMAGES = new Set();
|
|
11398
11467
|
exports.RUNNER_IMAGE_BUILD_CONTEXT = {
|
|
11399
11468
|
"jobs-default": "root",
|
|
11400
11469
|
"jobs-meteor": "root",
|
|
@@ -14522,6 +14591,7 @@ const path_1 = __nccwpck_require__(16928);
|
|
|
14522
14591
|
const backends_1 = __nccwpck_require__(93243);
|
|
14523
14592
|
const gitlab_1 = __nccwpck_require__(8475);
|
|
14524
14593
|
const jobImagesPlan_1 = __nccwpck_require__(11585);
|
|
14594
|
+
const shippedCatci_1 = __nccwpck_require__(93401);
|
|
14525
14595
|
/**
|
|
14526
14596
|
* generates the pipeline files of all pipeline types enabled in the
|
|
14527
14597
|
* config (see `pipelines`). Pass an explicit `pipelineType` to generate
|
|
@@ -14538,6 +14608,11 @@ async function generatePipelineFiles(context, pipelineType) {
|
|
|
14538
14608
|
recursive: true,
|
|
14539
14609
|
force: true
|
|
14540
14610
|
});
|
|
14611
|
+
// same for the materialized catci bundle (union across backends)
|
|
14612
|
+
await (0, promises_1.rm)(shippedCatci_1.GENERATED_CATCI_FOLDER, {
|
|
14613
|
+
recursive: true,
|
|
14614
|
+
force: true
|
|
14615
|
+
});
|
|
14541
14616
|
}
|
|
14542
14617
|
for (const type of pipelineTypes) {
|
|
14543
14618
|
await generatePipelineFilesForBackend(context, (0, backends_1.getPipelineBackend)(type));
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
# build context is the root directory
|
|
2
1
|
FROM node:lts-alpine
|
|
3
2
|
|
|
4
3
|
RUN apk add --no-cache bash git git-lfs
|
|
5
4
|
|
|
6
|
-
RUN mkdir /packages
|
|
7
|
-
COPY ./cli /packages/cli
|
|
8
|
-
|
|
9
5
|
# add semantic release
|
|
10
6
|
RUN yarn global add \
|
|
11
7
|
semantic-release@^19 \
|
|
@@ -14,11 +10,10 @@ RUN yarn global add \
|
|
|
14
10
|
https://github.com/panter/git.git#b4037626cc583d3e9f7995ea0604b23730d0a22e \
|
|
15
11
|
@semantic-release/changelog \
|
|
16
12
|
@semantic-release/gitlab@9 \
|
|
17
|
-
@semantic-release/exec@6
|
|
18
|
-
/packages/cli
|
|
13
|
+
@semantic-release/exec@6
|
|
19
14
|
|
|
20
15
|
RUN mkdir -p /scripts
|
|
21
|
-
COPY ./
|
|
16
|
+
COPY ./scripts/* /scripts/
|
|
22
17
|
RUN chmod +x /scripts/*
|
|
23
18
|
|
|
24
19
|
ENV PATH="/scripts:${PATH}"
|
|
@@ -9,7 +9,24 @@ set -e
|
|
|
9
9
|
# better branches settings: https://github.com/semantic-release/semantic-release/issues/1581
|
|
10
10
|
|
|
11
11
|
echo "doing security audit check"
|
|
12
|
-
catladder
|
|
12
|
+
CATCI=".catladder-generated/catci/index.js"
|
|
13
|
+
if [ -f "$CATCI" ]; then
|
|
14
|
+
# catci is materialized by pipeline generation — always the exact
|
|
15
|
+
# catladder version that generated this pipeline
|
|
16
|
+
if [ "$GITHUB_ACTIONS" = "true" ]; then
|
|
17
|
+
# github: gate only — the MR remediation is gitlab-specific
|
|
18
|
+
node "$CATCI" security-audit check ./
|
|
19
|
+
else
|
|
20
|
+
node "$CATCI" security-audit ci-job ./ "$GL_TOKEN" "$CI_DEFAULT_BRANCH" "$CI_PROJECT_ID" "$GITLAB_USER_ID"
|
|
21
|
+
fi
|
|
22
|
+
elif command -v catladder > /dev/null 2>&1; then
|
|
23
|
+
# repos generated by old catladder versions (no materialized catci):
|
|
24
|
+
# the central image still bakes the cli in
|
|
25
|
+
catladder security audit ci-job ./ "$GL_TOKEN" "$CI_DEFAULT_BRANCH" "$CI_PROJECT_ID" "$GITLAB_USER_ID"
|
|
26
|
+
else
|
|
27
|
+
echo "neither $CATCI nor the catladder cli found — regenerate the pipeline with a current catladder version (catenv)"
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
13
30
|
|
|
14
31
|
echo "doing semantic release"
|
|
15
32
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# LEGACY-COMPAT build of the semantic-release image for the CENTRAL
|
|
2
|
+
# registry only (build context: repo root, see .gitlab-ci-yaml-custom.yaml).
|
|
3
|
+
#
|
|
4
|
+
# The shipped definition (semantic-release/Dockerfile) is self-contained:
|
|
5
|
+
# repos generated by current catladder run the security audit via the
|
|
6
|
+
# materialized `.catladder-generated/catci/` bundle. But the central
|
|
7
|
+
# `:latest` tag is shared with repos on OLD catladder versions whose
|
|
8
|
+
# generated pipelines expect `catladder` on the PATH — so the central
|
|
9
|
+
# build additionally bakes the cli in, exactly as before.
|
|
10
|
+
#
|
|
11
|
+
# Delete together with the central registry / central mode.
|
|
12
|
+
FROM node:lts-alpine
|
|
13
|
+
|
|
14
|
+
RUN apk add --no-cache bash git git-lfs
|
|
15
|
+
|
|
16
|
+
RUN mkdir /packages
|
|
17
|
+
COPY ./cli /packages/cli
|
|
18
|
+
|
|
19
|
+
# add semantic release
|
|
20
|
+
RUN yarn global add \
|
|
21
|
+
semantic-release@^19 \
|
|
22
|
+
@semantic-release/commit-analyzer \
|
|
23
|
+
@semantic-release/release-notes-generator \
|
|
24
|
+
https://github.com/panter/git.git#b4037626cc583d3e9f7995ea0604b23730d0a22e \
|
|
25
|
+
@semantic-release/changelog \
|
|
26
|
+
@semantic-release/gitlab@9 \
|
|
27
|
+
@semantic-release/exec@6 \
|
|
28
|
+
/packages/cli
|
|
29
|
+
|
|
30
|
+
RUN mkdir -p /scripts
|
|
31
|
+
COPY ./runner-images/semantic-release/scripts/* /scripts/
|
|
32
|
+
RUN chmod +x /scripts/*
|
|
33
|
+
|
|
34
|
+
ENV PATH="/scripts:${PATH}"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
/**
|
|
7
|
+
* catci — catladder's CI companion.
|
|
8
|
+
*
|
|
9
|
+
* A minimal, treeshaken bundle of the CLI commands that CI jobs need.
|
|
10
|
+
* It is materialized into `.catladder-generated/catci/` by pipeline
|
|
11
|
+
* generation, so jobs can run it with plain `node` — always the exact
|
|
12
|
+
* version that generated the pipeline, with no install step and no
|
|
13
|
+
* catladder baked into job images.
|
|
14
|
+
*
|
|
15
|
+
* Deliberately no CLI framework: the surface is tiny and the callers
|
|
16
|
+
* are generated scripts, not humans.
|
|
17
|
+
*/
|
|
18
|
+
const rest_1 = require("@gitbeaker/rest");
|
|
19
|
+
const evaluateSecurityAudit_1 = require("./security/evaluateSecurityAudit");
|
|
20
|
+
const createSecurityAuditMergeRequest_1 = require("./security/createSecurityAuditMergeRequest");
|
|
21
|
+
const GITLAB_HOST = "https://git.panter.ch";
|
|
22
|
+
const USAGE = `catci — catladder CI companion
|
|
23
|
+
|
|
24
|
+
usage:
|
|
25
|
+
catci security-audit ci-job <path> <gitlab-token> <main-branch> <project-id> <user-id>
|
|
26
|
+
evaluates ${createSecurityAuditMergeRequest_1.SECURITY_AUDIT_FILE_NAME}; creates a gitlab MR with the
|
|
27
|
+
audit template when the document is missing (and exits 1)
|
|
28
|
+
|
|
29
|
+
catci security-audit check <path>
|
|
30
|
+
evaluates ${createSecurityAuditMergeRequest_1.SECURITY_AUDIT_FILE_NAME}; exits 1 with instructions when
|
|
31
|
+
the document is missing or unanswered (no remediation — works on
|
|
32
|
+
any CI, including github)
|
|
33
|
+
`;
|
|
34
|
+
const fail = message => {
|
|
35
|
+
console.error(message);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* shared gate: evaluates the audit document and prints the overview.
|
|
40
|
+
* Returns null when the document could not be evaluated (missing or
|
|
41
|
+
* unparseable) so the caller can decide on remediation.
|
|
42
|
+
*/
|
|
43
|
+
const evaluateGate = async path => {
|
|
44
|
+
const evaluation = await (0, evaluateSecurityAudit_1.evaluateSecurityAudit)({
|
|
45
|
+
path
|
|
46
|
+
});
|
|
47
|
+
if (evaluation.isErr()) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
if (evaluation.value.score.answeredTopics === 0) {
|
|
51
|
+
fail(`audit document has no answered topics\n` + `please answer security topics in ${createSecurityAuditMergeRequest_1.SECURITY_AUDIT_FILE_NAME} by adding responsible people and check/cross in the table`);
|
|
52
|
+
}
|
|
53
|
+
console.log((0, evaluateSecurityAudit_1.makeSecurityAuditOverview)(evaluation.value));
|
|
54
|
+
return evaluation.value;
|
|
55
|
+
};
|
|
56
|
+
const securityAuditCheck = async path => {
|
|
57
|
+
const evaluation = await evaluateGate(path);
|
|
58
|
+
if (!evaluation) {
|
|
59
|
+
fail(`could not evaluate ${createSecurityAuditMergeRequest_1.SECURITY_AUDIT_FILE_NAME}\n` + `please add a ${createSecurityAuditMergeRequest_1.SECURITY_AUDIT_FILE_NAME} security audit document to the repository ` + `(run \`catladder security audit create\` locally to generate the template)`);
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const securityAuditCiJob = async (path, token, mainBranch, projectId, userId) => {
|
|
63
|
+
const evaluation = await evaluateGate(path);
|
|
64
|
+
if (evaluation) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
console.log("could not evaluate security audit document");
|
|
68
|
+
console.log("creating new merge request with security audit template...");
|
|
69
|
+
const api = new rest_1.Gitlab({
|
|
70
|
+
host: GITLAB_HOST,
|
|
71
|
+
token
|
|
72
|
+
});
|
|
73
|
+
const mr = await (0, createSecurityAuditMergeRequest_1.createSecurityAuditMergeRequest)({
|
|
74
|
+
api,
|
|
75
|
+
mainBranch,
|
|
76
|
+
projectId,
|
|
77
|
+
userId: parseInt(userId)
|
|
78
|
+
});
|
|
79
|
+
if (mr.isErr()) {
|
|
80
|
+
fail(`could not create merge request with security audit template: ${mr.error}`);
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
console.log("security audit merge request created successfully");
|
|
84
|
+
console.log(`please finish the MR by updating ${createSecurityAuditMergeRequest_1.SECURITY_AUDIT_FILE_NAME}: ${mr.value.web_url}`);
|
|
85
|
+
process.exit(1);
|
|
86
|
+
};
|
|
87
|
+
const main = async () => {
|
|
88
|
+
const [group, command, ...args] = process.argv.slice(2);
|
|
89
|
+
if (group === "security-audit" && command === "ci-job" && args.length === 5) {
|
|
90
|
+
const [path, token, mainBranch, projectId, userId] = args;
|
|
91
|
+
return securityAuditCiJob(path, token, mainBranch, projectId, userId);
|
|
92
|
+
}
|
|
93
|
+
if (group === "security-audit" && command === "check" && args.length === 1) {
|
|
94
|
+
return securityAuditCheck(args[0]);
|
|
95
|
+
}
|
|
96
|
+
fail(USAGE);
|
|
97
|
+
};
|
|
98
|
+
main().catch(error => {
|
|
99
|
+
fail(`catci failed: ${error instanceof Error ? error.message : error}`);
|
|
100
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catci.js","sourceRoot":"","sources":["../../../src/catci.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;GAWG;AACH,0CAAyC;AACzC,4EAG0C;AAC1C,gGAGoD;AAEpD,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAE5C,MAAM,KAAK,GAAG;;;;kBAII,0DAAwB;;;;kBAIxB,0DAAwB;;;CAGzC,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,OAAe,EAAS,EAAE;IACtC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,YAAY,GAAG,KAAK,EAAE,IAAY,EAAE,EAAE;IAC1C,MAAM,UAAU,GAAG,MAAM,IAAA,6CAAqB,EAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IACzD,IAAI,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,KAAK,CAAC,EAAE,CAAC;QAChD,IAAI,CACF,yCAAyC;YACvC,oCAAoC,0DAAwB,4DAA4D,CAC3H,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,IAAA,iDAAyB,EAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IACzD,OAAO,UAAU,CAAC,KAAK,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,KAAK,EAAE,IAAY,EAAE,EA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CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxD,IAAI,KAAK,KAAK,gBAAgB,IAAI,OAAO,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC5E,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;QAC1D,OAAO,kBAAkB,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACxE,CAAC;IACD,IAAI,KAAK,KAAK,gBAAgB,IAAI,OAAO,KAAK,OAAO,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3E,OAAO,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC;IACD,IAAI,CAAC,KAAK,CAAC,CAAC;AACd,CAAC,CAAC;AAEF,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,IAAI,CAAC,iBAAiB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;AAC1E,CAAC,CAAC,CAAC"}
|
|
@@ -12,6 +12,7 @@ const ciVariables_1 = require("./ciVariables");
|
|
|
12
12
|
const createGithubJobs_1 = require("./createGithubJobs");
|
|
13
13
|
const jobImagesPlan_1 = require("../../customImages/jobImagesPlan");
|
|
14
14
|
const scriptFunctions_1 = require("./scriptFunctions");
|
|
15
|
+
const shippedCatci_1 = require("../../catci/shippedCatci");
|
|
15
16
|
const utils_1 = require("../../utils");
|
|
16
17
|
const githubReleaseJobs_1 = require("./githubReleaseJobs");
|
|
17
18
|
const scriptFiles_1 = require("./scriptFiles");
|
|
@@ -73,7 +74,9 @@ class GithubBackend {
|
|
|
73
74
|
content: workflow
|
|
74
75
|
})),
|
|
75
76
|
// materialized job scripts and image definitions (repo mode)
|
|
76
|
-
...scripts.getGeneratedFiles(), ...images.getGeneratedFiles()
|
|
77
|
+
...scripts.getGeneratedFiles(), ...images.getGeneratedFiles(),
|
|
78
|
+
// catci: the CI companion the release job's security audit runs
|
|
79
|
+
...(0, shippedCatci_1.getCatciGeneratedFiles)()];
|
|
77
80
|
}
|
|
78
81
|
createImagesPlan(config) {
|
|
79
82
|
return new jobImagesPlan_1.JobImagesPlan((0, jobImagesPlan_1.getJobImagesMode)(config, this.type), this.type);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GithubBackend.js","sourceRoot":"","sources":["../../../../../../pipeline/src/backends/github/GithubBackend.ts"],"names":[],"mappings":";;;AAAA,0CAAkD;AAClD,+BAA4B;AAC5B,gEAA6D;AAE7D,+CAA2D;AAI3D,+CAA6D;AAC7D,yDAK4B;AAC5B,oEAG0C;AAC1C,uDAAuE;AACvE,uCAAqC;AACrC,2DAA2D;AAC3D,+CAAyE;AAEzE,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAE7C;;;GAGG;AACH,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAE3C,MAAM,iBAAiB,GAGnB;IACF,EAAE,EAAE;QACF,IAAI,EAAE,kBAAkB;QACxB,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC,EAAE,EAAE;QACtE,WAAW,EAAE;YACX,KAAK,EAAE,6CAA6C;YACpD,oBAAoB,EAAE,IAAI;SAC3B;KACF;IACD,UAAU,EAAE;QACV,IAAI,EAAE,gBAAgB;QACtB,6CAA6C;QAC7C,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;KACrC;IACD,aAAa,EAAE;QACb,IAAI,EAAE,mBAAmB;QACzB,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE;KAC/B;CACF,CAAC;AAEF,MAAa,aAAa;IAA1B;QACW,SAAI,GAAG,QAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"GithubBackend.js","sourceRoot":"","sources":["../../../../../../pipeline/src/backends/github/GithubBackend.ts"],"names":[],"mappings":";;;AAAA,0CAAkD;AAClD,+BAA4B;AAC5B,gEAA6D;AAE7D,+CAA2D;AAI3D,+CAA6D;AAC7D,yDAK4B;AAC5B,oEAG0C;AAC1C,uDAAuE;AACvE,2DAAkE;AAClE,uCAAqC;AACrC,2DAA2D;AAC3D,+CAAyE;AAEzE,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAE7C;;;GAGG;AACH,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAE3C,MAAM,iBAAiB,GAGnB;IACF,EAAE,EAAE;QACF,IAAI,EAAE,kBAAkB;QACxB,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,aAAa,EAAE,UAAU,CAAC,EAAE,EAAE;QACtE,WAAW,EAAE;YACX,KAAK,EAAE,6CAA6C;YACpD,oBAAoB,EAAE,IAAI;SAC3B;KACF;IACD,UAAU,EAAE;QACV,IAAI,EAAE,gBAAgB;QACtB,6CAA6C;QAC7C,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE;KACrC;IACD,aAAa,EAAE;QACb,IAAI,EAAE,mBAAmB;QACzB,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE;KAC/B;CACF,CAAC;AAEF,MAAa,aAAa;IAA1B;QACW,SAAI,GAAG,QAAiB,CAAC;IA8IpC,CAAC;IA5IC,KAAK,CAAC,OAAO;QACX,MAAM,OAAO,GAAG,MAAM,IAAA,kBAAO,EAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE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