@catladder/cli 0.0.0-next-51c86d8a โ 0.0.0-next-84c974cd
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 +53 -131
- package/dist/bundles/cli/index.js +53 -131
- package/dist/pipeline/src/build/base/createAppBuildJob.js +2 -3
- package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
- package/dist/pipeline/src/build/custom/testJob.js +10 -11
- package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
- package/dist/pipeline/src/build/node/testJob.js +10 -11
- package/dist/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/pipeline/src/build/rails/build.js +0 -1
- package/dist/pipeline/src/build/rails/build.js.map +1 -1
- package/dist/pipeline/src/build/rails/test.js +7 -8
- package/dist/pipeline/src/build/rails/test.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +0 -10
- package/dist/pipeline/src/build/types.js.map +1 -1
- package/dist/pipeline/src/context/createComponentContext.js +0 -1
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironment.js +0 -1
- package/dist/pipeline/src/context/getEnvironment.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +2 -5
- package/dist/pipeline/src/context/getEnvironmentVariables.js +9 -19
- package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
- package/dist/pipeline/src/context/resolveReferences.d.ts +0 -3
- package/dist/pipeline/src/context/resolveReferences.js +1 -10
- package/dist/pipeline/src/context/resolveReferences.js.map +1 -1
- package/dist/pipeline/src/deploy/base/deploy.js +3 -4
- package/dist/pipeline/src/deploy/base/deploy.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/index.js +2 -2
- package/dist/pipeline/src/deploy/cloudRun/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js +3 -15
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js +0 -2
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/index.js +2 -2
- package/dist/pipeline/src/deploy/kubernetes/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.d.ts +1 -2
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +2 -3
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js.map +1 -1
- package/dist/pipeline/src/deploy/types/base.d.ts +0 -6
- package/dist/pipeline/src/deploy/types/kubernetes.d.ts +1 -34
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js +2 -4
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js.map +1 -1
- package/dist/pipeline/src/types/config.d.ts +0 -8
- package/dist/pipeline/src/types/context.d.ts +0 -8
- package/dist/pipeline/src/types/context.js.map +1 -1
- package/dist/pipeline/src/types/jobs.d.ts +0 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.d.ts +0 -85
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.js +0 -27
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.js.map +0 -1
|
@@ -4231,7 +4231,7 @@ const constants_1 = __nccwpck_require__(82786);
|
|
|
4231
4231
|
const writeBuildInfo_1 = __nccwpck_require__(99578);
|
|
4232
4232
|
const writeDotEnv_1 = __nccwpck_require__(48052);
|
|
4233
4233
|
const createAppBuildJob = (context, { script, variables, runnerVariables, cache, ...def }) => {
|
|
4234
|
-
var _a
|
|
4234
|
+
var _a;
|
|
4235
4235
|
return (0, lodash_1.merge)({
|
|
4236
4236
|
name: constants_1.APP_BUILD_JOB_NAME,
|
|
4237
4237
|
envMode: "jobPerEnv",
|
|
@@ -4245,14 +4245,13 @@ const createAppBuildJob = (context, { script, variables, runnerVariables, cache,
|
|
|
4245
4245
|
? {
|
|
4246
4246
|
...context.environment.envVars,
|
|
4247
4247
|
...context.environment.jobOnlyVars.build.envVars,
|
|
4248
|
-
...((_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
4249
4248
|
}
|
|
4250
4249
|
: {}),
|
|
4251
4250
|
},
|
|
4252
4251
|
runnerVariables: {
|
|
4253
4252
|
...constants_1.RUNNER_BUILD_RESOURCE_VARIABLES,
|
|
4254
4253
|
...(runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}),
|
|
4255
|
-
...((
|
|
4254
|
+
...((_a = context.build.config.runnerVariables) !== null && _a !== void 0 ? _a : {}),
|
|
4256
4255
|
},
|
|
4257
4256
|
script: [
|
|
4258
4257
|
...(context.type === "component"
|
|
@@ -4652,7 +4651,7 @@ const RUNNER_CUSTOM_TEST_VARIABLES = {
|
|
|
4652
4651
|
KUBERNETES_MEMORY_LIMIT: "4Gi",
|
|
4653
4652
|
};
|
|
4654
4653
|
const createCustomTestJobs = (context) => {
|
|
4655
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
|
4654
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
4656
4655
|
// don't run tests after release
|
|
4657
4656
|
// TODO: this will be replaced by using rules
|
|
4658
4657
|
if (context.trigger === "taggedRelease") {
|
|
@@ -4666,7 +4665,6 @@ const createCustomTestJobs = (context) => {
|
|
|
4666
4665
|
variables: {
|
|
4667
4666
|
APP_PATH: context.build.dir,
|
|
4668
4667
|
...context.environment.jobOnlyVars.build.envVars,
|
|
4669
|
-
...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
4670
4668
|
},
|
|
4671
4669
|
runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
|
|
4672
4670
|
services: buildConfig.jobServices,
|
|
@@ -4679,29 +4677,29 @@ const createCustomTestJobs = (context) => {
|
|
|
4679
4677
|
? {
|
|
4680
4678
|
name: "๐ก audit",
|
|
4681
4679
|
...base,
|
|
4682
|
-
image: (
|
|
4680
|
+
image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage,
|
|
4683
4681
|
cache: undefined,
|
|
4684
|
-
script: [...(0, utils_1.ensureArray)((
|
|
4682
|
+
script: [...(0, utils_1.ensureArray)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)],
|
|
4685
4683
|
allow_failure: true,
|
|
4686
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
4684
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.artifactsReports, (_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.artifacts),
|
|
4687
4685
|
}
|
|
4688
4686
|
: null;
|
|
4689
4687
|
const lintJob = buildConfig.lint
|
|
4690
4688
|
? {
|
|
4691
4689
|
name: "๐ฎ lint",
|
|
4692
4690
|
...base,
|
|
4693
|
-
image: (
|
|
4694
|
-
script: [...(0, utils_1.ensureArray)((
|
|
4695
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
4691
|
+
image: (_g = (_f = buildConfig.lint) === null || _f === void 0 ? void 0 : _f.jobImage) !== null && _g !== void 0 ? _g : buildConfig.jobImage,
|
|
4692
|
+
script: [...(0, utils_1.ensureArray)((_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.command)],
|
|
4693
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.artifactsReports, (_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.artifacts),
|
|
4696
4694
|
}
|
|
4697
4695
|
: null;
|
|
4698
4696
|
const testJob = buildConfig.test
|
|
4699
4697
|
? {
|
|
4700
4698
|
name: "๐งช test",
|
|
4701
4699
|
...base,
|
|
4702
|
-
image: (
|
|
4703
|
-
script: [...(0, utils_1.ensureArray)((
|
|
4704
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
4700
|
+
image: (_m = (_l = buildConfig.test) === null || _l === void 0 ? void 0 : _l.jobImage) !== null && _m !== void 0 ? _m : buildConfig.jobImage,
|
|
4701
|
+
script: [...(0, utils_1.ensureArray)((_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.command)],
|
|
4702
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.artifactsReports, (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.artifacts),
|
|
4705
4703
|
}
|
|
4706
4704
|
: null;
|
|
4707
4705
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -5239,7 +5237,7 @@ const constants_1 = __nccwpck_require__(31765);
|
|
|
5239
5237
|
const yarn_1 = __nccwpck_require__(45043);
|
|
5240
5238
|
const createJobCache_1 = __nccwpck_require__(10340);
|
|
5241
5239
|
const createNodeTestJobs = (context) => {
|
|
5242
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t
|
|
5240
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
5243
5241
|
// don't run tests after release
|
|
5244
5242
|
// TODO: this will be replaced by using rules
|
|
5245
5243
|
if (context.trigger === "taggedRelease") {
|
|
@@ -5257,7 +5255,6 @@ const createNodeTestJobs = (context) => {
|
|
|
5257
5255
|
...(context.type === "component"
|
|
5258
5256
|
? {
|
|
5259
5257
|
...context.environment.jobOnlyVars.build.envVars,
|
|
5260
|
-
...((_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
5261
5258
|
}
|
|
5262
5259
|
: {}),
|
|
5263
5260
|
},
|
|
@@ -5272,48 +5269,48 @@ const createNodeTestJobs = (context) => {
|
|
|
5272
5269
|
? {
|
|
5273
5270
|
name: "๐ก audit",
|
|
5274
5271
|
...base,
|
|
5275
|
-
image: (
|
|
5272
|
+
image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : defaultImage,
|
|
5276
5273
|
cache: undefined, // audit does not need yarn install and no cache
|
|
5277
5274
|
script: [
|
|
5278
5275
|
`cd ${context.build.dir}`,
|
|
5279
|
-
...((
|
|
5276
|
+
...((_d = (0, utils_1.ensureArrayOrNull)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : [
|
|
5280
5277
|
context.packageManagerInfo.isClassic
|
|
5281
5278
|
? "yarn audit"
|
|
5282
5279
|
: "yarn npm audit --environment production", // yarn 2
|
|
5283
5280
|
]),
|
|
5284
5281
|
],
|
|
5285
5282
|
allow_failure: true,
|
|
5286
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
5283
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.artifactsReports, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifacts),
|
|
5287
5284
|
}
|
|
5288
5285
|
: null;
|
|
5289
5286
|
const lintJob = buildConfig.lint !== false
|
|
5290
5287
|
? {
|
|
5291
5288
|
name: "๐ฎ lint",
|
|
5292
5289
|
...base,
|
|
5293
|
-
image: (
|
|
5290
|
+
image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : defaultImage,
|
|
5294
5291
|
cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
|
|
5295
5292
|
script: [
|
|
5296
5293
|
...(0, yarn_1.ensureNodeVersion)(context),
|
|
5297
5294
|
`cd ${context.build.dir}`,
|
|
5298
5295
|
...yarnInstall,
|
|
5299
|
-
...((
|
|
5296
|
+
...((_k = (0, utils_1.ensureArrayOrNull)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : ["yarn lint"]),
|
|
5300
5297
|
],
|
|
5301
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
5298
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.artifactsReports, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifacts),
|
|
5302
5299
|
}
|
|
5303
5300
|
: null;
|
|
5304
5301
|
const testJob = buildConfig.test !== false
|
|
5305
5302
|
? {
|
|
5306
5303
|
name: "๐งช test",
|
|
5307
5304
|
...base,
|
|
5308
|
-
image: (
|
|
5305
|
+
image: (_p = (_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.jobImage) !== null && _p !== void 0 ? _p : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
|
|
5309
5306
|
cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
|
|
5310
5307
|
script: [
|
|
5311
5308
|
...(0, yarn_1.ensureNodeVersion)(context),
|
|
5312
5309
|
`cd ${context.build.dir}`,
|
|
5313
5310
|
...yarnInstall,
|
|
5314
|
-
...((
|
|
5311
|
+
...((_r = (0, utils_1.ensureArrayOrNull)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : ["yarn test"]),
|
|
5315
5312
|
],
|
|
5316
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
5313
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_s = buildConfig.test) === null || _s === void 0 ? void 0 : _s.artifactsReports, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifacts),
|
|
5317
5314
|
}
|
|
5318
5315
|
: null;
|
|
5319
5316
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -5429,7 +5426,6 @@ const createRailsBuildJobs = (context) => {
|
|
|
5429
5426
|
dockerBuild: {
|
|
5430
5427
|
variables: {
|
|
5431
5428
|
...context.environment.jobOnlyVars.build.envVars,
|
|
5432
|
-
...context.build.config.extraVars,
|
|
5433
5429
|
},
|
|
5434
5430
|
// custom script
|
|
5435
5431
|
script: [
|
|
@@ -5477,7 +5473,7 @@ exports.createRailsTestJobs = void 0;
|
|
|
5477
5473
|
const __1 = __nccwpck_require__(10603);
|
|
5478
5474
|
const utils_1 = __nccwpck_require__(32497);
|
|
5479
5475
|
const createRailsTestJobs = (context) => {
|
|
5480
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
|
5476
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
5481
5477
|
// don't run tests after release
|
|
5482
5478
|
// TODO: this will be replaced by using rules
|
|
5483
5479
|
if (context.trigger === "taggedRelease") {
|
|
@@ -5491,7 +5487,6 @@ const createRailsTestJobs = (context) => {
|
|
|
5491
5487
|
const base = {
|
|
5492
5488
|
variables: {
|
|
5493
5489
|
...context.environment.jobOnlyVars.build.envVars,
|
|
5494
|
-
...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
5495
5490
|
},
|
|
5496
5491
|
stage: "test",
|
|
5497
5492
|
needs: [],
|
|
@@ -5515,10 +5510,10 @@ const createRailsTestJobs = (context) => {
|
|
|
5515
5510
|
name: "๐ก audit",
|
|
5516
5511
|
...base,
|
|
5517
5512
|
cache: undefined, // audit does not need bundle install and no cache
|
|
5518
|
-
image: (
|
|
5513
|
+
image: (_c = (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage) !== null && _c !== void 0 ? _c : defaultImage,
|
|
5519
5514
|
script: [
|
|
5520
5515
|
`cd ${context.build.dir}`,
|
|
5521
|
-
...((
|
|
5516
|
+
...((_e = (0, utils_1.ensureArrayOrNull)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
|
|
5522
5517
|
"gem install bundler-audit",
|
|
5523
5518
|
"bundle audit check",
|
|
5524
5519
|
]),
|
|
@@ -5531,11 +5526,11 @@ const createRailsTestJobs = (context) => {
|
|
|
5531
5526
|
name: "๐ฎ lint",
|
|
5532
5527
|
...base,
|
|
5533
5528
|
cache: bundlerCache,
|
|
5534
|
-
image: (
|
|
5529
|
+
image: (_h = (_g = (_f = buildConfig.lint) === null || _f === void 0 ? void 0 : _f.jobImage) !== null && _g !== void 0 ? _g : buildConfig.jobImage) !== null && _h !== void 0 ? _h : defaultImage,
|
|
5535
5530
|
script: [
|
|
5536
5531
|
`cd ${context.build.dir}`,
|
|
5537
5532
|
...bundlerInstall,
|
|
5538
|
-
...((
|
|
5533
|
+
...((_k = (0, utils_1.ensureArrayOrNull)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : [
|
|
5539
5534
|
"bundle exec rubocop",
|
|
5540
5535
|
]),
|
|
5541
5536
|
],
|
|
@@ -5546,11 +5541,11 @@ const createRailsTestJobs = (context) => {
|
|
|
5546
5541
|
name: "๐งช test",
|
|
5547
5542
|
...base,
|
|
5548
5543
|
cache: bundlerCache,
|
|
5549
|
-
image: (
|
|
5544
|
+
image: (_o = (_m = (_l = buildConfig.test) === null || _l === void 0 ? void 0 : _l.jobImage) !== null && _m !== void 0 ? _m : buildConfig.jobImage) !== null && _o !== void 0 ? _o : defaultImage,
|
|
5550
5545
|
script: [
|
|
5551
5546
|
`cd ${context.build.dir}`,
|
|
5552
5547
|
...bundlerInstall,
|
|
5553
|
-
...((
|
|
5548
|
+
...((_q = (0, utils_1.ensureArrayOrNull)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)) !== null && _q !== void 0 ? _q : [
|
|
5554
5549
|
"bundle exec rspec",
|
|
5555
5550
|
]),
|
|
5556
5551
|
],
|
|
@@ -5867,7 +5862,6 @@ const createComponentContext = async (ctx) => {
|
|
|
5867
5862
|
const context = {
|
|
5868
5863
|
type: "component",
|
|
5869
5864
|
name: ctx.componentName,
|
|
5870
|
-
componentName: ctx.componentName,
|
|
5871
5865
|
env: ctx.env,
|
|
5872
5866
|
fullConfig: ctx.config,
|
|
5873
5867
|
componentConfig,
|
|
@@ -6040,7 +6034,6 @@ const getEnvironment = async (ctx) => {
|
|
|
6040
6034
|
slugPrefix: envContext.environmentSlugPrefix,
|
|
6041
6035
|
reviewSlug: envContext.reviewSlug,
|
|
6042
6036
|
slug: envContext.environmentSlug,
|
|
6043
|
-
shortName: env,
|
|
6044
6037
|
...variables,
|
|
6045
6038
|
};
|
|
6046
6039
|
};
|
|
@@ -6100,7 +6093,6 @@ exports.getEnvironmentContext = getEnvironmentContext;
|
|
|
6100
6093
|
|
|
6101
6094
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6102
6095
|
exports.getSecretVarNameForContext = exports.getSecretVarName = exports.getEnvironmentVariables = void 0;
|
|
6103
|
-
const lodash_1 = __nccwpck_require__(23255);
|
|
6104
6096
|
const deploy_1 = __nccwpck_require__(68483);
|
|
6105
6097
|
const BashExpression_1 = __nccwpck_require__(42376);
|
|
6106
6098
|
const types_1 = __nccwpck_require__(84466);
|
|
@@ -6118,7 +6110,7 @@ const getBasePredefinedVariables = (ctx) => {
|
|
|
6118
6110
|
};
|
|
6119
6111
|
};
|
|
6120
6112
|
const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
6121
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
6113
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6122
6114
|
const environmentContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
6123
6115
|
const { config, env, componentName } = ctx;
|
|
6124
6116
|
const { envConfigRaw, deployConfigRaw, buildConfigRaw, envType } = environmentContext;
|
|
@@ -6135,12 +6127,8 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6135
6127
|
...basePredefinedVariables,
|
|
6136
6128
|
ENV_SHORT: "local",
|
|
6137
6129
|
ROOT_URL: url,
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
buildConfigRaw.type === "rails"
|
|
6141
|
-
? {}
|
|
6142
|
-
: { HOST: host }),
|
|
6143
|
-
HOST_INTERNAL: host,
|
|
6130
|
+
HOSTNAME: host,
|
|
6131
|
+
HOSTNAME_INTERNAL: host,
|
|
6144
6132
|
ROOT_URL_INTERNAL: "http://" + host,
|
|
6145
6133
|
PORT: port.toString(),
|
|
6146
6134
|
};
|
|
@@ -6149,8 +6137,8 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6149
6137
|
const additionalEnvVars = deployConfigRaw
|
|
6150
6138
|
? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].getAdditionalEnvVars(environmentContext)
|
|
6151
6139
|
: {};
|
|
6152
|
-
const
|
|
6153
|
-
host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c :
|
|
6140
|
+
const HOSTNAME_INTERNAL = (_b = additionalEnvVars.HOSTNAME_INTERNAL) !== null && _b !== void 0 ? _b : "unknown-host.example.com";
|
|
6141
|
+
host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c : HOSTNAME_INTERNAL;
|
|
6154
6142
|
url = (0, BashExpression_1.joinBashExpressions)(["https://", host]);
|
|
6155
6143
|
predefinedVariables = {
|
|
6156
6144
|
...basePredefinedVariables,
|
|
@@ -6158,12 +6146,10 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6158
6146
|
...((0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
|
|
6159
6147
|
buildConfigRaw.type === "rails"
|
|
6160
6148
|
? {}
|
|
6161
|
-
: {
|
|
6149
|
+
: { HOSTNAME: host }),
|
|
6162
6150
|
ROOT_URL: url,
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
HOST_CANONICAL: HOST_INTERNAL, // legacy alias for HOST_INTERNAL
|
|
6166
|
-
ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOST_INTERNAL]),
|
|
6151
|
+
HOSTNAME_INTERNAL,
|
|
6152
|
+
ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOSTNAME_INTERNAL]),
|
|
6167
6153
|
...additionalEnvVars,
|
|
6168
6154
|
};
|
|
6169
6155
|
}
|
|
@@ -6176,10 +6162,7 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6176
6162
|
...additionalSecretKeys,
|
|
6177
6163
|
];
|
|
6178
6164
|
const secretEnvVars = (0, envVars_1.makeSecretEnvVarMapping)(env, componentName, secretEnvVarKeys);
|
|
6179
|
-
|
|
6180
|
-
const legacyFromComponents = (_j = (_h = envConfigRaw.vars) === null || _h === void 0 ? void 0 : _h.fromComponents) !== null && _j !== void 0 ? _j : {};
|
|
6181
|
-
const publicEnvVarsRawWithLegacyFromComponents = (0, lodash_1.merge)({}, (0, resolveReferences_1.translateLegacyFromComponents)(legacyFromComponents), publicEnvVarsRaw);
|
|
6182
|
-
const publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRawWithLegacyFromComponents);
|
|
6165
|
+
const publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRaw);
|
|
6183
6166
|
const envVarsRaw = addIndexVar({
|
|
6184
6167
|
...predefinedVariables,
|
|
6185
6168
|
...secretEnvVars,
|
|
@@ -6318,7 +6301,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6318
6301
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6319
6302
|
};
|
|
6320
6303
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6321
|
-
exports.
|
|
6304
|
+
exports.resolveReferences = void 0;
|
|
6322
6305
|
const lodash_1 = __nccwpck_require__(23255);
|
|
6323
6306
|
const replaceAsync_1 = __importDefault(__nccwpck_require__(72233));
|
|
6324
6307
|
// regex to resolve references in catladder variables
|
|
@@ -6368,15 +6351,6 @@ const resolveReferences = async (vars, getOtherVariables, alreadyVisitedBase = {
|
|
|
6368
6351
|
})));
|
|
6369
6352
|
};
|
|
6370
6353
|
exports.resolveReferences = resolveReferences;
|
|
6371
|
-
const translateLegacyFromComponents = (fromComponents) => {
|
|
6372
|
-
return Object.fromEntries(Object.entries(fromComponents).flatMap(([componentName, variables]) => {
|
|
6373
|
-
return Object.entries(variables).map(([ourName, otherName]) => [
|
|
6374
|
-
ourName,
|
|
6375
|
-
"${" + componentName + ":" + otherName + "}",
|
|
6376
|
-
]);
|
|
6377
|
-
}));
|
|
6378
|
-
};
|
|
6379
|
-
exports.translateLegacyFromComponents = translateLegacyFromComponents;
|
|
6380
6354
|
//# sourceMappingURL=resolveReferences.js.map
|
|
6381
6355
|
|
|
6382
6356
|
/***/ }),
|
|
@@ -6482,7 +6456,7 @@ const stop_1 = __nccwpck_require__(82846);
|
|
|
6482
6456
|
const variables_1 = __nccwpck_require__(82422);
|
|
6483
6457
|
exports.DEPLOY_JOB_NAME = "๐ Deploy";
|
|
6484
6458
|
const createDeployJob = (context, jobDefinition) => {
|
|
6485
|
-
var _a, _b, _c, _d, _e, _f
|
|
6459
|
+
var _a, _b, _c, _d, _e, _f;
|
|
6486
6460
|
const hasDocker = (0, docker_1.requiresDockerBuild)(context);
|
|
6487
6461
|
const isStoppable = (0, utils_1.contextIsStoppable)(context);
|
|
6488
6462
|
const autoStop = context.environment.envType === "review"
|
|
@@ -6561,13 +6535,12 @@ const createDeployJob = (context, jobDefinition) => {
|
|
|
6561
6535
|
...context.environment.envVars,
|
|
6562
6536
|
...(hasDocker ? (0, docker_1.getDockerImageVariables)(context) : {}),
|
|
6563
6537
|
...context.environment.jobOnlyVars.deploy.envVars,
|
|
6564
|
-
...(deployConfig ? (_e = deployConfig.extraVars) !== null && _e !== void 0 ? _e : {} : {}),
|
|
6565
6538
|
...jobDefinition.variables,
|
|
6566
6539
|
},
|
|
6567
6540
|
runnerVariables: {
|
|
6568
6541
|
...variables_1.DEPLOY_RUNNER_VARIABLES,
|
|
6569
|
-
...((
|
|
6570
|
-
...(deployConfig ? (
|
|
6542
|
+
...((_e = jobDefinition.runnerVariables) !== null && _e !== void 0 ? _e : {}),
|
|
6543
|
+
...(deployConfig ? (_f = deployConfig.runnerVariables) !== null && _f !== void 0 ? _f : {} : {}),
|
|
6571
6544
|
},
|
|
6572
6545
|
environment: isStoppable
|
|
6573
6546
|
? {
|
|
@@ -7416,7 +7389,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
7416
7389
|
],
|
|
7417
7390
|
getAdditionalEnvVars: (ctx) => {
|
|
7418
7391
|
const { fullName, env, componentName, deployConfigRaw } = ctx;
|
|
7419
|
-
const
|
|
7392
|
+
const HOSTNAME_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
|
|
7420
7393
|
fullName,
|
|
7421
7394
|
(0, BashExpression_1.getBashVariable)((0, context_1.getSecretVarName)(env, componentName, exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX)),
|
|
7422
7395
|
], "-").toLowerCase();
|
|
@@ -7427,7 +7400,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
7427
7400
|
]))
|
|
7428
7401
|
: {};
|
|
7429
7402
|
return {
|
|
7430
|
-
|
|
7403
|
+
HOSTNAME_INTERNAL,
|
|
7431
7404
|
...getCloudSqlVariables(ctx),
|
|
7432
7405
|
...jobTriggers,
|
|
7433
7406
|
DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw
|
|
@@ -7839,7 +7812,7 @@ const hasKubernetesCloudSQL = (context) => {
|
|
|
7839
7812
|
};
|
|
7840
7813
|
exports.hasKubernetesCloudSQL = hasKubernetesCloudSQL;
|
|
7841
7814
|
const createKubernetesCloudsqlBaseValues = (context) => {
|
|
7842
|
-
var _a, _b, _c
|
|
7815
|
+
var _a, _b, _c;
|
|
7843
7816
|
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
7844
7817
|
if (!(0, types_1.isOfDeployType)(deployConfig, "kubernetes")) {
|
|
7845
7818
|
throw new Error("cannot get cloud sql config");
|
|
@@ -7849,23 +7822,11 @@ const createKubernetesCloudsqlBaseValues = (context) => {
|
|
|
7849
7822
|
throw new Error("cannot get cloud sql config");
|
|
7850
7823
|
}
|
|
7851
7824
|
const proxyCredentials = `$${(0, context_1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials")}`;
|
|
7852
|
-
if (
|
|
7853
|
-
const instanceConnectionName = `${(_c = config.projectId) !== null && _c !== void 0 ? _c : "skynet-164509"}:${(_d = config.region) !== null && _d !== void 0 ? _d : "europe-west6"}:${(_e = config.instanceId) !== null && _e !== void 0 ? _e : context.environment.envVars.KUBE_NAMESPACE}`;
|
|
7825
|
+
if (config.type === "unmanaged") {
|
|
7854
7826
|
return {
|
|
7855
7827
|
cloudsql: {
|
|
7856
7828
|
enabled: config.enabled,
|
|
7857
|
-
dbUser: "postgres",
|
|
7858
|
-
instanceConnectionName,
|
|
7859
|
-
proxyCredentials,
|
|
7860
|
-
fullDbName: (_f = context.environment.envVars.KUBE_APP_NAME) !== null && _f !== void 0 ? _f : "",
|
|
7861
|
-
},
|
|
7862
|
-
};
|
|
7863
|
-
}
|
|
7864
|
-
else if (config.type === "unmanaged") {
|
|
7865
|
-
return {
|
|
7866
|
-
cloudsql: {
|
|
7867
|
-
enabled: config.enabled,
|
|
7868
|
-
dbUser: (_g = config.dbUser) !== null && _g !== void 0 ? _g : "postgres",
|
|
7829
|
+
dbUser: (_c = config.dbUser) !== null && _c !== void 0 ? _c : "postgres",
|
|
7869
7830
|
instanceConnectionName: config.instanceConnectionName,
|
|
7870
7831
|
proxyCredentials,
|
|
7871
7832
|
fullDbName: (0, utils_1.getFullDbName)(config, context.fullConfig, context.environment.slugPrefix, context.name),
|
|
@@ -7927,8 +7888,6 @@ const createKubernetesDeployJobs = (context) => {
|
|
|
7927
7888
|
...((_c = deployConfig.additionalHelmArgs) !== null && _c !== void 0 ? _c : []),
|
|
7928
7889
|
].join(" "),
|
|
7929
7890
|
COMPONENT_NAME: context.name,
|
|
7930
|
-
/** @deprecated */
|
|
7931
|
-
BUILD_ID: context.environment.envVars.BUILD_INFO_BUILD_ID,
|
|
7932
7891
|
},
|
|
7933
7892
|
};
|
|
7934
7893
|
const clusterName = `kube-${context.environment.fullName}`;
|
|
@@ -8012,7 +7971,7 @@ exports.KUBERNETES_DEPLOY_TYPE = {
|
|
|
8012
7971
|
const domainCanonical = (deployConfigRaw && ((_a = deployConfigRaw.cluster) === null || _a === void 0 ? void 0 : _a.domainCanonical)) || // for convenience, we allow clusters to define a canonical domain, because a cluster has a fixed ip and you will usually have a domain pointing to that cluster
|
|
8013
7972
|
fullConfig.domainCanonical ||
|
|
8014
7973
|
"panter.cloud";
|
|
8015
|
-
const
|
|
7974
|
+
const HOSTNAME_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
|
|
8016
7975
|
componentSlug,
|
|
8017
7976
|
...(envType === "review" && reviewSlug ? [reviewSlug] : []),
|
|
8018
7977
|
env,
|
|
@@ -8024,7 +7983,7 @@ exports.KUBERNETES_DEPLOY_TYPE = {
|
|
|
8024
7983
|
KUBE_NAMESPACE,
|
|
8025
7984
|
KUBE_APP_NAME,
|
|
8026
7985
|
KUBE_APP_NAME_PREFIX,
|
|
8027
|
-
|
|
7986
|
+
HOSTNAME_INTERNAL,
|
|
8028
7987
|
};
|
|
8029
7988
|
},
|
|
8030
7989
|
};
|
|
@@ -8097,7 +8056,6 @@ const types_1 = __nccwpck_require__(75781);
|
|
|
8097
8056
|
const cloudSql_1 = __nccwpck_require__(45129);
|
|
8098
8057
|
const kubeEnv_1 = __nccwpck_require__(66769);
|
|
8099
8058
|
const mongodb_1 = __nccwpck_require__(24139);
|
|
8100
|
-
const processSecretsAsFiles_1 = __nccwpck_require__(6089);
|
|
8101
8059
|
const createAppConfig = (context, application) => {
|
|
8102
8060
|
if (application === false) {
|
|
8103
8061
|
return {
|
|
@@ -8154,11 +8112,11 @@ const createKubeValues = (context) => {
|
|
|
8154
8112
|
: {}, ((_c = (_b = deployConfig.values) === null || _b === void 0 ? void 0 : _b.mongodb) === null || _c === void 0 ? void 0 : _c.enabled)
|
|
8155
8113
|
? (0, mongodb_1.createMongodbBaseConfig)(context)
|
|
8156
8114
|
: {});
|
|
8157
|
-
const kubeValues = (0,
|
|
8115
|
+
const kubeValues = (0, utils_1.mergeWithMergingArrays)(defaultKubeValues, {
|
|
8158
8116
|
jobs: removeFalsy(jobs),
|
|
8159
8117
|
cronjobs: removeFalsy(cronjobs),
|
|
8160
8118
|
...rest,
|
|
8161
|
-
})
|
|
8119
|
+
});
|
|
8162
8120
|
return kubeValues;
|
|
8163
8121
|
};
|
|
8164
8122
|
exports.createKubeValues = createKubeValues;
|
|
@@ -8277,40 +8235,6 @@ exports.createMongodbBaseConfig = createMongodbBaseConfig;
|
|
|
8277
8235
|
|
|
8278
8236
|
/***/ }),
|
|
8279
8237
|
|
|
8280
|
-
/***/ 6089:
|
|
8281
|
-
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8282
|
-
|
|
8283
|
-
"use strict";
|
|
8284
|
-
|
|
8285
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8286
|
-
exports.processSecretsAsFiles = void 0;
|
|
8287
|
-
const lodash_1 = __nccwpck_require__(23255);
|
|
8288
|
-
const processSecretsAsFiles = (values) => {
|
|
8289
|
-
if (!values.secretsAsFile || values.secretsAsFile.length === 0) {
|
|
8290
|
-
return values;
|
|
8291
|
-
}
|
|
8292
|
-
// the initial idea was that we "shadow" secrets that we mount as files,
|
|
8293
|
-
// but there is a weird kubernetes issue with that (https://github.com/kubernetes/kubernetes/issues/46861),
|
|
8294
|
-
// so instead we rename the secrets and append _content, so that inside kuberentes, we can use the original name to contain the path and name+_content as the actual content
|
|
8295
|
-
return {
|
|
8296
|
-
...values,
|
|
8297
|
-
env: {
|
|
8298
|
-
...values.env,
|
|
8299
|
-
secret: {
|
|
8300
|
-
...(0, lodash_1.omit)(values.env.secret, values.secretsAsFile),
|
|
8301
|
-
...Object.fromEntries(values.secretsAsFile.map((key) => [
|
|
8302
|
-
key + "_content",
|
|
8303
|
-
values.env.secret[key],
|
|
8304
|
-
])),
|
|
8305
|
-
},
|
|
8306
|
-
},
|
|
8307
|
-
};
|
|
8308
|
-
};
|
|
8309
|
-
exports.processSecretsAsFiles = processSecretsAsFiles;
|
|
8310
|
-
//# sourceMappingURL=processSecretsAsFiles.js.map
|
|
8311
|
-
|
|
8312
|
-
/***/ }),
|
|
8313
|
-
|
|
8314
8238
|
/***/ 44986:
|
|
8315
8239
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8316
8240
|
|
|
@@ -8887,7 +8811,7 @@ const getFullReferencedJobNameFromWorkspace = (referencedJobName, workspaceName,
|
|
|
8887
8811
|
const getJobName = (need) => (0, lodash_1.isObject)(need) ? need.job : need;
|
|
8888
8812
|
const makeGitlabJob = (context, job, allJobs, baseRules) => {
|
|
8889
8813
|
var _a, _b;
|
|
8890
|
-
const { environment, envMode, needsStages,
|
|
8814
|
+
const { environment, envMode, needsStages, name, needs, jobTags, script, variables, runnerVariables, when, ...rest } = job;
|
|
8891
8815
|
const stage = envMode === "stagePerEnv" ? `${job.stage} ${context.env}` : job.stage;
|
|
8892
8816
|
const deduplicatedGitlabNeeds = getGitlabNeeds(context, job, allJobs);
|
|
8893
8817
|
const fullJobName = getFullJobName({
|
|
@@ -9011,7 +8935,7 @@ function deduplicateNeeds(needs) {
|
|
|
9011
8935
|
? [...new Map(needs.map((n) => [(0, lodash_1.isObject)(n) ? n.job : n, n])).values()]
|
|
9012
8936
|
: undefined;
|
|
9013
8937
|
}
|
|
9014
|
-
function getGitlabNeedsForComponentJob(context, { needsStages, needs
|
|
8938
|
+
function getGitlabNeedsForComponentJob(context, { needsStages, needs }, allJobs) {
|
|
9015
8939
|
const needsFromStages = needsStages === null || needsStages === void 0 ? void 0 : needsStages.flatMap((n) => {
|
|
9016
8940
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
9017
8941
|
const componentName = context.name;
|
|
@@ -9045,8 +8969,6 @@ function getGitlabNeedsForComponentJob(context, { needsStages, needs, needsOther
|
|
|
9045
8969
|
const cleanedNeeds = [
|
|
9046
8970
|
...(needsFromStages !== null && needsFromStages !== void 0 ? needsFromStages : []),
|
|
9047
8971
|
...(needs !== null && needs !== void 0 ? needs : []),
|
|
9048
|
-
// pull in legacy needs from other component, which is now identical to needs
|
|
9049
|
-
...(needsOtherComponent !== null && needsOtherComponent !== void 0 ? needsOtherComponent : []),
|
|
9050
8972
|
];
|
|
9051
8973
|
return cleanedNeeds === null || cleanedNeeds === void 0 ? void 0 : cleanedNeeds.map((n) => {
|
|
9052
8974
|
var _a;
|
|
@@ -11,7 +11,7 @@ const constants_1 = require("./constants");
|
|
|
11
11
|
const writeBuildInfo_1 = require("./writeBuildInfo");
|
|
12
12
|
const writeDotEnv_1 = require("./writeDotEnv");
|
|
13
13
|
const createAppBuildJob = (context, { script, variables, runnerVariables, cache, ...def }) => {
|
|
14
|
-
var _a
|
|
14
|
+
var _a;
|
|
15
15
|
return (0, lodash_1.merge)({
|
|
16
16
|
name: constants_1.APP_BUILD_JOB_NAME,
|
|
17
17
|
envMode: "jobPerEnv",
|
|
@@ -25,14 +25,13 @@ const createAppBuildJob = (context, { script, variables, runnerVariables, cache,
|
|
|
25
25
|
? {
|
|
26
26
|
...context.environment.envVars,
|
|
27
27
|
...context.environment.jobOnlyVars.build.envVars,
|
|
28
|
-
...((_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
29
28
|
}
|
|
30
29
|
: {}),
|
|
31
30
|
},
|
|
32
31
|
runnerVariables: {
|
|
33
32
|
...constants_1.RUNNER_BUILD_RESOURCE_VARIABLES,
|
|
34
33
|
...(runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}),
|
|
35
|
-
...((
|
|
34
|
+
...((_a = context.build.config.runnerVariables) !== null && _a !== void 0 ? _a : {}),
|
|
36
35
|
},
|
|
37
36
|
script: [
|
|
38
37
|
...(context.type === "component"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAM/B,6BAAuC;AAGvC,uCAA0C;AAC1C,gFAA8E;AAC9E,4DAAyE;AACzE,uCAAiD;AACjD,2CAGqB;AACrB,qDAAkD;AAClD,+CAGuB;AAGhB,MAAM,iBAAiB,GAAG,CAC/B,OAAoE,EACpE,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,GAAG,EAAyB,EAC9D,EAAE;;IAChB,OAAO,IAAA,cAAK,EACV;QACE,IAAI,EAAE,8BAAkB;QACxB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAA,kBAAc,EAAC,cAAc,CAAC;QACrC,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAA,+CAA8B,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;QACzE,SAAS,EAAE;YACT,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;YACpB,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAC9B,CAAC,CAAC;oBACE,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO;oBAC9B,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;AAAA,mCAA+B;AAM/B,6BAAuC;AAGvC,uCAA0C;AAC1C,gFAA8E;AAC9E,4DAAyE;AACzE,uCAAiD;AACjD,2CAGqB;AACrB,qDAAkD;AAClD,+CAGuB;AAGhB,MAAM,iBAAiB,GAAG,CAC/B,OAAoE,EACpE,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,GAAG,GAAG,EAAyB,EAC9D,EAAE;;IAChB,OAAO,IAAA,cAAK,EACV;QACE,IAAI,EAAE,8BAAkB;QACxB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAA,kBAAc,EAAC,cAAc,CAAC;QACrC,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,IAAA,+CAA8B,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;QACzE,SAAS,EAAE;YACT,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;YACpB,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAC9B,CAAC,CAAC;oBACE,GAAG,OAAO,CAAC,WAAW,CAAC,OAAO;oBAC9B,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO;iBACjD;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;QACD,eAAe,EAAE;YACf,GAAG,2CAA+B;YAClC,GAAG,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC;YAC1B,GAAG,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,mCAAI,EAAE,CAAC;SAChD;QAED,MAAM,EAAE;YACN,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;gBAC9B,CAAC,CAAC,IAAA,kDAAoC,EAAC,OAAO,CAAC;oBAC7C,CAAC,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC;oBACtB,CAAC,CAAC,EAAE;gBACN,CAAC,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW;oBAC5B,CAAC,CAAC,OAAO,CAAC,UAAU;yBACf,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,kDAAoC,EAAC,CAAC,CAAC,CAAC;yBACtD,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,yBAAW,EAAC,CAAC,CAAC,CAAC;oBACnC,CAAC,CAAC,EAAE,CAAC;YACT,GAAG,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,IAAA,+BAAc,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAChE,GAAG,IAAA,wBAAiB,EAAC,OAAO,CAAC,EAAE,wEAAwE;YACvG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE;YACzB,GAAG,IAAA,mBAAW,EAAC,MAAM,CAAC;SACvB;QACD,SAAS,EAAE,IAAA,gDAAuB,EAAC,OAAO,CAAC;KAC5C,EACD,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AA9CW,QAAA,iBAAiB,qBA8C5B"}
|
|
@@ -11,7 +11,7 @@ const RUNNER_CUSTOM_TEST_VARIABLES = {
|
|
|
11
11
|
KUBERNETES_MEMORY_LIMIT: "4Gi",
|
|
12
12
|
};
|
|
13
13
|
const createCustomTestJobs = (context) => {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
15
15
|
// don't run tests after release
|
|
16
16
|
// TODO: this will be replaced by using rules
|
|
17
17
|
if (context.trigger === "taggedRelease") {
|
|
@@ -25,7 +25,6 @@ const createCustomTestJobs = (context) => {
|
|
|
25
25
|
variables: {
|
|
26
26
|
APP_PATH: context.build.dir,
|
|
27
27
|
...context.environment.jobOnlyVars.build.envVars,
|
|
28
|
-
...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
29
28
|
},
|
|
30
29
|
runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
|
|
31
30
|
services: buildConfig.jobServices,
|
|
@@ -38,29 +37,29 @@ const createCustomTestJobs = (context) => {
|
|
|
38
37
|
? {
|
|
39
38
|
name: "๐ก audit",
|
|
40
39
|
...base,
|
|
41
|
-
image: (
|
|
40
|
+
image: (_b = (_a = buildConfig.audit) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : buildConfig.jobImage,
|
|
42
41
|
cache: undefined,
|
|
43
|
-
script: [...(0, utils_1.ensureArray)((
|
|
42
|
+
script: [...(0, utils_1.ensureArray)((_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.command)],
|
|
44
43
|
allow_failure: true,
|
|
45
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
44
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.artifactsReports, (_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.artifacts),
|
|
46
45
|
}
|
|
47
46
|
: null;
|
|
48
47
|
const lintJob = buildConfig.lint
|
|
49
48
|
? {
|
|
50
49
|
name: "๐ฎ lint",
|
|
51
50
|
...base,
|
|
52
|
-
image: (
|
|
53
|
-
script: [...(0, utils_1.ensureArray)((
|
|
54
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
51
|
+
image: (_g = (_f = buildConfig.lint) === null || _f === void 0 ? void 0 : _f.jobImage) !== null && _g !== void 0 ? _g : buildConfig.jobImage,
|
|
52
|
+
script: [...(0, utils_1.ensureArray)((_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.command)],
|
|
53
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.artifactsReports, (_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.artifacts),
|
|
55
54
|
}
|
|
56
55
|
: null;
|
|
57
56
|
const testJob = buildConfig.test
|
|
58
57
|
? {
|
|
59
58
|
name: "๐งช test",
|
|
60
59
|
...base,
|
|
61
|
-
image: (
|
|
62
|
-
script: [...(0, utils_1.ensureArray)((
|
|
63
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
60
|
+
image: (_m = (_l = buildConfig.test) === null || _l === void 0 ? void 0 : _l.jobImage) !== null && _m !== void 0 ? _m : buildConfig.jobImage,
|
|
61
|
+
script: [...(0, utils_1.ensureArray)((_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.command)],
|
|
62
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.artifactsReports, (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.artifacts),
|
|
64
63
|
}
|
|
65
64
|
: null;
|
|
66
65
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/custom/testJob.ts"],"names":[],"mappings":";;;AAGA,uCAAkD;AAClD,yEAAsE;AACtE,4DAAmE;AACnE,oCAAyC;AAEzC,MAAM,4BAA4B,GAAG;IACnC,sBAAsB,EAAE,MAAM;IAC9B,yBAAyB,EAAE,KAAK;IAChC,uBAAuB,EAAE,KAAK;CAC/B,CAAC;AAEK,MAAM,oBAAoB,GAAG,CAClC,OAAyB,EACT,EAAE;;IAClB,gCAAgC;IAChC,6CAA6C;IAC7C,IAAI,OAAO,CAAC,OAAO,KAAK,eAAe,EAAE,CAAC;QACxC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;IAEzC,IAAI,CAAC,IAAA,qBAAa,EAAC,WAAW,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,IAAI,GAA0C;QAClD,SAAS,EAAE;YACT,QAAQ,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG;YAC3B,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO;
|
|
1
|
+
{"version":3,"file":"testJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/custom/testJob.ts"],"names":[],"mappings":"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"}
|