@catladder/cli 0.0.0-main-a008667a → 0.0.0-main-48ef3537
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/catenv/index.js +228 -110
- package/dist/bundles/cli/index.js +228 -110
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -39135,6 +39135,76 @@ exports.RUNNER_BUILD_RESOURCE_VARIABLES = {
|
|
|
39135
39135
|
|
|
39136
39136
|
/***/ }),
|
|
39137
39137
|
|
|
39138
|
+
/***/ 5669:
|
|
39139
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
39140
|
+
|
|
39141
|
+
"use strict";
|
|
39142
|
+
|
|
39143
|
+
|
|
39144
|
+
var __assign = this && this.__assign || function () {
|
|
39145
|
+
__assign = Object.assign || function (t) {
|
|
39146
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39147
|
+
s = arguments[i];
|
|
39148
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
39149
|
+
}
|
|
39150
|
+
return t;
|
|
39151
|
+
};
|
|
39152
|
+
return __assign.apply(this, arguments);
|
|
39153
|
+
};
|
|
39154
|
+
var __read = this && this.__read || function (o, n) {
|
|
39155
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
39156
|
+
if (!m) return o;
|
|
39157
|
+
var i = m.call(o),
|
|
39158
|
+
r,
|
|
39159
|
+
ar = [],
|
|
39160
|
+
e;
|
|
39161
|
+
try {
|
|
39162
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
39163
|
+
} catch (error) {
|
|
39164
|
+
e = {
|
|
39165
|
+
error: error
|
|
39166
|
+
};
|
|
39167
|
+
} finally {
|
|
39168
|
+
try {
|
|
39169
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
39170
|
+
} finally {
|
|
39171
|
+
if (e) throw e.error;
|
|
39172
|
+
}
|
|
39173
|
+
}
|
|
39174
|
+
return ar;
|
|
39175
|
+
};
|
|
39176
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
39177
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
39178
|
+
if (ar || !(i in from)) {
|
|
39179
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
39180
|
+
ar[i] = from[i];
|
|
39181
|
+
}
|
|
39182
|
+
}
|
|
39183
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
39184
|
+
};
|
|
39185
|
+
exports.__esModule = true;
|
|
39186
|
+
exports.createArtifactsConfig = void 0;
|
|
39187
|
+
var path_1 = __nccwpck_require__(1017);
|
|
39188
|
+
var createArtifactsConfig = function (rootPath, artifactsReports, artifacts) {
|
|
39189
|
+
var _a, _b, _c, _d;
|
|
39190
|
+
return artifactsReports || artifacts ? {
|
|
39191
|
+
artifacts: __assign(__assign({
|
|
39192
|
+
paths: []
|
|
39193
|
+
}, artifacts), {
|
|
39194
|
+
reports: __assign(__assign({}, artifacts === null || artifacts === void 0 ? void 0 : artifacts.reports), {
|
|
39195
|
+
junit: [artifactsReports === null || artifactsReports === void 0 ? void 0 : artifactsReports.junit, Array.isArray((_a = artifacts === null || artifacts === void 0 ? void 0 : artifacts.reports) === null || _a === void 0 ? void 0 : _a.junit) && ((_b = artifacts === null || artifacts === void 0 ? void 0 : artifacts.reports) === null || _b === void 0 ? void 0 : _b.junit), typeof ((_c = artifacts === null || artifacts === void 0 ? void 0 : artifacts.reports) === null || _c === void 0 ? void 0 : _c.junit) === "string" && [(_d = artifacts === null || artifacts === void 0 ? void 0 : artifacts.reports) === null || _d === void 0 ? void 0 : _d.junit]].filter(Array.isArray).reduce(function (acc, curr) {
|
|
39196
|
+
return __spreadArray(__spreadArray([], __read(acc), false), __read(curr.map(function (p) {
|
|
39197
|
+
return (0, path_1.join)(rootPath, p);
|
|
39198
|
+
})), false);
|
|
39199
|
+
}, [])
|
|
39200
|
+
})
|
|
39201
|
+
})
|
|
39202
|
+
} : undefined;
|
|
39203
|
+
};
|
|
39204
|
+
exports.createArtifactsConfig = createArtifactsConfig;
|
|
39205
|
+
|
|
39206
|
+
/***/ }),
|
|
39207
|
+
|
|
39138
39208
|
/***/ 8063:
|
|
39139
39209
|
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
39140
39210
|
|
|
@@ -39349,6 +39419,8 @@ var constants_1 = __nccwpck_require__(1542);
|
|
|
39349
39419
|
var createBuildJob_1 = __nccwpck_require__(8063);
|
|
39350
39420
|
var docker_1 = __nccwpck_require__(3219);
|
|
39351
39421
|
var types_1 = __nccwpck_require__(1197);
|
|
39422
|
+
var sbom_1 = __nccwpck_require__(9927);
|
|
39423
|
+
var sbom_2 = __nccwpck_require__(5928);
|
|
39352
39424
|
var RUNNER_BUILD_VARIABLES = {
|
|
39353
39425
|
KUBERNETES_CPU_REQUEST: "0.5",
|
|
39354
39426
|
KUBERNETES_CPU_LIMIT: "2",
|
|
@@ -39374,12 +39446,12 @@ var createCustomBuildJobs = function (context) {
|
|
|
39374
39446
|
expire_in: "1 day"
|
|
39375
39447
|
}
|
|
39376
39448
|
}) : null;
|
|
39377
|
-
return __spreadArray(__spreadArray([], __read(appBuildJob ? [appBuildJob] : []), false), __read((0, docker_1.requiresDockerBuild)(context) ? [(0, docker_1.createDockerBuildJobDefault)(context, {
|
|
39449
|
+
return __spreadArray(__spreadArray(__spreadArray([], __read(appBuildJob ? [appBuildJob] : []), false), __read((0, docker_1.requiresDockerBuild)(context) ? [(0, docker_1.createDockerBuildJobDefault)(context, {
|
|
39378
39450
|
script: [((_d = buildConfig.docker) === null || _d === void 0 ? void 0 : _d.type) === "nginx" ? "ensureNginxDockerfile" : "" // e.g. custom,
|
|
39379
39451
|
].filter(Boolean),
|
|
39380
39452
|
variables: {},
|
|
39381
39453
|
needs: appBuildJob ? [constants_1.APP_BUILD_JOB_NAME] : []
|
|
39382
|
-
})] : []), false);
|
|
39454
|
+
})] : []), false), __read((0, sbom_2.sbomDeactivated)(context) ? [] : [(0, sbom_1.createSbomBuildJob)(context)]), false);
|
|
39383
39455
|
};
|
|
39384
39456
|
exports.createCustomBuildJobs = createCustomBuildJobs;
|
|
39385
39457
|
|
|
@@ -39482,9 +39554,9 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
39482
39554
|
};
|
|
39483
39555
|
exports.__esModule = true;
|
|
39484
39556
|
exports.createCustomTestJobs = void 0;
|
|
39485
|
-
var path_1 = __nccwpck_require__(1017);
|
|
39486
39557
|
var utils_1 = __nccwpck_require__(7461);
|
|
39487
39558
|
var types_1 = __nccwpck_require__(1197);
|
|
39559
|
+
var createArtifactsConfig_1 = __nccwpck_require__(5669);
|
|
39488
39560
|
var RUNNER_CUSTOM_TEST_VARIABLES = {
|
|
39489
39561
|
KUBERNETES_CPU_REQUEST: "0.5",
|
|
39490
39562
|
KUBERNETES_CPU_LIMIT: "2",
|
|
@@ -39492,7 +39564,7 @@ var RUNNER_CUSTOM_TEST_VARIABLES = {
|
|
|
39492
39564
|
KUBERNETES_MEMORY_LIMIT: "4Gi"
|
|
39493
39565
|
};
|
|
39494
39566
|
var createCustomTestJobs = function (context) {
|
|
39495
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
39567
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
39496
39568
|
// don't run tests after release
|
|
39497
39569
|
if (((_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.trigger) === "taggedRelease") {
|
|
39498
39570
|
return [];
|
|
@@ -39518,35 +39590,22 @@ var createCustomTestJobs = function (context) {
|
|
|
39518
39590
|
cache: undefined,
|
|
39519
39591
|
script: __spreadArray([], __read((_f = (0, utils_1.ensureArray)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : []), false),
|
|
39520
39592
|
allow_failure: true
|
|
39521
|
-
}), createArtifactsConfig(context.componentConfig.dir, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifactsReports)) : null;
|
|
39593
|
+
}), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifactsReports, (_h = buildConfig.audit) === null || _h === void 0 ? void 0 : _h.artifacts)) : null;
|
|
39522
39594
|
var lintJob = buildConfig.lint ? __assign(__assign(__assign({
|
|
39523
39595
|
name: "👮 lint"
|
|
39524
39596
|
}, base), {
|
|
39525
|
-
image: (
|
|
39526
|
-
script: __spreadArray([], __read((
|
|
39527
|
-
}), createArtifactsConfig(context.componentConfig.dir, (
|
|
39597
|
+
image: (_k = (_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.jobImage) !== null && _k !== void 0 ? _k : buildConfig.jobImage,
|
|
39598
|
+
script: __spreadArray([], __read((_m = (0, utils_1.ensureArray)((_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.command)) !== null && _m !== void 0 ? _m : []), false)
|
|
39599
|
+
}), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifactsReports, (_p = buildConfig.lint) === null || _p === void 0 ? void 0 : _p.artifacts)) : null;
|
|
39528
39600
|
var testJob = buildConfig.test ? __assign(__assign(__assign({
|
|
39529
39601
|
name: "🧪 test"
|
|
39530
39602
|
}, base), {
|
|
39531
|
-
image: (
|
|
39532
|
-
script: __spreadArray([], __read((
|
|
39533
|
-
}), createArtifactsConfig(context.componentConfig.dir, (
|
|
39603
|
+
image: (_r = (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.jobImage) !== null && _r !== void 0 ? _r : buildConfig.jobImage,
|
|
39604
|
+
script: __spreadArray([], __read((_t = (0, utils_1.ensureArray)((_s = buildConfig.test) === null || _s === void 0 ? void 0 : _s.command)) !== null && _t !== void 0 ? _t : []), false)
|
|
39605
|
+
}), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifactsReports, (_v = buildConfig.test) === null || _v === void 0 ? void 0 : _v.artifacts)) : null;
|
|
39534
39606
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
39535
39607
|
};
|
|
39536
39608
|
exports.createCustomTestJobs = createCustomTestJobs;
|
|
39537
|
-
var createArtifactsConfig = function (rootPath, artifactsReports) {
|
|
39538
|
-
var _a, _b;
|
|
39539
|
-
return artifactsReports ? {
|
|
39540
|
-
artifacts: {
|
|
39541
|
-
paths: [],
|
|
39542
|
-
reports: {
|
|
39543
|
-
junit: (_b = (_a = artifactsReports === null || artifactsReports === void 0 ? void 0 : artifactsReports.junit) === null || _a === void 0 ? void 0 : _a.map(function (p) {
|
|
39544
|
-
return (0, path_1.join)(rootPath, p);
|
|
39545
|
-
})) !== null && _b !== void 0 ? _b : []
|
|
39546
|
-
}
|
|
39547
|
-
}
|
|
39548
|
-
} : undefined;
|
|
39549
|
-
};
|
|
39550
39609
|
|
|
39551
39610
|
/***/ }),
|
|
39552
39611
|
|
|
@@ -39843,6 +39902,8 @@ var cache_1 = __nccwpck_require__(4303);
|
|
|
39843
39902
|
var constants_2 = __nccwpck_require__(9284);
|
|
39844
39903
|
var yarn_1 = __nccwpck_require__(464);
|
|
39845
39904
|
var runner_1 = __nccwpck_require__(5071);
|
|
39905
|
+
var sbom_1 = __nccwpck_require__(9927);
|
|
39906
|
+
var sbom_2 = __nccwpck_require__(5928);
|
|
39846
39907
|
var createNodeBuildJobs = function (context) {
|
|
39847
39908
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
39848
39909
|
var buildConfig = context.componentConfig.build;
|
|
@@ -39864,7 +39925,7 @@ var createNodeBuildJobs = function (context) {
|
|
|
39864
39925
|
},
|
|
39865
39926
|
jobTags: buildConfig.jobTags
|
|
39866
39927
|
}) : null;
|
|
39867
|
-
return __spreadArray(__spreadArray([], __read(appBuildJob ? [appBuildJob] : []), false), __read((0, docker_1.requiresDockerBuild)(context) ? [(0, docker_1.createDockerBuildJobDefault)(context, {
|
|
39928
|
+
return __spreadArray(__spreadArray(__spreadArray([], __read(appBuildJob ? [appBuildJob] : []), false), __read((0, docker_1.requiresDockerBuild)(context) ? [(0, docker_1.createDockerBuildJobDefault)(context, {
|
|
39868
39929
|
script: [buildConfig.type === "node-static" || buildConfig.type === "storybook" ? "ensureNginxDockerfile" : "ensureNodeDockerfile"],
|
|
39869
39930
|
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
|
|
39870
39931
|
variables: {
|
|
@@ -39875,7 +39936,7 @@ var createNodeBuildJobs = function (context) {
|
|
|
39875
39936
|
})) === null || _g === void 0 ? void 0 : _g.join("\n")
|
|
39876
39937
|
},
|
|
39877
39938
|
needs: appBuildJob ? [constants_1.APP_BUILD_JOB_NAME] : []
|
|
39878
|
-
})] : []), false);
|
|
39939
|
+
})] : []), false), __read((0, sbom_2.sbomDeactivated)(context) ? [] : [(0, sbom_1.createSbomBuildJob)(context)]), false);
|
|
39879
39940
|
};
|
|
39880
39941
|
exports.createNodeBuildJobs = createNodeBuildJobs;
|
|
39881
39942
|
|
|
@@ -40191,8 +40252,9 @@ var utils_1 = __nccwpck_require__(7461);
|
|
|
40191
40252
|
var cache_1 = __nccwpck_require__(4303);
|
|
40192
40253
|
var constants_1 = __nccwpck_require__(9284);
|
|
40193
40254
|
var yarn_1 = __nccwpck_require__(464);
|
|
40255
|
+
var createArtifactsConfig_1 = __nccwpck_require__(5669);
|
|
40194
40256
|
var createNodeTestJobs = function (context) {
|
|
40195
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
40257
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
40196
40258
|
// don't run tests after release
|
|
40197
40259
|
if (((_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.trigger) === "taggedRelease") {
|
|
40198
40260
|
return [];
|
|
@@ -40208,7 +40270,7 @@ var createNodeTestJobs = function (context) {
|
|
|
40208
40270
|
envMode: "none"
|
|
40209
40271
|
};
|
|
40210
40272
|
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
40211
|
-
var auditJob = buildConfig.audit !== false ? __assign(__assign({
|
|
40273
|
+
var auditJob = buildConfig.audit !== false ? __assign(__assign(__assign({
|
|
40212
40274
|
name: "🛡 audit"
|
|
40213
40275
|
}, base), {
|
|
40214
40276
|
image: (_d = (_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.jobImage) !== null && _d !== void 0 ? _d : defaultImage,
|
|
@@ -40216,21 +40278,21 @@ var createNodeTestJobs = function (context) {
|
|
|
40216
40278
|
script: __spreadArray(["cd ".concat(context.componentConfig.dir)], __read((_f = (0, utils_1.ensureArray)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : [((_g = context.packageManagerInfo) === null || _g === void 0 ? void 0 : _g.isClassic) ? "yarn audit" : "yarn npm audit --environment production" // yarn 2
|
|
40217
40279
|
]), false),
|
|
40218
40280
|
allow_failure: true
|
|
40219
|
-
}) : null;
|
|
40220
|
-
var lintJob = buildConfig.lint !== false ? __assign(__assign({
|
|
40281
|
+
}), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_h = buildConfig.audit) === null || _h === void 0 ? void 0 : _h.artifactsReports, (_j = buildConfig.audit) === null || _j === void 0 ? void 0 : _j.artifacts)) : null;
|
|
40282
|
+
var lintJob = buildConfig.lint !== false ? __assign(__assign(__assign({
|
|
40221
40283
|
name: "👮 lint"
|
|
40222
40284
|
}, base), {
|
|
40223
|
-
image: (
|
|
40285
|
+
image: (_l = (_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.jobImage) !== null && _l !== void 0 ? _l : defaultImage,
|
|
40224
40286
|
cache: (0, cache_1.getNodeCache)(context),
|
|
40225
|
-
script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(yarnInstall), false), __read((
|
|
40226
|
-
}) : null;
|
|
40227
|
-
var testJob = buildConfig.test !== false ? __assign(__assign({
|
|
40287
|
+
script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(yarnInstall), false), __read((_o = (0, utils_1.ensureArray)((_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.command)) !== null && _o !== void 0 ? _o : ["yarn lint"]), false)
|
|
40288
|
+
}), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_p = buildConfig.lint) === null || _p === void 0 ? void 0 : _p.artifactsReports, (_q = buildConfig.lint) === null || _q === void 0 ? void 0 : _q.artifacts)) : null;
|
|
40289
|
+
var testJob = buildConfig.test !== false ? __assign(__assign(__assign({
|
|
40228
40290
|
name: "🧪 test"
|
|
40229
40291
|
}, base), {
|
|
40230
|
-
image: (
|
|
40292
|
+
image: (_s = (_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.jobImage) !== null && _s !== void 0 ? _s : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
|
|
40231
40293
|
cache: (0, cache_1.getNodeCache)(context),
|
|
40232
|
-
script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(yarnInstall), false), __read((
|
|
40233
|
-
}) : null;
|
|
40294
|
+
script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(yarnInstall), false), __read((_u = (0, utils_1.ensureArray)((_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.command)) !== null && _u !== void 0 ? _u : ["yarn test"]), false)
|
|
40295
|
+
}), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_v = buildConfig.test) === null || _v === void 0 ? void 0 : _v.artifactsReports, (_w = buildConfig.test) === null || _w === void 0 ? void 0 : _w.artifacts)) : null;
|
|
40234
40296
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
40235
40297
|
};
|
|
40236
40298
|
exports.createNodeTestJobs = createNodeTestJobs;
|
|
@@ -40356,10 +40418,21 @@ var __read = this && this.__read || function (o, n) {
|
|
|
40356
40418
|
}
|
|
40357
40419
|
return ar;
|
|
40358
40420
|
};
|
|
40421
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
40422
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40423
|
+
if (ar || !(i in from)) {
|
|
40424
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
40425
|
+
ar[i] = from[i];
|
|
40426
|
+
}
|
|
40427
|
+
}
|
|
40428
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
40429
|
+
};
|
|
40359
40430
|
exports.__esModule = true;
|
|
40360
40431
|
exports.createRailsBuildJobs = void 0;
|
|
40361
40432
|
var types_1 = __nccwpck_require__(1197);
|
|
40362
40433
|
var docker_1 = __nccwpck_require__(3219);
|
|
40434
|
+
var sbom_1 = __nccwpck_require__(5928);
|
|
40435
|
+
var sbom_2 = __nccwpck_require__(9927);
|
|
40363
40436
|
var createRailsBuildJobs = function (context) {
|
|
40364
40437
|
var _a, _b, _c;
|
|
40365
40438
|
var buildConfig = context.componentConfig.build;
|
|
@@ -40374,13 +40447,13 @@ var createRailsBuildJobs = function (context) {
|
|
|
40374
40447
|
v = _b[1];
|
|
40375
40448
|
return "--env '".concat(k).concat(v ? "=".concat(v) : "", "'");
|
|
40376
40449
|
}).join(" ");
|
|
40377
|
-
return [(0, docker_1.createDockerBuildJobBase)(context, {
|
|
40450
|
+
return __spreadArray([(0, docker_1.createDockerBuildJobBase)(context, {
|
|
40378
40451
|
variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), context.componentConfig.build.extraVars),
|
|
40379
40452
|
// custom script
|
|
40380
40453
|
script: [docker_1.gitlabDockerLogin, "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
|
|
40381
40454
|
// replace private git ssh gem sources with https to make bundler with credentials via env var work
|
|
40382
40455
|
"sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs, " ").concat((_c = (_b = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packExtraArgs) === null || _b === void 0 ? void 0 : _b.join(" ")) !== null && _c !== void 0 ? _c : "")]
|
|
40383
|
-
})];
|
|
40456
|
+
})], __read((0, sbom_1.sbomDeactivated)(context) ? [] : [(0, sbom_2.createSbomBuildJob)(context)]), false);
|
|
40384
40457
|
};
|
|
40385
40458
|
exports.createRailsBuildJobs = createRailsBuildJobs;
|
|
40386
40459
|
|
|
@@ -40535,6 +40608,42 @@ exports.createRailsTestJobs = createRailsTestJobs;
|
|
|
40535
40608
|
|
|
40536
40609
|
/***/ }),
|
|
40537
40610
|
|
|
40611
|
+
/***/ 9927:
|
|
40612
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
40613
|
+
|
|
40614
|
+
"use strict";
|
|
40615
|
+
|
|
40616
|
+
|
|
40617
|
+
exports.__esModule = true;
|
|
40618
|
+
exports.createSbomBuildJob = exports.SBOM_FILE = exports.SBOM_BUILD_JOB_NAME = void 0;
|
|
40619
|
+
var utils_1 = __nccwpck_require__(7461);
|
|
40620
|
+
exports.SBOM_BUILD_JOB_NAME = "🧾 sbom";
|
|
40621
|
+
exports.SBOM_FILE = "__sbom.json";
|
|
40622
|
+
var createSbomBuildJob = function (context) {
|
|
40623
|
+
var _a, _b, _c, _d, _e;
|
|
40624
|
+
var buildConfig = context.componentConfig.build;
|
|
40625
|
+
var defaultImage = "aquasec/trivy:0.38.3";
|
|
40626
|
+
var defaultScript = ["trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(((_a = context.packageManagerInfo) === null || _a === void 0 ? void 0 : _a.componentIsInWorkspace) ? "." : context.componentConfig.dir)];
|
|
40627
|
+
var image = buildConfig.type === "custom" && buildConfig.sbom !== false ? (_c = (_b = buildConfig.sbom) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage : defaultImage;
|
|
40628
|
+
var script = buildConfig.type === "custom" && buildConfig.sbom !== false ? (_e = (0, utils_1.ensureArray)((_d = buildConfig.sbom) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : defaultScript : defaultScript;
|
|
40629
|
+
return {
|
|
40630
|
+
name: exports.SBOM_BUILD_JOB_NAME,
|
|
40631
|
+
stage: "build",
|
|
40632
|
+
envMode: "jobPerEnv",
|
|
40633
|
+
variables: {},
|
|
40634
|
+
cache: undefined,
|
|
40635
|
+
image: image,
|
|
40636
|
+
script: script,
|
|
40637
|
+
allow_failure: true,
|
|
40638
|
+
artifacts: {
|
|
40639
|
+
paths: [exports.SBOM_FILE]
|
|
40640
|
+
}
|
|
40641
|
+
};
|
|
40642
|
+
};
|
|
40643
|
+
exports.createSbomBuildJob = createSbomBuildJob;
|
|
40644
|
+
|
|
40645
|
+
/***/ }),
|
|
40646
|
+
|
|
40538
40647
|
/***/ 1197:
|
|
40539
40648
|
/***/ ((__unused_webpack_module, exports) => {
|
|
40540
40649
|
|
|
@@ -40725,7 +40834,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
40725
40834
|
|
|
40726
40835
|
exports.__esModule = true;
|
|
40727
40836
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
40728
|
-
exports.PIPELINE_IMAGE_TAG = "main-
|
|
40837
|
+
exports.PIPELINE_IMAGE_TAG = "main-48ef3537" || 0;
|
|
40729
40838
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
40730
40839
|
|
|
40731
40840
|
/***/ }),
|
|
@@ -41995,9 +42104,42 @@ var __assign = this && this.__assign || function () {
|
|
|
41995
42104
|
};
|
|
41996
42105
|
return __assign.apply(this, arguments);
|
|
41997
42106
|
};
|
|
42107
|
+
var __read = this && this.__read || function (o, n) {
|
|
42108
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
42109
|
+
if (!m) return o;
|
|
42110
|
+
var i = m.call(o),
|
|
42111
|
+
r,
|
|
42112
|
+
ar = [],
|
|
42113
|
+
e;
|
|
42114
|
+
try {
|
|
42115
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
42116
|
+
} catch (error) {
|
|
42117
|
+
e = {
|
|
42118
|
+
error: error
|
|
42119
|
+
};
|
|
42120
|
+
} finally {
|
|
42121
|
+
try {
|
|
42122
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
42123
|
+
} finally {
|
|
42124
|
+
if (e) throw e.error;
|
|
42125
|
+
}
|
|
42126
|
+
}
|
|
42127
|
+
return ar;
|
|
42128
|
+
};
|
|
42129
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
42130
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
42131
|
+
if (ar || !(i in from)) {
|
|
42132
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42133
|
+
ar[i] = from[i];
|
|
42134
|
+
}
|
|
42135
|
+
}
|
|
42136
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
42137
|
+
};
|
|
41998
42138
|
exports.__esModule = true;
|
|
41999
42139
|
exports.getBaseRollbackJob = exports.getBaseDeploymentStopJob = exports.getBaseDeploymentJob = exports.ROLLBACK_JOB_NAME = exports.STOP_JOB_NAME = exports.DEPLOY_JOB_NAME = void 0;
|
|
42000
42140
|
var docker_1 = __nccwpck_require__(3219);
|
|
42141
|
+
var sbom_1 = __nccwpck_require__(9927);
|
|
42142
|
+
var sbom_2 = __nccwpck_require__(5928);
|
|
42001
42143
|
var utils_1 = __nccwpck_require__(2757);
|
|
42002
42144
|
exports.DEPLOY_JOB_NAME = "🚀 Deploy";
|
|
42003
42145
|
exports.STOP_JOB_NAME = "🛑 Stop ⚠️";
|
|
@@ -42023,13 +42165,16 @@ var getBaseDeploymentJob = function (context) {
|
|
|
42023
42165
|
return {
|
|
42024
42166
|
name: exports.DEPLOY_JOB_NAME,
|
|
42025
42167
|
envMode: "stagePerEnv",
|
|
42026
|
-
needs:
|
|
42168
|
+
needs: __spreadArray(__spreadArray([], __read((0, sbom_2.sbomDeactivated)(context) ? [] : [{
|
|
42169
|
+
job: sbom_1.SBOM_BUILD_JOB_NAME,
|
|
42170
|
+
artifacts: true
|
|
42171
|
+
}]), false), __read(context.componentConfig.deploy ? (_c = (_b = context.componentConfig.deploy.waitFor) === null || _b === void 0 ? void 0 : _b.map(function (c) {
|
|
42027
42172
|
return {
|
|
42028
42173
|
componentName: c,
|
|
42029
42174
|
job: exports.DEPLOY_JOB_NAME,
|
|
42030
42175
|
artifacts: false
|
|
42031
42176
|
};
|
|
42032
|
-
})) !== null && _c !== void 0 ? _c :
|
|
42177
|
+
})) !== null && _c !== void 0 ? _c : [] : []), false),
|
|
42033
42178
|
// we don't want to deploy when there is a broken test
|
|
42034
42179
|
needsStages: [{
|
|
42035
42180
|
stage: "build",
|
|
@@ -42161,6 +42306,7 @@ var database_1 = __nccwpck_require__(1384);
|
|
|
42161
42306
|
var gitlab_1 = __nccwpck_require__(4997);
|
|
42162
42307
|
var jobName_1 = __nccwpck_require__(7311);
|
|
42163
42308
|
var createArgsString_1 = __nccwpck_require__(8686);
|
|
42309
|
+
var sbom_1 = __nccwpck_require__(5928);
|
|
42164
42310
|
var setExtraVarsScripts = function (deployConfig) {
|
|
42165
42311
|
return ["export GCLOUD_PROJECT_NUMBER=$(gcloud projects describe ".concat(deployConfig.projectId, " --format=\"value(projectNumber)\")"), "echo \"GCLOUD_PROJECT_NUMBER: $GCLOUD_PROJECT_NUMBER\""];
|
|
42166
42312
|
};
|
|
@@ -42312,18 +42458,18 @@ var createGoogleCloudRunDeployJobs = function (context) {
|
|
|
42312
42458
|
"gcloud beta run jobs executions list ".concat(commonArgsString, " --job ").concat(jobName, " --format=\"value(name)\" | xargs -I {} gcloud beta run jobs executions delete {} --quiet ").concat(commonArgsString), "gcloud beta run jobs delete ".concat(jobName, " ").concat(commonArgsString)];
|
|
42313
42459
|
});
|
|
42314
42460
|
};
|
|
42315
|
-
var deployScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), __read(setExtraVarsScripts(deployConfig)), false), __read(pushImageToArtifactsRegistry), false), ["echo \"$ENV_VARS\" > ____envvars.yaml"], false), __read(deployConfig.cloudSql ? (0, database_1.getDatabaseCreateScript)(context, deployConfig) // we create the db, so that we can also delete it afterwards
|
|
42461
|
+
var deployScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), __read(setExtraVarsScripts(deployConfig)), false), __read(pushImageToArtifactsRegistry), false), ["echo \"$ENV_VARS\" > ____envvars.yaml"], false), __read(deployConfig.cloudSql ? (0, database_1.getDatabaseCreateScript)(context, deployConfig) // we create the db, so that we can also delete it afterwards
|
|
42316
42462
|
: []), false), __read(getCreateScheduleScripts()), false), __read(getJobCreateScripts()), false), __read(getJobRunScripts("preDeploy")), false), __read(deployConfig.service !== false ? [getServiceDeployScript(deployConfig.service)] : []), false), __read(Object.entries((_b = deployConfig.additionalServices) !== null && _b !== void 0 ? _b : {}).map(function (_a) {
|
|
42317
42463
|
var _b = __read(_a, 2),
|
|
42318
42464
|
name = _b[0],
|
|
42319
42465
|
service = _b[1];
|
|
42320
42466
|
return getServiceDeployScript(service, "-" + name);
|
|
42321
|
-
})), false), __read(getJobRunScripts("postDeploy")), false), ["docker image rm ".concat(gcloudImageName)], false);
|
|
42322
|
-
var stopScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), __read(deployConfig.service !== false ? ["gcloud run services delete ".concat(serviceName, " ").concat(commonArgsString)] : []), false), __read(Object.entries((_c = deployConfig.additionalServices) !== null && _c !== void 0 ? _c : {}).map(function (_a) {
|
|
42467
|
+
})), false), __read(getJobRunScripts("postDeploy")), false), ["docker image rm ".concat(gcloudImageName)], false), __read((0, sbom_1.getDependencyTrackUploadScript)(context)), false);
|
|
42468
|
+
var stopScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), __read(deployConfig.service !== false ? ["gcloud run services delete ".concat(serviceName, " ").concat(commonArgsString)] : []), false), __read(Object.entries((_c = deployConfig.additionalServices) !== null && _c !== void 0 ? _c : {}).map(function (_a) {
|
|
42323
42469
|
var _b = __read(_a, 1),
|
|
42324
42470
|
name = _b[0];
|
|
42325
42471
|
return "gcloud run services delete ".concat(serviceName, "-").concat(name, " ").concat(commonArgsString);
|
|
42326
|
-
})), false), __read(getDeleteSchedulesScripts()), false), __read(getDeleteJobsScripts()), false), __read(deployConfig.cloudSql && deployConfig.cloudSql.deleteDatabaseOnStop ? (0, database_1.getDatabaseDeleteScript)(context, deployConfig) : []), false);
|
|
42472
|
+
})), false), __read(getDeleteSchedulesScripts()), false), __read(getDeleteJobsScripts()), false), __read(deployConfig.cloudSql && deployConfig.cloudSql.deleteDatabaseOnStop ? (0, database_1.getDatabaseDeleteScript)(context, deployConfig) : []), false), __read((0, sbom_1.getDependencyTrackDeleteScript)(context)), false);
|
|
42327
42473
|
return [(0, lodash_1.merge)({}, baseDeploymentJob, (0, docker_1.getDockerJobBaseProps)(context), {
|
|
42328
42474
|
artifacts: {
|
|
42329
42475
|
paths: ["____envvars.yaml"]
|
|
@@ -42703,6 +42849,7 @@ var yarn_1 = __nccwpck_require__(464);
|
|
|
42703
42849
|
var runner_1 = __nccwpck_require__(5071);
|
|
42704
42850
|
var base_1 = __nccwpck_require__(9177);
|
|
42705
42851
|
var types_1 = __nccwpck_require__(3109);
|
|
42852
|
+
var sbom_1 = __nccwpck_require__(5928);
|
|
42706
42853
|
var createCustomDeployJobs = function (context) {
|
|
42707
42854
|
var _a, _b, _c;
|
|
42708
42855
|
var deployConfig = context.componentConfig.deploy;
|
|
@@ -42721,10 +42868,10 @@ var createCustomDeployJobs = function (context) {
|
|
|
42721
42868
|
return __spreadArray([(0, lodash_1.merge)({}, baseDeploymentJob, {
|
|
42722
42869
|
image: (_a = deployConfig.jobImage) !== null && _a !== void 0 ? _a : (0, runner_1.getRunnerImage)("jobs-default"),
|
|
42723
42870
|
cache: (_b = deployConfig.jobCache) !== null && _b !== void 0 ? _b : [],
|
|
42724
|
-
script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(deployConfig.requiresYarnInstall ? yarnInstall : []), false), __read(deployConfig.script), false)
|
|
42871
|
+
script: __spreadArray(__spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(deployConfig.requiresYarnInstall ? yarnInstall : []), false), __read(deployConfig.script), false), __read((0, sbom_1.getDependencyTrackUploadScript)(context)), false)
|
|
42725
42872
|
})], __read(deployConfig.stopScript ? [(0, lodash_1.merge)({}, (0, base_1.getBaseDeploymentStopJob)(context), {
|
|
42726
42873
|
image: (_c = deployConfig.jobImage) !== null && _c !== void 0 ? _c : (0, runner_1.getRunnerImage)("jobs-default"),
|
|
42727
|
-
script: deployConfig.stopScript
|
|
42874
|
+
script: __spreadArray(__spreadArray([], __read(deployConfig.stopScript), false), __read((0, sbom_1.getDependencyTrackDeleteScript)(context)), false)
|
|
42728
42875
|
})] : []), false);
|
|
42729
42876
|
};
|
|
42730
42877
|
exports.createCustomDeployJobs = createCustomDeployJobs;
|
|
@@ -42999,6 +43146,7 @@ var runner_1 = __nccwpck_require__(5071);
|
|
|
42999
43146
|
var base_1 = __nccwpck_require__(9177);
|
|
43000
43147
|
var types_1 = __nccwpck_require__(3109);
|
|
43001
43148
|
var kubeValues_1 = __nccwpck_require__(1061);
|
|
43149
|
+
var sbom_1 = __nccwpck_require__(5928);
|
|
43002
43150
|
var createKubernetesDeployJobs = function (context) {
|
|
43003
43151
|
var _a, _b, _c;
|
|
43004
43152
|
var deployConfig = context.componentConfig.deploy;
|
|
@@ -43036,12 +43184,12 @@ var createKubernetesDeployJobs = function (context) {
|
|
|
43036
43184
|
var clusterName = "kube-".concat(context.environment.fullName);
|
|
43037
43185
|
var connectContext = ["kubectl config set-cluster \"".concat(clusterName, "\" --server=\"$").concat((0, __1.getSecretVarNameForContext)(context, "KUBE_URL"), "\" --certificate-authority <(echo $").concat((0, __1.getSecretVarNameForContext)(context, "KUBE_CA_PEM"), " | base64 -d) --embed-certs=true"), "kubectl config set-credentials \"".concat(clusterName, "\" --token=\"$").concat((0, __1.getSecretVarNameForContext)(context, "KUBE_TOKEN"), "\""), "kubectl config set-context \"".concat(clusterName, "\" --cluster=\"").concat(clusterName, "\" --user=\"").concat(clusterName, "\" --namespace=\"").concat(context.environment.envVars.KUBE_NAMESPACE, "\""), "kubectl config use-context \"".concat(clusterName, "\"")];
|
|
43038
43186
|
return [(0, lodash_1.merge)({}, baseDeploymentJob, shared, {
|
|
43039
|
-
script: __spreadArray(__spreadArray([], __read(connectContext), false), ["kubernetesCreateSecret", "kubernetesDeploy", "echo deployment successful 😻"], false),
|
|
43187
|
+
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(connectContext), false), ["kubernetesCreateSecret", "kubernetesDeploy"], false), __read((0, sbom_1.getDependencyTrackUploadScript)(context)), false), ["echo deployment successful 😻"], false),
|
|
43040
43188
|
environment: {
|
|
43041
43189
|
kubernetes: kubernetesEnvironment
|
|
43042
43190
|
}
|
|
43043
43191
|
}), (0, lodash_1.merge)({}, baseStopJob, shared, {
|
|
43044
|
-
script: __spreadArray(__spreadArray([], __read(connectContext), false), ["kubernetesDelete"], false),
|
|
43192
|
+
script: __spreadArray(__spreadArray(__spreadArray([], __read(connectContext), false), ["kubernetesDelete"], false), __read((0, sbom_1.getDependencyTrackDeleteScript)(context)), false),
|
|
43045
43193
|
environment: {
|
|
43046
43194
|
kubernetes: kubernetesEnvironment
|
|
43047
43195
|
}
|
|
@@ -43487,6 +43635,30 @@ exports.processSecretsAsFiles = processSecretsAsFiles;
|
|
|
43487
43635
|
|
|
43488
43636
|
/***/ }),
|
|
43489
43637
|
|
|
43638
|
+
/***/ 5928:
|
|
43639
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
43640
|
+
|
|
43641
|
+
"use strict";
|
|
43642
|
+
|
|
43643
|
+
|
|
43644
|
+
exports.__esModule = true;
|
|
43645
|
+
exports.getDependencyTrackDeleteScript = exports.getDependencyTrackUploadScript = exports.sbomDeactivated = void 0;
|
|
43646
|
+
var sbom_1 = __nccwpck_require__(9927);
|
|
43647
|
+
var sbomDeactivated = function (context) {
|
|
43648
|
+
return context.componentConfig.build.type === "custom" && context.componentConfig.build.sbom === false;
|
|
43649
|
+
};
|
|
43650
|
+
exports.sbomDeactivated = sbomDeactivated;
|
|
43651
|
+
var getDependencyTrackUploadScript = function (context) {
|
|
43652
|
+
return (0, exports.sbomDeactivated)(context) ? [] : ["echo Uploading SBOM to Dependency Track", "/dtrackuploader https://dep.panter.swiss/ \"$DT_KEY_PROD\" upload \"".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName, "/").concat(context.componentName, "\" \"").concat(context.environment.url, "\" \"").concat(sbom_1.SBOM_FILE, "\" vex.json || true")];
|
|
43653
|
+
};
|
|
43654
|
+
exports.getDependencyTrackUploadScript = getDependencyTrackUploadScript;
|
|
43655
|
+
var getDependencyTrackDeleteScript = function (context) {
|
|
43656
|
+
return (0, exports.sbomDeactivated)(context) ? [] : ["echo Disabling component in Dependency Track", "/dtrackuploader https://dep.panter.swiss/ \"$DT_KEY_PROD\" disable \"".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName, "/").concat(context.componentName, "\" \"").concat(context.environment.url, "\" || true")];
|
|
43657
|
+
};
|
|
43658
|
+
exports.getDependencyTrackDeleteScript = getDependencyTrackDeleteScript;
|
|
43659
|
+
|
|
43660
|
+
/***/ }),
|
|
43661
|
+
|
|
43490
43662
|
/***/ 438:
|
|
43491
43663
|
/***/ ((__unused_webpack_module, exports) => {
|
|
43492
43664
|
|
|
@@ -44492,7 +44664,6 @@ exports.__esModule = true;
|
|
|
44492
44664
|
exports.createJobsForComponent = void 0;
|
|
44493
44665
|
var lodash_1 = __nccwpck_require__(3255);
|
|
44494
44666
|
var build_1 = __nccwpck_require__(3760);
|
|
44495
|
-
var reporting_1 = __nccwpck_require__(3545);
|
|
44496
44667
|
var context_1 = __nccwpck_require__(2041);
|
|
44497
44668
|
var deploy_1 = __nccwpck_require__(223);
|
|
44498
44669
|
var getCommitInfo_1 = __nccwpck_require__(5923);
|
|
@@ -44517,9 +44688,8 @@ var getCustomJobs = function (context) {
|
|
|
44517
44688
|
var createRawJobs = function (context) {
|
|
44518
44689
|
var buildJobs = build_1.BUILD_TYPES[context.componentConfig.build.type].jobs(context);
|
|
44519
44690
|
var deployJobs = context.componentConfig.deploy !== false ? deploy_1.DEPLOY_TYPES[context.componentConfig.deploy.type].jobs(context) : [];
|
|
44520
|
-
var reportingJobs = (0, reporting_1.createReportingJobs)(context);
|
|
44521
44691
|
var customJobs = getCustomJobs(context);
|
|
44522
|
-
return __spreadArray(__spreadArray(__spreadArray(
|
|
44692
|
+
return __spreadArray(__spreadArray(__spreadArray([], __read(buildJobs), false), __read(deployJobs), false), __read(customJobs), false);
|
|
44523
44693
|
};
|
|
44524
44694
|
var createJobsForComponent = function (config, componentName, env, trigger) {
|
|
44525
44695
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -44776,7 +44946,7 @@ var makeGitlabJob = function (componentName, env, _a, allJobs) {
|
|
|
44776
44946
|
};
|
|
44777
44947
|
});
|
|
44778
44948
|
});
|
|
44779
|
-
var cleanedNeeds = __spreadArray(__spreadArray(__spreadArray([], __read(
|
|
44949
|
+
var cleanedNeeds = __spreadArray(__spreadArray(__spreadArray([], __read(needsFromStages !== null && needsFromStages !== void 0 ? needsFromStages : []), false), __read(needs !== null && needs !== void 0 ? needs : []), false), __read(needsOtherComponent !== null && needsOtherComponent !== void 0 ? needsOtherComponent : []), false);
|
|
44780
44950
|
var gitlabNeeds = cleanedNeeds === null || cleanedNeeds === void 0 ? void 0 : cleanedNeeds.map(function (n) {
|
|
44781
44951
|
var _a;
|
|
44782
44952
|
return (0, lodash_1.isObject)(n) ? {
|
|
@@ -44786,6 +44956,9 @@ var makeGitlabJob = function (componentName, env, _a, allJobs) {
|
|
|
44786
44956
|
}).sort(function (a, b) {
|
|
44787
44957
|
return getJobName(a).localeCompare(getJobName(b));
|
|
44788
44958
|
});
|
|
44959
|
+
var deduplicatedGitlabNeeds = __spreadArray([], __read(new Map(gitlabNeeds.map(function (n) {
|
|
44960
|
+
return [(0, lodash_1.isObject)(n) ? n.job : n, n];
|
|
44961
|
+
})).values()), false);
|
|
44789
44962
|
var fullJobName = getFullJobName(name, componentName, envMode !== "none" ? env : undefined);
|
|
44790
44963
|
var gitlabJob = removeUndefined(__assign(__assign({}, job), {
|
|
44791
44964
|
tags: jobTags,
|
|
@@ -44794,7 +44967,7 @@ var makeGitlabJob = function (componentName, env, _a, allJobs) {
|
|
|
44794
44967
|
on_stop: getFullReferencedJobName(job.environment.on_stop, componentName, env, allJobs)
|
|
44795
44968
|
}) : job.environment,
|
|
44796
44969
|
// sort in a predictable manner for snapshot tests
|
|
44797
|
-
needs:
|
|
44970
|
+
needs: deduplicatedGitlabNeeds,
|
|
44798
44971
|
retry: defaults_1.BASE_RETRY,
|
|
44799
44972
|
interruptible: true
|
|
44800
44973
|
}));
|
|
@@ -45575,61 +45748,6 @@ exports.mergeWithMergingArrays = mergeWithMergingArrays;
|
|
|
45575
45748
|
|
|
45576
45749
|
/***/ }),
|
|
45577
45750
|
|
|
45578
|
-
/***/ 3545:
|
|
45579
|
-
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
45580
|
-
|
|
45581
|
-
"use strict";
|
|
45582
|
-
|
|
45583
|
-
|
|
45584
|
-
exports.__esModule = true;
|
|
45585
|
-
exports.createReportingJobs = void 0;
|
|
45586
|
-
var base_1 = __nccwpck_require__(9177);
|
|
45587
|
-
var utils_1 = __nccwpck_require__(7461);
|
|
45588
|
-
var STAGE = "verify";
|
|
45589
|
-
var SBOM_GENERATE_JOB_NAME = "🧾 sbom";
|
|
45590
|
-
var SBOM_FILE = "__sbom.json";
|
|
45591
|
-
var createSbomGenerateJob = function (context) {
|
|
45592
|
-
var _a, _b, _c, _d, _e;
|
|
45593
|
-
var buildConfig = context.componentConfig.build;
|
|
45594
|
-
var defaultImage = "aquasec/trivy:0.38.3";
|
|
45595
|
-
var defaultScript = ["trivy fs --quiet --format cyclonedx --output \"".concat(SBOM_FILE, "\" ").concat(((_a = context.packageManagerInfo) === null || _a === void 0 ? void 0 : _a.componentIsInWorkspace) ? "." : context.componentConfig.dir)];
|
|
45596
|
-
var image = buildConfig.type === "custom" && buildConfig.sbom !== false ? (_c = (_b = buildConfig.sbom) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage : defaultImage;
|
|
45597
|
-
var script = buildConfig.type === "custom" && buildConfig.sbom !== false ? (_e = (0, utils_1.ensureArray)((_d = buildConfig.sbom) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : defaultScript : defaultScript;
|
|
45598
|
-
return {
|
|
45599
|
-
name: SBOM_GENERATE_JOB_NAME,
|
|
45600
|
-
stage: STAGE,
|
|
45601
|
-
needs: context.componentConfig.deploy !== false ? [base_1.DEPLOY_JOB_NAME] : [],
|
|
45602
|
-
envMode: "jobPerEnv",
|
|
45603
|
-
variables: {},
|
|
45604
|
-
cache: undefined,
|
|
45605
|
-
image: image,
|
|
45606
|
-
script: script,
|
|
45607
|
-
allow_failure: true,
|
|
45608
|
-
artifacts: {
|
|
45609
|
-
paths: [SBOM_FILE]
|
|
45610
|
-
}
|
|
45611
|
-
};
|
|
45612
|
-
};
|
|
45613
|
-
var createSbomUploadJob = function (context) {
|
|
45614
|
-
return {
|
|
45615
|
-
name: "🧾 sbom upload",
|
|
45616
|
-
stage: STAGE,
|
|
45617
|
-
needs: [SBOM_GENERATE_JOB_NAME],
|
|
45618
|
-
envMode: "jobPerEnv",
|
|
45619
|
-
variables: {},
|
|
45620
|
-
cache: undefined,
|
|
45621
|
-
image: "git.panter.ch:5001/open-source/dependency-track-uploader:dtrackuploader-v0.2.1",
|
|
45622
|
-
script: ["/dtrackuploader https://dep.panter.swiss/ \"$DT_KEY_PROD\" upload \"".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName, "/").concat(context.componentName, "\" \"").concat(context.environment.shortName, "\" \"").concat(SBOM_FILE, "\" vex.json")],
|
|
45623
|
-
allow_failure: true
|
|
45624
|
-
};
|
|
45625
|
-
};
|
|
45626
|
-
var createReportingJobs = function (context) {
|
|
45627
|
-
return context.componentConfig.build.type === "custom" && context.componentConfig.build.sbom === false ? [] : [createSbomGenerateJob(context), createSbomUploadJob(context)];
|
|
45628
|
-
};
|
|
45629
|
-
exports.createReportingJobs = createReportingJobs;
|
|
45630
|
-
|
|
45631
|
-
/***/ }),
|
|
45632
|
-
|
|
45633
45751
|
/***/ 9904:
|
|
45634
45752
|
/***/ ((module) => {
|
|
45635
45753
|
|