@catladder/cli 0.0.0-next-9a3feef4 โ 0.0.0-next-e2e4f00a
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 +131 -53
- package/dist/bundles/cli/index.js +131 -53
- package/dist/pipeline/src/build/base/createAppBuildJob.js +3 -2
- package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
- package/dist/pipeline/src/build/custom/testJob.js +11 -10
- package/dist/pipeline/src/build/custom/testJob.js.map +1 -1
- package/dist/pipeline/src/build/node/testJob.js +11 -10
- package/dist/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/pipeline/src/build/rails/build.js +1 -0
- package/dist/pipeline/src/build/rails/build.js.map +1 -1
- package/dist/pipeline/src/build/rails/test.js +8 -7
- package/dist/pipeline/src/build/rails/test.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +10 -0
- package/dist/pipeline/src/build/types.js.map +1 -1
- package/dist/pipeline/src/context/createComponentContext.js +1 -0
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironment.js +1 -0
- package/dist/pipeline/src/context/getEnvironment.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +5 -2
- package/dist/pipeline/src/context/getEnvironmentVariables.js +19 -9
- package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
- package/dist/pipeline/src/context/resolveReferences.d.ts +3 -0
- package/dist/pipeline/src/context/resolveReferences.js +10 -1
- package/dist/pipeline/src/context/resolveReferences.js.map +1 -1
- package/dist/pipeline/src/deploy/base/deploy.js +4 -3
- 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 +15 -3
- package/dist/pipeline/src/deploy/kubernetes/cloudSql/index.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/deployJob.js +2 -0
- 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 +2 -1
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js +3 -2
- package/dist/pipeline/src/deploy/kubernetes/kubeValues.js.map +1 -1
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.d.ts +85 -0
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.js +27 -0
- package/dist/pipeline/src/deploy/kubernetes/processSecretsAsFiles.js.map +1 -0
- package/dist/pipeline/src/deploy/types/base.d.ts +6 -0
- package/dist/pipeline/src/deploy/types/kubernetes.d.ts +34 -1
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js +4 -2
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.js.map +1 -1
- package/dist/pipeline/src/types/config.d.ts +8 -0
- package/dist/pipeline/src/types/context.d.ts +8 -0
- package/dist/pipeline/src/types/context.js.map +1 -1
- package/dist/pipeline/src/types/jobs.d.ts +8 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -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, _b;
|
|
4235
4235
|
return (0, lodash_1.merge)({
|
|
4236
4236
|
name: constants_1.APP_BUILD_JOB_NAME,
|
|
4237
4237
|
envMode: "jobPerEnv",
|
|
@@ -4245,13 +4245,14 @@ 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 : {}),
|
|
4248
4249
|
}
|
|
4249
4250
|
: {}),
|
|
4250
4251
|
},
|
|
4251
4252
|
runnerVariables: {
|
|
4252
4253
|
...constants_1.RUNNER_BUILD_RESOURCE_VARIABLES,
|
|
4253
4254
|
...(runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}),
|
|
4254
|
-
...((
|
|
4255
|
+
...((_b = context.build.config.runnerVariables) !== null && _b !== void 0 ? _b : {}),
|
|
4255
4256
|
},
|
|
4256
4257
|
script: [
|
|
4257
4258
|
...(context.type === "component"
|
|
@@ -4651,7 +4652,7 @@ const RUNNER_CUSTOM_TEST_VARIABLES = {
|
|
|
4651
4652
|
KUBERNETES_MEMORY_LIMIT: "4Gi",
|
|
4652
4653
|
};
|
|
4653
4654
|
const createCustomTestJobs = (context) => {
|
|
4654
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
4655
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
4655
4656
|
// don't run tests after release
|
|
4656
4657
|
// TODO: this will be replaced by using rules
|
|
4657
4658
|
if (context.trigger === "taggedRelease") {
|
|
@@ -4665,6 +4666,7 @@ const createCustomTestJobs = (context) => {
|
|
|
4665
4666
|
variables: {
|
|
4666
4667
|
APP_PATH: context.build.dir,
|
|
4667
4668
|
...context.environment.jobOnlyVars.build.envVars,
|
|
4669
|
+
...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
4668
4670
|
},
|
|
4669
4671
|
runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
|
|
4670
4672
|
services: buildConfig.jobServices,
|
|
@@ -4677,29 +4679,29 @@ const createCustomTestJobs = (context) => {
|
|
|
4677
4679
|
? {
|
|
4678
4680
|
name: "๐ก audit",
|
|
4679
4681
|
...base,
|
|
4680
|
-
image: (
|
|
4682
|
+
image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage,
|
|
4681
4683
|
cache: undefined,
|
|
4682
|
-
script: [...(0, utils_1.ensureArray)((
|
|
4684
|
+
script: [...(0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)],
|
|
4683
4685
|
allow_failure: true,
|
|
4684
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
4686
|
+
...(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),
|
|
4685
4687
|
}
|
|
4686
4688
|
: null;
|
|
4687
4689
|
const lintJob = buildConfig.lint
|
|
4688
4690
|
? {
|
|
4689
4691
|
name: "๐ฎ lint",
|
|
4690
4692
|
...base,
|
|
4691
|
-
image: (
|
|
4692
|
-
script: [...(0, utils_1.ensureArray)((
|
|
4693
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
4693
|
+
image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : buildConfig.jobImage,
|
|
4694
|
+
script: [...(0, utils_1.ensureArray)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)],
|
|
4695
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.artifactsReports, (_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.artifacts),
|
|
4694
4696
|
}
|
|
4695
4697
|
: null;
|
|
4696
4698
|
const testJob = buildConfig.test
|
|
4697
4699
|
? {
|
|
4698
4700
|
name: "๐งช test",
|
|
4699
4701
|
...base,
|
|
4700
|
-
image: (
|
|
4701
|
-
script: [...(0, utils_1.ensureArray)((
|
|
4702
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
4702
|
+
image: (_o = (_m = buildConfig.test) === null || _m === void 0 ? void 0 : _m.jobImage) !== null && _o !== void 0 ? _o : buildConfig.jobImage,
|
|
4703
|
+
script: [...(0, utils_1.ensureArray)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)],
|
|
4704
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.artifactsReports, (_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.artifacts),
|
|
4703
4705
|
}
|
|
4704
4706
|
: null;
|
|
4705
4707
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -5238,7 +5240,7 @@ const constants_1 = __nccwpck_require__(31765);
|
|
|
5238
5240
|
const yarn_1 = __nccwpck_require__(45043);
|
|
5239
5241
|
const createJobCache_1 = __nccwpck_require__(10340);
|
|
5240
5242
|
const createNodeTestJobs = (context) => {
|
|
5241
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
5243
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
5242
5244
|
// don't run tests after release
|
|
5243
5245
|
// TODO: this will be replaced by using rules
|
|
5244
5246
|
if (context.trigger === "taggedRelease") {
|
|
@@ -5256,6 +5258,7 @@ const createNodeTestJobs = (context) => {
|
|
|
5256
5258
|
...(context.type === "component"
|
|
5257
5259
|
? {
|
|
5258
5260
|
...context.environment.jobOnlyVars.build.envVars,
|
|
5261
|
+
...((_a = context.build.config.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
5259
5262
|
}
|
|
5260
5263
|
: {}),
|
|
5261
5264
|
},
|
|
@@ -5270,48 +5273,48 @@ const createNodeTestJobs = (context) => {
|
|
|
5270
5273
|
? {
|
|
5271
5274
|
name: "๐ก audit",
|
|
5272
5275
|
...base,
|
|
5273
|
-
image: (
|
|
5276
|
+
image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage,
|
|
5274
5277
|
cache: undefined, // audit does not need yarn install and no cache
|
|
5275
5278
|
script: [
|
|
5276
5279
|
`cd ${context.build.dir}`,
|
|
5277
|
-
...((
|
|
5280
|
+
...((_e = (0, utils_1.ensureArrayOrNull)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
|
|
5278
5281
|
context.packageManagerInfo.isClassic
|
|
5279
5282
|
? "yarn audit"
|
|
5280
5283
|
: "yarn npm audit --environment production", // yarn 2
|
|
5281
5284
|
]),
|
|
5282
5285
|
],
|
|
5283
5286
|
allow_failure: true,
|
|
5284
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
5287
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifactsReports, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifacts),
|
|
5285
5288
|
}
|
|
5286
5289
|
: null;
|
|
5287
5290
|
const lintJob = buildConfig.lint !== false
|
|
5288
5291
|
? {
|
|
5289
5292
|
name: "๐ฎ lint",
|
|
5290
5293
|
...base,
|
|
5291
|
-
image: (
|
|
5294
|
+
image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage,
|
|
5292
5295
|
cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
|
|
5293
5296
|
script: [
|
|
5294
5297
|
...(0, yarn_1.ensureNodeVersion)(context),
|
|
5295
5298
|
`cd ${context.build.dir}`,
|
|
5296
5299
|
...yarnInstall,
|
|
5297
|
-
...((
|
|
5300
|
+
...((_l = (0, utils_1.ensureArrayOrNull)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"]),
|
|
5298
5301
|
],
|
|
5299
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
5302
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifactsReports, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifacts),
|
|
5300
5303
|
}
|
|
5301
5304
|
: null;
|
|
5302
5305
|
const testJob = buildConfig.test !== false
|
|
5303
5306
|
? {
|
|
5304
5307
|
name: "๐งช test",
|
|
5305
5308
|
...base,
|
|
5306
|
-
image: (
|
|
5309
|
+
image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
|
|
5307
5310
|
cache: (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, (0, cache_1.getNodeCache)(context)),
|
|
5308
5311
|
script: [
|
|
5309
5312
|
...(0, yarn_1.ensureNodeVersion)(context),
|
|
5310
5313
|
`cd ${context.build.dir}`,
|
|
5311
5314
|
...yarnInstall,
|
|
5312
|
-
...((
|
|
5315
|
+
...((_s = (0, utils_1.ensureArrayOrNull)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"]),
|
|
5313
5316
|
],
|
|
5314
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
5317
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifactsReports, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifacts),
|
|
5315
5318
|
}
|
|
5316
5319
|
: null;
|
|
5317
5320
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -5427,6 +5430,7 @@ const createRailsBuildJobs = (context) => {
|
|
|
5427
5430
|
dockerBuild: {
|
|
5428
5431
|
variables: {
|
|
5429
5432
|
...context.environment.jobOnlyVars.build.envVars,
|
|
5433
|
+
...context.build.config.extraVars,
|
|
5430
5434
|
},
|
|
5431
5435
|
// custom script
|
|
5432
5436
|
script: [
|
|
@@ -5474,7 +5478,7 @@ exports.createRailsTestJobs = void 0;
|
|
|
5474
5478
|
const __1 = __nccwpck_require__(10603);
|
|
5475
5479
|
const utils_1 = __nccwpck_require__(32497);
|
|
5476
5480
|
const createRailsTestJobs = (context) => {
|
|
5477
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
5481
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
5478
5482
|
// don't run tests after release
|
|
5479
5483
|
// TODO: this will be replaced by using rules
|
|
5480
5484
|
if (context.trigger === "taggedRelease") {
|
|
@@ -5488,6 +5492,7 @@ const createRailsTestJobs = (context) => {
|
|
|
5488
5492
|
const base = {
|
|
5489
5493
|
variables: {
|
|
5490
5494
|
...context.environment.jobOnlyVars.build.envVars,
|
|
5495
|
+
...((_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
|
|
5491
5496
|
},
|
|
5492
5497
|
stage: "test",
|
|
5493
5498
|
needs: [],
|
|
@@ -5511,10 +5516,10 @@ const createRailsTestJobs = (context) => {
|
|
|
5511
5516
|
name: "๐ก audit",
|
|
5512
5517
|
...base,
|
|
5513
5518
|
cache: undefined, // audit does not need bundle install and no cache
|
|
5514
|
-
image: (
|
|
5519
|
+
image: (_d = (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage) !== null && _d !== void 0 ? _d : defaultImage,
|
|
5515
5520
|
script: [
|
|
5516
5521
|
`cd ${context.build.dir}`,
|
|
5517
|
-
...((
|
|
5522
|
+
...((_f = (0, utils_1.ensureArrayOrNull)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : [
|
|
5518
5523
|
"gem install bundler-audit",
|
|
5519
5524
|
"bundle audit check",
|
|
5520
5525
|
]),
|
|
@@ -5527,11 +5532,11 @@ const createRailsTestJobs = (context) => {
|
|
|
5527
5532
|
name: "๐ฎ lint",
|
|
5528
5533
|
...base,
|
|
5529
5534
|
cache: bundlerCache,
|
|
5530
|
-
image: (
|
|
5535
|
+
image: (_j = (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : buildConfig.jobImage) !== null && _j !== void 0 ? _j : defaultImage,
|
|
5531
5536
|
script: [
|
|
5532
5537
|
`cd ${context.build.dir}`,
|
|
5533
5538
|
...bundlerInstall,
|
|
5534
|
-
...((
|
|
5539
|
+
...((_l = (0, utils_1.ensureArrayOrNull)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : [
|
|
5535
5540
|
"bundle exec rubocop",
|
|
5536
5541
|
]),
|
|
5537
5542
|
],
|
|
@@ -5542,11 +5547,11 @@ const createRailsTestJobs = (context) => {
|
|
|
5542
5547
|
name: "๐งช test",
|
|
5543
5548
|
...base,
|
|
5544
5549
|
cache: bundlerCache,
|
|
5545
|
-
image: (
|
|
5550
|
+
image: (_p = (_o = (_m = buildConfig.test) === null || _m === void 0 ? void 0 : _m.jobImage) !== null && _o !== void 0 ? _o : buildConfig.jobImage) !== null && _p !== void 0 ? _p : defaultImage,
|
|
5546
5551
|
script: [
|
|
5547
5552
|
`cd ${context.build.dir}`,
|
|
5548
5553
|
...bundlerInstall,
|
|
5549
|
-
...((
|
|
5554
|
+
...((_r = (0, utils_1.ensureArrayOrNull)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : [
|
|
5550
5555
|
"bundle exec rspec",
|
|
5551
5556
|
]),
|
|
5552
5557
|
],
|
|
@@ -5863,6 +5868,7 @@ const createComponentContext = async (ctx) => {
|
|
|
5863
5868
|
const context = {
|
|
5864
5869
|
type: "component",
|
|
5865
5870
|
name: ctx.componentName,
|
|
5871
|
+
componentName: ctx.componentName,
|
|
5866
5872
|
env: ctx.env,
|
|
5867
5873
|
fullConfig: ctx.config,
|
|
5868
5874
|
componentConfig,
|
|
@@ -6035,6 +6041,7 @@ const getEnvironment = async (ctx) => {
|
|
|
6035
6041
|
slugPrefix: envContext.environmentSlugPrefix,
|
|
6036
6042
|
reviewSlug: envContext.reviewSlug,
|
|
6037
6043
|
slug: envContext.environmentSlug,
|
|
6044
|
+
shortName: env,
|
|
6038
6045
|
...variables,
|
|
6039
6046
|
};
|
|
6040
6047
|
};
|
|
@@ -6094,6 +6101,7 @@ exports.getEnvironmentContext = getEnvironmentContext;
|
|
|
6094
6101
|
|
|
6095
6102
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6096
6103
|
exports.getSecretVarNameForContext = exports.getSecretVarName = exports.getEnvironmentVariables = void 0;
|
|
6104
|
+
const lodash_1 = __nccwpck_require__(23255);
|
|
6097
6105
|
const deploy_1 = __nccwpck_require__(68483);
|
|
6098
6106
|
const BashExpression_1 = __nccwpck_require__(42376);
|
|
6099
6107
|
const types_1 = __nccwpck_require__(84466);
|
|
@@ -6111,7 +6119,7 @@ const getBasePredefinedVariables = (ctx) => {
|
|
|
6111
6119
|
};
|
|
6112
6120
|
};
|
|
6113
6121
|
const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
6114
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
6122
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
6115
6123
|
const environmentContext = (0, getEnvironmentContext_1.getEnvironmentContext)(ctx);
|
|
6116
6124
|
const { config, env, componentName } = ctx;
|
|
6117
6125
|
const { envConfigRaw, deployConfigRaw, buildConfigRaw, envType } = environmentContext;
|
|
@@ -6128,8 +6136,12 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6128
6136
|
...basePredefinedVariables,
|
|
6129
6137
|
ENV_SHORT: "local",
|
|
6130
6138
|
ROOT_URL: url,
|
|
6131
|
-
|
|
6132
|
-
|
|
6139
|
+
// Rails before 6.1 (mis)uses the `HOST` environment variable to specify the IP to bind to
|
|
6140
|
+
...((0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
|
|
6141
|
+
buildConfigRaw.type === "rails"
|
|
6142
|
+
? {}
|
|
6143
|
+
: { HOST: host }),
|
|
6144
|
+
HOST_INTERNAL: host,
|
|
6133
6145
|
ROOT_URL_INTERNAL: "http://" + host,
|
|
6134
6146
|
PORT: port.toString(),
|
|
6135
6147
|
};
|
|
@@ -6138,8 +6150,8 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6138
6150
|
const additionalEnvVars = deployConfigRaw
|
|
6139
6151
|
? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].getAdditionalEnvVars(environmentContext)
|
|
6140
6152
|
: {};
|
|
6141
|
-
const
|
|
6142
|
-
host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c :
|
|
6153
|
+
const HOST_INTERNAL = (_b = additionalEnvVars.HOST_INTERNAL) !== null && _b !== void 0 ? _b : "unknown-host.example.com";
|
|
6154
|
+
host = (_c = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _c !== void 0 ? _c : HOST_INTERNAL;
|
|
6143
6155
|
url = (0, BashExpression_1.joinBashExpressions)(["https://", host]);
|
|
6144
6156
|
predefinedVariables = {
|
|
6145
6157
|
...basePredefinedVariables,
|
|
@@ -6147,10 +6159,12 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6147
6159
|
...((0, types_1.isStandaloneBuildConfig)(buildConfigRaw) &&
|
|
6148
6160
|
buildConfigRaw.type === "rails"
|
|
6149
6161
|
? {}
|
|
6150
|
-
: {
|
|
6162
|
+
: { HOST: host }),
|
|
6151
6163
|
ROOT_URL: url,
|
|
6152
|
-
|
|
6153
|
-
|
|
6164
|
+
HOST_INTERNAL,
|
|
6165
|
+
/**@deprecated */
|
|
6166
|
+
HOST_CANONICAL: HOST_INTERNAL, // legacy alias for HOST_INTERNAL
|
|
6167
|
+
ROOT_URL_INTERNAL: (0, BashExpression_1.joinBashExpressions)(["https://", HOST_INTERNAL]),
|
|
6154
6168
|
...additionalEnvVars,
|
|
6155
6169
|
};
|
|
6156
6170
|
}
|
|
@@ -6163,7 +6177,10 @@ const getEnvironmentVariables = async (ctx, alreadyVisited = {}) => {
|
|
|
6163
6177
|
...additionalSecretKeys,
|
|
6164
6178
|
];
|
|
6165
6179
|
const secretEnvVars = (0, envVars_1.makeSecretEnvVarMapping)(env, componentName, secretEnvVarKeys);
|
|
6166
|
-
|
|
6180
|
+
// this is deprecated, we now support: $componentname:FOO
|
|
6181
|
+
const legacyFromComponents = (_j = (_h = envConfigRaw.vars) === null || _h === void 0 ? void 0 : _h.fromComponents) !== null && _j !== void 0 ? _j : {};
|
|
6182
|
+
const publicEnvVarsRawWithLegacyFromComponents = (0, lodash_1.merge)({}, (0, resolveReferences_1.translateLegacyFromComponents)(legacyFromComponents), publicEnvVarsRaw);
|
|
6183
|
+
const publicEnvVarsRawSanitized = (0, envVars_1.stringifyValues)(publicEnvVarsRawWithLegacyFromComponents);
|
|
6167
6184
|
const envVarsRaw = addIndexVar({
|
|
6168
6185
|
...predefinedVariables,
|
|
6169
6186
|
...secretEnvVars,
|
|
@@ -6302,7 +6319,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6302
6319
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6303
6320
|
};
|
|
6304
6321
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6305
|
-
exports.resolveReferences = void 0;
|
|
6322
|
+
exports.translateLegacyFromComponents = exports.resolveReferences = void 0;
|
|
6306
6323
|
const lodash_1 = __nccwpck_require__(23255);
|
|
6307
6324
|
const replaceAsync_1 = __importDefault(__nccwpck_require__(72233));
|
|
6308
6325
|
// regex to resolve references in catladder variables
|
|
@@ -6352,6 +6369,15 @@ const resolveReferences = async (vars, getOtherVariables, alreadyVisitedBase = {
|
|
|
6352
6369
|
})));
|
|
6353
6370
|
};
|
|
6354
6371
|
exports.resolveReferences = resolveReferences;
|
|
6372
|
+
const translateLegacyFromComponents = (fromComponents) => {
|
|
6373
|
+
return Object.fromEntries(Object.entries(fromComponents).flatMap(([componentName, variables]) => {
|
|
6374
|
+
return Object.entries(variables).map(([ourName, otherName]) => [
|
|
6375
|
+
ourName,
|
|
6376
|
+
"${" + componentName + ":" + otherName + "}",
|
|
6377
|
+
]);
|
|
6378
|
+
}));
|
|
6379
|
+
};
|
|
6380
|
+
exports.translateLegacyFromComponents = translateLegacyFromComponents;
|
|
6355
6381
|
//# sourceMappingURL=resolveReferences.js.map
|
|
6356
6382
|
|
|
6357
6383
|
/***/ }),
|
|
@@ -6457,7 +6483,7 @@ const stop_1 = __nccwpck_require__(82846);
|
|
|
6457
6483
|
const variables_1 = __nccwpck_require__(82422);
|
|
6458
6484
|
exports.DEPLOY_JOB_NAME = "๐ Deploy";
|
|
6459
6485
|
const createDeployJob = (context, jobDefinition) => {
|
|
6460
|
-
var _a, _b, _c, _d, _e, _f;
|
|
6486
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6461
6487
|
const hasDocker = (0, docker_1.requiresDockerBuild)(context);
|
|
6462
6488
|
const isStoppable = (0, utils_1.contextIsStoppable)(context);
|
|
6463
6489
|
const autoStop = context.environment.envType === "review"
|
|
@@ -6536,12 +6562,13 @@ const createDeployJob = (context, jobDefinition) => {
|
|
|
6536
6562
|
...context.environment.envVars,
|
|
6537
6563
|
...(hasDocker ? (0, docker_1.getDockerImageVariables)(context) : {}),
|
|
6538
6564
|
...context.environment.jobOnlyVars.deploy.envVars,
|
|
6565
|
+
...(deployConfig ? (_e = deployConfig.extraVars) !== null && _e !== void 0 ? _e : {} : {}),
|
|
6539
6566
|
...jobDefinition.variables,
|
|
6540
6567
|
},
|
|
6541
6568
|
runnerVariables: {
|
|
6542
6569
|
...variables_1.DEPLOY_RUNNER_VARIABLES,
|
|
6543
|
-
...((
|
|
6544
|
-
...(deployConfig ? (
|
|
6570
|
+
...((_f = jobDefinition.runnerVariables) !== null && _f !== void 0 ? _f : {}),
|
|
6571
|
+
...(deployConfig ? (_g = deployConfig.runnerVariables) !== null && _g !== void 0 ? _g : {} : {}),
|
|
6545
6572
|
},
|
|
6546
6573
|
environment: isStoppable
|
|
6547
6574
|
? {
|
|
@@ -7390,7 +7417,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
7390
7417
|
],
|
|
7391
7418
|
getAdditionalEnvVars: (ctx) => {
|
|
7392
7419
|
const { fullName, env, componentName, deployConfigRaw } = ctx;
|
|
7393
|
-
const
|
|
7420
|
+
const HOST_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
|
|
7394
7421
|
fullName,
|
|
7395
7422
|
(0, BashExpression_1.getBashVariable)((0, context_1.getSecretVarName)(env, componentName, exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX)),
|
|
7396
7423
|
], "-").toLowerCase();
|
|
@@ -7401,7 +7428,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
7401
7428
|
]))
|
|
7402
7429
|
: {};
|
|
7403
7430
|
return {
|
|
7404
|
-
|
|
7431
|
+
HOST_INTERNAL,
|
|
7405
7432
|
...getCloudSqlVariables(ctx),
|
|
7406
7433
|
...jobTriggers,
|
|
7407
7434
|
DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw
|
|
@@ -7813,7 +7840,7 @@ const hasKubernetesCloudSQL = (context) => {
|
|
|
7813
7840
|
};
|
|
7814
7841
|
exports.hasKubernetesCloudSQL = hasKubernetesCloudSQL;
|
|
7815
7842
|
const createKubernetesCloudsqlBaseValues = (context) => {
|
|
7816
|
-
var _a, _b, _c;
|
|
7843
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
7817
7844
|
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
7818
7845
|
if (!(0, types_1.isOfDeployType)(deployConfig, "kubernetes")) {
|
|
7819
7846
|
throw new Error("cannot get cloud sql config");
|
|
@@ -7823,11 +7850,23 @@ const createKubernetesCloudsqlBaseValues = (context) => {
|
|
|
7823
7850
|
throw new Error("cannot get cloud sql config");
|
|
7824
7851
|
}
|
|
7825
7852
|
const proxyCredentials = `$${(0, context_1.getSecretVarNameForContext)(context, "cloudsqlProxyCredentials")}`;
|
|
7826
|
-
if (config.type
|
|
7853
|
+
if ((config === null || config === void 0 ? void 0 : config.type) !== "unmanaged") {
|
|
7854
|
+
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}`;
|
|
7827
7855
|
return {
|
|
7828
7856
|
cloudsql: {
|
|
7829
7857
|
enabled: config.enabled,
|
|
7830
|
-
dbUser:
|
|
7858
|
+
dbUser: "postgres",
|
|
7859
|
+
instanceConnectionName,
|
|
7860
|
+
proxyCredentials,
|
|
7861
|
+
fullDbName: (_f = context.environment.envVars.KUBE_APP_NAME) !== null && _f !== void 0 ? _f : "",
|
|
7862
|
+
},
|
|
7863
|
+
};
|
|
7864
|
+
}
|
|
7865
|
+
else if (config.type === "unmanaged") {
|
|
7866
|
+
return {
|
|
7867
|
+
cloudsql: {
|
|
7868
|
+
enabled: config.enabled,
|
|
7869
|
+
dbUser: (_g = config.dbUser) !== null && _g !== void 0 ? _g : "postgres",
|
|
7831
7870
|
instanceConnectionName: config.instanceConnectionName,
|
|
7832
7871
|
proxyCredentials,
|
|
7833
7872
|
fullDbName: (0, utils_1.getFullDbName)(config, context.fullConfig, context.environment.slugPrefix, context.name),
|
|
@@ -7889,6 +7928,8 @@ const createKubernetesDeployJobs = (context) => {
|
|
|
7889
7928
|
...((_c = deployConfig.additionalHelmArgs) !== null && _c !== void 0 ? _c : []),
|
|
7890
7929
|
].join(" "),
|
|
7891
7930
|
COMPONENT_NAME: context.name,
|
|
7931
|
+
/** @deprecated */
|
|
7932
|
+
BUILD_ID: context.environment.envVars.BUILD_INFO_BUILD_ID,
|
|
7892
7933
|
},
|
|
7893
7934
|
};
|
|
7894
7935
|
const clusterName = `kube-${context.environment.fullName}`;
|
|
@@ -7972,7 +8013,7 @@ exports.KUBERNETES_DEPLOY_TYPE = {
|
|
|
7972
8013
|
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
|
|
7973
8014
|
fullConfig.domainCanonical ||
|
|
7974
8015
|
"panter.cloud";
|
|
7975
|
-
const
|
|
8016
|
+
const HOST_INTERNAL = (0, BashExpression_1.joinBashExpressions)([
|
|
7976
8017
|
componentSlug,
|
|
7977
8018
|
...(envType === "review" && reviewSlug ? [reviewSlug] : []),
|
|
7978
8019
|
env,
|
|
@@ -7984,7 +8025,7 @@ exports.KUBERNETES_DEPLOY_TYPE = {
|
|
|
7984
8025
|
KUBE_NAMESPACE,
|
|
7985
8026
|
KUBE_APP_NAME,
|
|
7986
8027
|
KUBE_APP_NAME_PREFIX,
|
|
7987
|
-
|
|
8028
|
+
HOST_INTERNAL,
|
|
7988
8029
|
};
|
|
7989
8030
|
},
|
|
7990
8031
|
};
|
|
@@ -8057,6 +8098,7 @@ const types_1 = __nccwpck_require__(75781);
|
|
|
8057
8098
|
const cloudSql_1 = __nccwpck_require__(45129);
|
|
8058
8099
|
const kubeEnv_1 = __nccwpck_require__(66769);
|
|
8059
8100
|
const mongodb_1 = __nccwpck_require__(24139);
|
|
8101
|
+
const processSecretsAsFiles_1 = __nccwpck_require__(6089);
|
|
8060
8102
|
const createAppConfig = (context, application) => {
|
|
8061
8103
|
if (application === false) {
|
|
8062
8104
|
return {
|
|
@@ -8113,11 +8155,11 @@ const createKubeValues = (context) => {
|
|
|
8113
8155
|
: {}, ((_c = (_b = deployConfig.values) === null || _b === void 0 ? void 0 : _b.mongodb) === null || _c === void 0 ? void 0 : _c.enabled)
|
|
8114
8156
|
? (0, mongodb_1.createMongodbBaseConfig)(context)
|
|
8115
8157
|
: {});
|
|
8116
|
-
const kubeValues = (0, utils_1.mergeWithMergingArrays)(defaultKubeValues, {
|
|
8158
|
+
const kubeValues = (0, processSecretsAsFiles_1.processSecretsAsFiles)((0, utils_1.mergeWithMergingArrays)(defaultKubeValues, {
|
|
8117
8159
|
jobs: removeFalsy(jobs),
|
|
8118
8160
|
cronjobs: removeFalsy(cronjobs),
|
|
8119
8161
|
...rest,
|
|
8120
|
-
});
|
|
8162
|
+
}));
|
|
8121
8163
|
return kubeValues;
|
|
8122
8164
|
};
|
|
8123
8165
|
exports.createKubeValues = createKubeValues;
|
|
@@ -8236,6 +8278,40 @@ exports.createMongodbBaseConfig = createMongodbBaseConfig;
|
|
|
8236
8278
|
|
|
8237
8279
|
/***/ }),
|
|
8238
8280
|
|
|
8281
|
+
/***/ 6089:
|
|
8282
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8283
|
+
|
|
8284
|
+
"use strict";
|
|
8285
|
+
|
|
8286
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
8287
|
+
exports.processSecretsAsFiles = void 0;
|
|
8288
|
+
const lodash_1 = __nccwpck_require__(23255);
|
|
8289
|
+
const processSecretsAsFiles = (values) => {
|
|
8290
|
+
if (!values.secretsAsFile || values.secretsAsFile.length === 0) {
|
|
8291
|
+
return values;
|
|
8292
|
+
}
|
|
8293
|
+
// the initial idea was that we "shadow" secrets that we mount as files,
|
|
8294
|
+
// but there is a weird kubernetes issue with that (https://github.com/kubernetes/kubernetes/issues/46861),
|
|
8295
|
+
// 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
|
|
8296
|
+
return {
|
|
8297
|
+
...values,
|
|
8298
|
+
env: {
|
|
8299
|
+
...values.env,
|
|
8300
|
+
secret: {
|
|
8301
|
+
...(0, lodash_1.omit)(values.env.secret, values.secretsAsFile),
|
|
8302
|
+
...Object.fromEntries(values.secretsAsFile.map((key) => [
|
|
8303
|
+
key + "_content",
|
|
8304
|
+
values.env.secret[key],
|
|
8305
|
+
])),
|
|
8306
|
+
},
|
|
8307
|
+
},
|
|
8308
|
+
};
|
|
8309
|
+
};
|
|
8310
|
+
exports.processSecretsAsFiles = processSecretsAsFiles;
|
|
8311
|
+
//# sourceMappingURL=processSecretsAsFiles.js.map
|
|
8312
|
+
|
|
8313
|
+
/***/ }),
|
|
8314
|
+
|
|
8239
8315
|
/***/ 44986:
|
|
8240
8316
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
8241
8317
|
|
|
@@ -8812,7 +8888,7 @@ const getFullReferencedJobNameFromWorkspace = (referencedJobName, workspaceName,
|
|
|
8812
8888
|
const getJobName = (need) => (0, lodash_1.isObject)(need) ? need.job : need;
|
|
8813
8889
|
const makeGitlabJob = (context, job, allJobs, baseRules) => {
|
|
8814
8890
|
var _a, _b;
|
|
8815
|
-
const { environment, envMode, needsStages, name, needs, jobTags, script, variables, runnerVariables, when, ...rest } = job;
|
|
8891
|
+
const { environment, envMode, needsStages, needsOtherComponent, name, needs, jobTags, script, variables, runnerVariables, when, ...rest } = job;
|
|
8816
8892
|
const stage = envMode === "stagePerEnv" ? `${job.stage} ${context.env}` : job.stage;
|
|
8817
8893
|
const deduplicatedGitlabNeeds = getGitlabNeeds(context, job, allJobs);
|
|
8818
8894
|
const fullJobName = getFullJobName({
|
|
@@ -8936,7 +9012,7 @@ function deduplicateNeeds(needs) {
|
|
|
8936
9012
|
? [...new Map(needs.map((n) => [(0, lodash_1.isObject)(n) ? n.job : n, n])).values()]
|
|
8937
9013
|
: undefined;
|
|
8938
9014
|
}
|
|
8939
|
-
function getGitlabNeedsForComponentJob(context, { needsStages, needs }, allJobs) {
|
|
9015
|
+
function getGitlabNeedsForComponentJob(context, { needsStages, needs, needsOtherComponent }, allJobs) {
|
|
8940
9016
|
const needsFromStages = needsStages === null || needsStages === void 0 ? void 0 : needsStages.flatMap((n) => {
|
|
8941
9017
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
8942
9018
|
const componentName = context.name;
|
|
@@ -8970,6 +9046,8 @@ function getGitlabNeedsForComponentJob(context, { needsStages, needs }, allJobs)
|
|
|
8970
9046
|
const cleanedNeeds = [
|
|
8971
9047
|
...(needsFromStages !== null && needsFromStages !== void 0 ? needsFromStages : []),
|
|
8972
9048
|
...(needs !== null && needs !== void 0 ? needs : []),
|
|
9049
|
+
// pull in legacy needs from other component, which is now identical to needs
|
|
9050
|
+
...(needsOtherComponent !== null && needsOtherComponent !== void 0 ? needsOtherComponent : []),
|
|
8973
9051
|
];
|
|
8974
9052
|
return cleanedNeeds === null || cleanedNeeds === void 0 ? void 0 : cleanedNeeds.map((n) => {
|
|
8975
9053
|
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, _b;
|
|
15
15
|
return (0, lodash_1.merge)({
|
|
16
16
|
name: constants_1.APP_BUILD_JOB_NAME,
|
|
17
17
|
envMode: "jobPerEnv",
|
|
@@ -25,13 +25,14 @@ 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 : {}),
|
|
28
29
|
}
|
|
29
30
|
: {}),
|
|
30
31
|
},
|
|
31
32
|
runnerVariables: {
|
|
32
33
|
...constants_1.RUNNER_BUILD_RESOURCE_VARIABLES,
|
|
33
34
|
...(runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}),
|
|
34
|
-
...((
|
|
35
|
+
...((_b = context.build.config.runnerVariables) !== null && _b !== void 0 ? _b : {}),
|
|
35
36
|
},
|
|
36
37
|
script: [
|
|
37
38
|
...(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;oBAChD,GAAG,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC;iBAC1C;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;QACD,eAAe,EAAE;YACf,GAAG,2CA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, _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, _r;
|
|
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,6 +25,7 @@ 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 : {}),
|
|
28
29
|
},
|
|
29
30
|
runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
|
|
30
31
|
services: buildConfig.jobServices,
|
|
@@ -37,29 +38,29 @@ const createCustomTestJobs = (context) => {
|
|
|
37
38
|
? {
|
|
38
39
|
name: "๐ก audit",
|
|
39
40
|
...base,
|
|
40
|
-
image: (
|
|
41
|
+
image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage,
|
|
41
42
|
cache: undefined,
|
|
42
|
-
script: [...(0, utils_1.ensureArray)((
|
|
43
|
+
script: [...(0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)],
|
|
43
44
|
allow_failure: true,
|
|
44
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
45
|
+
...(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),
|
|
45
46
|
}
|
|
46
47
|
: null;
|
|
47
48
|
const lintJob = buildConfig.lint
|
|
48
49
|
? {
|
|
49
50
|
name: "๐ฎ lint",
|
|
50
51
|
...base,
|
|
51
|
-
image: (
|
|
52
|
-
script: [...(0, utils_1.ensureArray)((
|
|
53
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
52
|
+
image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : buildConfig.jobImage,
|
|
53
|
+
script: [...(0, utils_1.ensureArray)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)],
|
|
54
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.artifactsReports, (_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.artifacts),
|
|
54
55
|
}
|
|
55
56
|
: null;
|
|
56
57
|
const testJob = buildConfig.test
|
|
57
58
|
? {
|
|
58
59
|
name: "๐งช test",
|
|
59
60
|
...base,
|
|
60
|
-
image: (
|
|
61
|
-
script: [...(0, utils_1.ensureArray)((
|
|
62
|
-
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (
|
|
61
|
+
image: (_o = (_m = buildConfig.test) === null || _m === void 0 ? void 0 : _m.jobImage) !== null && _o !== void 0 ? _o : buildConfig.jobImage,
|
|
62
|
+
script: [...(0, utils_1.ensureArray)((_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.command)],
|
|
63
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.artifactsReports, (_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.artifacts),
|
|
63
64
|
}
|
|
64
65
|
: null;
|
|
65
66
|
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,s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