@catladder/cli 0.0.0-next-5dc1f907 → 0.0.0-next-51dc9c2b
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 +132 -3
- package/dist/bundles/cli/index.js +132 -3
- package/dist/pipeline/src/constants.js +1 -1
- package/dist/pipeline/src/deploy/cloudRun/index.js +12 -0
- package/dist/pipeline/src/deploy/cloudRun/index.js.map +1 -1
- package/dist/pipeline/src/deploy/index.d.ts +5 -0
- package/dist/pipeline/src/deploy/index.js.map +1 -1
- package/dist/pipeline/src/index.d.ts +1 -0
- package/dist/pipeline/src/index.js +1 -0
- package/dist/pipeline/src/index.js.map +1 -1
- package/dist/pipeline/src/pipeline/createJobsForComponent.js +3 -2
- package/dist/pipeline/src/pipeline/createJobsForComponent.js.map +1 -1
- package/dist/pipeline/src/types/config.d.ts +8 -0
- package/dist/pipeline/src/types/config.js.map +1 -1
- package/dist/pipeline/src/verify/createVerifyJobs.d.ts +4 -0
- package/dist/pipeline/src/verify/createVerifyJobs.js +63 -0
- package/dist/pipeline/src/verify/createVerifyJobs.js.map +1 -0
- package/dist/pipeline/src/verify/index.d.ts +2 -0
- package/dist/pipeline/src/verify/index.js +26 -0
- package/dist/pipeline/src/verify/index.js.map +1 -0
- package/dist/pipeline/src/verify/types.d.ts +16 -0
- package/dist/pipeline/src/verify/types.js +5 -0
- package/dist/pipeline/src/verify/types.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -5343,7 +5343,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
5343
5343
|
value: true
|
|
5344
5344
|
}));
|
|
5345
5345
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
5346
|
-
exports.PIPELINE_IMAGE_TAG = "next-
|
|
5346
|
+
exports.PIPELINE_IMAGE_TAG = "next-51dc9c2b" || 0;
|
|
5347
5347
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
5348
5348
|
|
|
5349
5349
|
/***/ }),
|
|
@@ -7656,6 +7656,18 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
7656
7656
|
DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw ? deployConfigRaw.projectId : undefined,
|
|
7657
7657
|
DEPLOY_CLOUD_RUN_REGION: deployConfigRaw ? deployConfigRaw.region : undefined
|
|
7658
7658
|
};
|
|
7659
|
+
},
|
|
7660
|
+
verifyJobSetupScript: context => {
|
|
7661
|
+
var _a;
|
|
7662
|
+
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
7663
|
+
const service = deployConfig === null || deployConfig === void 0 ? void 0 : deployConfig.service;
|
|
7664
|
+
const serviceConfig = typeof service === "object" ? service : undefined;
|
|
7665
|
+
if ((serviceConfig === null || serviceConfig === void 0 ? void 0 : serviceConfig.allowUnauthenticated) !== false) {
|
|
7666
|
+
return [];
|
|
7667
|
+
}
|
|
7668
|
+
// the service requires IAM auth: provide application default credentials
|
|
7669
|
+
// so the verify command can fetch identity tokens for the deployed service
|
|
7670
|
+
return (0, gitlab_1.collapseableSection)("verifygcloudauth", "Setup google application credentials")([`echo "$${exports.GCLOUD_DEPLOY_CREDENTIALS_KEY}" > "$CI_PROJECT_DIR/.gcloud-sa.json"`, `export GOOGLE_APPLICATION_CREDENTIALS="$CI_PROJECT_DIR/.gcloud-sa.json"`]);
|
|
7659
7671
|
}
|
|
7660
7672
|
};
|
|
7661
7673
|
|
|
@@ -8779,6 +8791,7 @@ __exportStar(__nccwpck_require__(20623), exports);
|
|
|
8779
8791
|
__exportStar(__nccwpck_require__(38045), exports);
|
|
8780
8792
|
__exportStar(__nccwpck_require__(51398), exports);
|
|
8781
8793
|
__exportStar(__nccwpck_require__(88025), exports);
|
|
8794
|
+
__exportStar(__nccwpck_require__(39871), exports);
|
|
8782
8795
|
__exportStar(__nccwpck_require__(45585), exports);
|
|
8783
8796
|
__exportStar(__nccwpck_require__(47666), exports);
|
|
8784
8797
|
__exportStar(__nccwpck_require__(60250), exports);
|
|
@@ -9408,6 +9421,7 @@ exports.createJobsForComponentContext = void 0;
|
|
|
9408
9421
|
const build_1 = __nccwpck_require__(51398);
|
|
9409
9422
|
const deploy_1 = __nccwpck_require__(88025);
|
|
9410
9423
|
const jobs_1 = __nccwpck_require__(41507);
|
|
9424
|
+
const createVerifyJobs_1 = __nccwpck_require__(69134);
|
|
9411
9425
|
const injectDefaultVarsInCustomJobs = (context, jobs) => jobs.map(({
|
|
9412
9426
|
variables,
|
|
9413
9427
|
...job
|
|
@@ -9429,9 +9443,9 @@ const getCustomJobs = context => {
|
|
|
9429
9443
|
return injectDefaultVarsInCustomJobs(context, rawJobs);
|
|
9430
9444
|
};
|
|
9431
9445
|
const createJobsForComponentContext = async context => {
|
|
9432
|
-
const [buildJobs, deployJobs] = await Promise.all([context.build.type !== "disabled" ? build_1.BUILD_TYPES[context.build.buildType].jobs(context) : [], context.componentConfig.deploy !== false ? deploy_1.DEPLOY_TYPES[context.componentConfig.deploy.type].jobs(context) : []]);
|
|
9446
|
+
const [buildJobs, deployJobs, verifyJobs] = await Promise.all([context.build.type !== "disabled" ? build_1.BUILD_TYPES[context.build.buildType].jobs(context) : [], context.componentConfig.deploy !== false ? deploy_1.DEPLOY_TYPES[context.componentConfig.deploy.type].jobs(context) : [], (0, createVerifyJobs_1.createVerifyJobs)(context)]);
|
|
9433
9447
|
const customJobs = getCustomJobs(context);
|
|
9434
|
-
return [...buildJobs, ...deployJobs, ...customJobs];
|
|
9448
|
+
return [...buildJobs, ...deployJobs, ...verifyJobs, ...customJobs];
|
|
9435
9449
|
};
|
|
9436
9450
|
exports.createJobsForComponentContext = createJobsForComponentContext;
|
|
9437
9451
|
|
|
@@ -10575,6 +10589,121 @@ exports.resolveReferencesOnce = resolveReferencesOnce;
|
|
|
10575
10589
|
|
|
10576
10590
|
/***/ }),
|
|
10577
10591
|
|
|
10592
|
+
/***/ 69134:
|
|
10593
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
10594
|
+
|
|
10595
|
+
"use strict";
|
|
10596
|
+
|
|
10597
|
+
|
|
10598
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
10599
|
+
value: true
|
|
10600
|
+
}));
|
|
10601
|
+
exports.createVerifyJobs = exports.VERIFY_JOB_NAME = void 0;
|
|
10602
|
+
const createArtifactsConfig_1 = __nccwpck_require__(43983);
|
|
10603
|
+
const createJobCache_1 = __nccwpck_require__(65644);
|
|
10604
|
+
const cache_1 = __nccwpck_require__(34189);
|
|
10605
|
+
const constants_1 = __nccwpck_require__(37878);
|
|
10606
|
+
const yarn_1 = __nccwpck_require__(78897);
|
|
10607
|
+
const deploy_1 = __nccwpck_require__(88025);
|
|
10608
|
+
const runner_1 = __nccwpck_require__(92348);
|
|
10609
|
+
const utils_1 = __nccwpck_require__(20595);
|
|
10610
|
+
exports.VERIFY_JOB_NAME = "🔍 verify";
|
|
10611
|
+
const createVerifyJobs = async context => {
|
|
10612
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
10613
|
+
const verifyConfig = context.componentConfig.verify;
|
|
10614
|
+
if (!verifyConfig) {
|
|
10615
|
+
return [];
|
|
10616
|
+
}
|
|
10617
|
+
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
10618
|
+
if (!deployConfig) {
|
|
10619
|
+
// nothing is deployed, so there is nothing to verify
|
|
10620
|
+
return [];
|
|
10621
|
+
}
|
|
10622
|
+
const isNodeBuild = context.build.type !== "disabled" && context.build.buildType === "node";
|
|
10623
|
+
const [yarnInstall, nodeCache] = isNodeBuild ? await Promise.all([(0, yarn_1.getYarnInstall)(context), (0, cache_1.getNodeCache)(context, "pull")]) : [null, null];
|
|
10624
|
+
const setupScript = (_d = (_c = (_b = deploy_1.DEPLOY_TYPES[deployConfig.type]).verifyJobSetupScript) === null || _c === void 0 ? void 0 : _c.call(_b, context)) !== null && _d !== void 0 ? _d : [];
|
|
10625
|
+
return [{
|
|
10626
|
+
name: exports.VERIFY_JOB_NAME,
|
|
10627
|
+
stage: "verify",
|
|
10628
|
+
envMode: "stagePerEnv",
|
|
10629
|
+
requires: [
|
|
10630
|
+
// wait for this component's own deploy
|
|
10631
|
+
{
|
|
10632
|
+
capability: "deployment",
|
|
10633
|
+
artifacts: false
|
|
10634
|
+
},
|
|
10635
|
+
// ...and for the deploys of the components listed in waitFor
|
|
10636
|
+
...((_e = verifyConfig.waitFor) !== null && _e !== void 0 ? _e : []).map(componentName => ({
|
|
10637
|
+
capability: "deployment",
|
|
10638
|
+
from: {
|
|
10639
|
+
component: componentName
|
|
10640
|
+
},
|
|
10641
|
+
artifacts: false,
|
|
10642
|
+
strict: true
|
|
10643
|
+
}))],
|
|
10644
|
+
image: (_f = verifyConfig.jobImage) !== null && _f !== void 0 ? _f : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
|
|
10645
|
+
cache: nodeCache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, nodeCache) : undefined,
|
|
10646
|
+
variables: {
|
|
10647
|
+
...context.environment.envVars
|
|
10648
|
+
},
|
|
10649
|
+
runnerVariables: {
|
|
10650
|
+
...constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
10651
|
+
...((_g = verifyConfig.runnerVariables) !== null && _g !== void 0 ? _g : {})
|
|
10652
|
+
},
|
|
10653
|
+
script: [...setupScript, ...(yarnInstall ? (0, yarn_1.ensureNodeVersion)(context) : []), `cd ${context.build.dir}`, ...(yarnInstall !== null && yarnInstall !== void 0 ? yarnInstall : []), ...(0, utils_1.ensureArray)(verifyConfig.command)],
|
|
10654
|
+
allow_failure: verifyConfig.allowFailure,
|
|
10655
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, verifyConfig.artifactsReports, verifyConfig.artifacts)
|
|
10656
|
+
}];
|
|
10657
|
+
};
|
|
10658
|
+
exports.createVerifyJobs = createVerifyJobs;
|
|
10659
|
+
|
|
10660
|
+
/***/ }),
|
|
10661
|
+
|
|
10662
|
+
/***/ 39871:
|
|
10663
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
10664
|
+
|
|
10665
|
+
"use strict";
|
|
10666
|
+
|
|
10667
|
+
|
|
10668
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
10669
|
+
if (k2 === undefined) k2 = k;
|
|
10670
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
10671
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10672
|
+
desc = {
|
|
10673
|
+
enumerable: true,
|
|
10674
|
+
get: function () {
|
|
10675
|
+
return m[k];
|
|
10676
|
+
}
|
|
10677
|
+
};
|
|
10678
|
+
}
|
|
10679
|
+
Object.defineProperty(o, k2, desc);
|
|
10680
|
+
} : function (o, m, k, k2) {
|
|
10681
|
+
if (k2 === undefined) k2 = k;
|
|
10682
|
+
o[k2] = m[k];
|
|
10683
|
+
});
|
|
10684
|
+
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
10685
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
10686
|
+
};
|
|
10687
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
10688
|
+
value: true
|
|
10689
|
+
}));
|
|
10690
|
+
__exportStar(__nccwpck_require__(99318), exports);
|
|
10691
|
+
__exportStar(__nccwpck_require__(69134), exports);
|
|
10692
|
+
|
|
10693
|
+
/***/ }),
|
|
10694
|
+
|
|
10695
|
+
/***/ 99318:
|
|
10696
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
10697
|
+
|
|
10698
|
+
"use strict";
|
|
10699
|
+
|
|
10700
|
+
|
|
10701
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
10702
|
+
value: true
|
|
10703
|
+
}));
|
|
10704
|
+
|
|
10705
|
+
/***/ }),
|
|
10706
|
+
|
|
10578
10707
|
/***/ 51748:
|
|
10579
10708
|
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
10580
10709
|
|
|
@@ -11391,7 +11391,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
11391
11391
|
value: true
|
|
11392
11392
|
}));
|
|
11393
11393
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
11394
|
-
exports.PIPELINE_IMAGE_TAG = "next-
|
|
11394
|
+
exports.PIPELINE_IMAGE_TAG = "next-51dc9c2b" || 0;
|
|
11395
11395
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
11396
11396
|
|
|
11397
11397
|
/***/ }),
|
|
@@ -13704,6 +13704,18 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
13704
13704
|
DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw ? deployConfigRaw.projectId : undefined,
|
|
13705
13705
|
DEPLOY_CLOUD_RUN_REGION: deployConfigRaw ? deployConfigRaw.region : undefined
|
|
13706
13706
|
};
|
|
13707
|
+
},
|
|
13708
|
+
verifyJobSetupScript: context => {
|
|
13709
|
+
var _a;
|
|
13710
|
+
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
13711
|
+
const service = deployConfig === null || deployConfig === void 0 ? void 0 : deployConfig.service;
|
|
13712
|
+
const serviceConfig = typeof service === "object" ? service : undefined;
|
|
13713
|
+
if ((serviceConfig === null || serviceConfig === void 0 ? void 0 : serviceConfig.allowUnauthenticated) !== false) {
|
|
13714
|
+
return [];
|
|
13715
|
+
}
|
|
13716
|
+
// the service requires IAM auth: provide application default credentials
|
|
13717
|
+
// so the verify command can fetch identity tokens for the deployed service
|
|
13718
|
+
return (0, gitlab_1.collapseableSection)("verifygcloudauth", "Setup google application credentials")([`echo "$${exports.GCLOUD_DEPLOY_CREDENTIALS_KEY}" > "$CI_PROJECT_DIR/.gcloud-sa.json"`, `export GOOGLE_APPLICATION_CREDENTIALS="$CI_PROJECT_DIR/.gcloud-sa.json"`]);
|
|
13707
13719
|
}
|
|
13708
13720
|
};
|
|
13709
13721
|
|
|
@@ -14827,6 +14839,7 @@ __exportStar(__nccwpck_require__(20623), exports);
|
|
|
14827
14839
|
__exportStar(__nccwpck_require__(38045), exports);
|
|
14828
14840
|
__exportStar(__nccwpck_require__(51398), exports);
|
|
14829
14841
|
__exportStar(__nccwpck_require__(88025), exports);
|
|
14842
|
+
__exportStar(__nccwpck_require__(39871), exports);
|
|
14830
14843
|
__exportStar(__nccwpck_require__(45585), exports);
|
|
14831
14844
|
__exportStar(__nccwpck_require__(47666), exports);
|
|
14832
14845
|
__exportStar(__nccwpck_require__(60250), exports);
|
|
@@ -15456,6 +15469,7 @@ exports.createJobsForComponentContext = void 0;
|
|
|
15456
15469
|
const build_1 = __nccwpck_require__(51398);
|
|
15457
15470
|
const deploy_1 = __nccwpck_require__(88025);
|
|
15458
15471
|
const jobs_1 = __nccwpck_require__(41507);
|
|
15472
|
+
const createVerifyJobs_1 = __nccwpck_require__(69134);
|
|
15459
15473
|
const injectDefaultVarsInCustomJobs = (context, jobs) => jobs.map(({
|
|
15460
15474
|
variables,
|
|
15461
15475
|
...job
|
|
@@ -15477,9 +15491,9 @@ const getCustomJobs = context => {
|
|
|
15477
15491
|
return injectDefaultVarsInCustomJobs(context, rawJobs);
|
|
15478
15492
|
};
|
|
15479
15493
|
const createJobsForComponentContext = async context => {
|
|
15480
|
-
const [buildJobs, deployJobs] = await Promise.all([context.build.type !== "disabled" ? build_1.BUILD_TYPES[context.build.buildType].jobs(context) : [], context.componentConfig.deploy !== false ? deploy_1.DEPLOY_TYPES[context.componentConfig.deploy.type].jobs(context) : []]);
|
|
15494
|
+
const [buildJobs, deployJobs, verifyJobs] = await Promise.all([context.build.type !== "disabled" ? build_1.BUILD_TYPES[context.build.buildType].jobs(context) : [], context.componentConfig.deploy !== false ? deploy_1.DEPLOY_TYPES[context.componentConfig.deploy.type].jobs(context) : [], (0, createVerifyJobs_1.createVerifyJobs)(context)]);
|
|
15481
15495
|
const customJobs = getCustomJobs(context);
|
|
15482
|
-
return [...buildJobs, ...deployJobs, ...customJobs];
|
|
15496
|
+
return [...buildJobs, ...deployJobs, ...verifyJobs, ...customJobs];
|
|
15483
15497
|
};
|
|
15484
15498
|
exports.createJobsForComponentContext = createJobsForComponentContext;
|
|
15485
15499
|
|
|
@@ -16623,6 +16637,121 @@ exports.resolveReferencesOnce = resolveReferencesOnce;
|
|
|
16623
16637
|
|
|
16624
16638
|
/***/ }),
|
|
16625
16639
|
|
|
16640
|
+
/***/ 69134:
|
|
16641
|
+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
16642
|
+
|
|
16643
|
+
"use strict";
|
|
16644
|
+
|
|
16645
|
+
|
|
16646
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
16647
|
+
value: true
|
|
16648
|
+
}));
|
|
16649
|
+
exports.createVerifyJobs = exports.VERIFY_JOB_NAME = void 0;
|
|
16650
|
+
const createArtifactsConfig_1 = __nccwpck_require__(43983);
|
|
16651
|
+
const createJobCache_1 = __nccwpck_require__(65644);
|
|
16652
|
+
const cache_1 = __nccwpck_require__(34189);
|
|
16653
|
+
const constants_1 = __nccwpck_require__(37878);
|
|
16654
|
+
const yarn_1 = __nccwpck_require__(78897);
|
|
16655
|
+
const deploy_1 = __nccwpck_require__(88025);
|
|
16656
|
+
const runner_1 = __nccwpck_require__(92348);
|
|
16657
|
+
const utils_1 = __nccwpck_require__(20595);
|
|
16658
|
+
exports.VERIFY_JOB_NAME = "🔍 verify";
|
|
16659
|
+
const createVerifyJobs = async context => {
|
|
16660
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
16661
|
+
const verifyConfig = context.componentConfig.verify;
|
|
16662
|
+
if (!verifyConfig) {
|
|
16663
|
+
return [];
|
|
16664
|
+
}
|
|
16665
|
+
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
16666
|
+
if (!deployConfig) {
|
|
16667
|
+
// nothing is deployed, so there is nothing to verify
|
|
16668
|
+
return [];
|
|
16669
|
+
}
|
|
16670
|
+
const isNodeBuild = context.build.type !== "disabled" && context.build.buildType === "node";
|
|
16671
|
+
const [yarnInstall, nodeCache] = isNodeBuild ? await Promise.all([(0, yarn_1.getYarnInstall)(context), (0, cache_1.getNodeCache)(context, "pull")]) : [null, null];
|
|
16672
|
+
const setupScript = (_d = (_c = (_b = deploy_1.DEPLOY_TYPES[deployConfig.type]).verifyJobSetupScript) === null || _c === void 0 ? void 0 : _c.call(_b, context)) !== null && _d !== void 0 ? _d : [];
|
|
16673
|
+
return [{
|
|
16674
|
+
name: exports.VERIFY_JOB_NAME,
|
|
16675
|
+
stage: "verify",
|
|
16676
|
+
envMode: "stagePerEnv",
|
|
16677
|
+
requires: [
|
|
16678
|
+
// wait for this component's own deploy
|
|
16679
|
+
{
|
|
16680
|
+
capability: "deployment",
|
|
16681
|
+
artifacts: false
|
|
16682
|
+
},
|
|
16683
|
+
// ...and for the deploys of the components listed in waitFor
|
|
16684
|
+
...((_e = verifyConfig.waitFor) !== null && _e !== void 0 ? _e : []).map(componentName => ({
|
|
16685
|
+
capability: "deployment",
|
|
16686
|
+
from: {
|
|
16687
|
+
component: componentName
|
|
16688
|
+
},
|
|
16689
|
+
artifacts: false,
|
|
16690
|
+
strict: true
|
|
16691
|
+
}))],
|
|
16692
|
+
image: (_f = verifyConfig.jobImage) !== null && _f !== void 0 ? _f : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
|
|
16693
|
+
cache: nodeCache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, nodeCache) : undefined,
|
|
16694
|
+
variables: {
|
|
16695
|
+
...context.environment.envVars
|
|
16696
|
+
},
|
|
16697
|
+
runnerVariables: {
|
|
16698
|
+
...constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
16699
|
+
...((_g = verifyConfig.runnerVariables) !== null && _g !== void 0 ? _g : {})
|
|
16700
|
+
},
|
|
16701
|
+
script: [...setupScript, ...(yarnInstall ? (0, yarn_1.ensureNodeVersion)(context) : []), `cd ${context.build.dir}`, ...(yarnInstall !== null && yarnInstall !== void 0 ? yarnInstall : []), ...(0, utils_1.ensureArray)(verifyConfig.command)],
|
|
16702
|
+
allow_failure: verifyConfig.allowFailure,
|
|
16703
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, verifyConfig.artifactsReports, verifyConfig.artifacts)
|
|
16704
|
+
}];
|
|
16705
|
+
};
|
|
16706
|
+
exports.createVerifyJobs = createVerifyJobs;
|
|
16707
|
+
|
|
16708
|
+
/***/ }),
|
|
16709
|
+
|
|
16710
|
+
/***/ 39871:
|
|
16711
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
16712
|
+
|
|
16713
|
+
"use strict";
|
|
16714
|
+
|
|
16715
|
+
|
|
16716
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
16717
|
+
if (k2 === undefined) k2 = k;
|
|
16718
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16719
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16720
|
+
desc = {
|
|
16721
|
+
enumerable: true,
|
|
16722
|
+
get: function () {
|
|
16723
|
+
return m[k];
|
|
16724
|
+
}
|
|
16725
|
+
};
|
|
16726
|
+
}
|
|
16727
|
+
Object.defineProperty(o, k2, desc);
|
|
16728
|
+
} : function (o, m, k, k2) {
|
|
16729
|
+
if (k2 === undefined) k2 = k;
|
|
16730
|
+
o[k2] = m[k];
|
|
16731
|
+
});
|
|
16732
|
+
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
16733
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16734
|
+
};
|
|
16735
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
16736
|
+
value: true
|
|
16737
|
+
}));
|
|
16738
|
+
__exportStar(__nccwpck_require__(99318), exports);
|
|
16739
|
+
__exportStar(__nccwpck_require__(69134), exports);
|
|
16740
|
+
|
|
16741
|
+
/***/ }),
|
|
16742
|
+
|
|
16743
|
+
/***/ 99318:
|
|
16744
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
16745
|
+
|
|
16746
|
+
"use strict";
|
|
16747
|
+
|
|
16748
|
+
|
|
16749
|
+
Object.defineProperty(exports, "__esModule", ({
|
|
16750
|
+
value: true
|
|
16751
|
+
}));
|
|
16752
|
+
|
|
16753
|
+
/***/ }),
|
|
16754
|
+
|
|
16626
16755
|
/***/ 29879:
|
|
16627
16756
|
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
|
|
16628
16757
|
|
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
7
|
-
exports.PIPELINE_IMAGE_TAG = "next-
|
|
7
|
+
exports.PIPELINE_IMAGE_TAG = "next-51dc9c2b" || "latest";
|
|
8
8
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "git.panter.ch:5001/catladder/catladder";
|
|
@@ -90,5 +90,17 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
90
90
|
DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw ? deployConfigRaw.projectId : undefined,
|
|
91
91
|
DEPLOY_CLOUD_RUN_REGION: deployConfigRaw ? deployConfigRaw.region : undefined
|
|
92
92
|
};
|
|
93
|
+
},
|
|
94
|
+
verifyJobSetupScript: context => {
|
|
95
|
+
var _a;
|
|
96
|
+
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
97
|
+
const service = deployConfig === null || deployConfig === void 0 ? void 0 : deployConfig.service;
|
|
98
|
+
const serviceConfig = typeof service === "object" ? service : undefined;
|
|
99
|
+
if ((serviceConfig === null || serviceConfig === void 0 ? void 0 : serviceConfig.allowUnauthenticated) !== false) {
|
|
100
|
+
return [];
|
|
101
|
+
}
|
|
102
|
+
// the service requires IAM auth: provide application default credentials
|
|
103
|
+
// so the verify command can fetch identity tokens for the deployed service
|
|
104
|
+
return (0, gitlab_1.collapseableSection)("verifygcloudauth", "Setup google application credentials")([`echo "$${exports.GCLOUD_DEPLOY_CREDENTIALS_KEY}" > "$CI_PROJECT_DIR/.gcloud-sa.json"`, `export GOOGLE_APPLICATION_CREDENTIALS="$CI_PROJECT_DIR/.gcloud-sa.json"`]);
|
|
93
105
|
}
|
|
94
106
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../pipeline/src/deploy/cloudRun/index.ts"],"names":[],"mappings":";;;AACA,8DAAgE;AAEhE,2CAAiD;AACjD,uCAAqD;AAErD,+
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../pipeline/src/deploy/cloudRun/index.ts"],"names":[],"mappings":";;;AACA,8DAAgE;AAEhE,2CAAiD;AACjD,uCAAqD;AAErD,+CAG4B;AAC5B,6CAAkD;AAClD,6CAA8D;AAC9D,uEAAwE;AACxE,+CAI0B;AAC1B,2DAAqE;AAExD,QAAA,6BAA6B,GAAG,8BAA8B,CAAC;AAE5E,MAAM,oBAAoB,GAAG,CAAC,EAC5B,eAAe,EACf,qBAAqB,EACrB,GAAG,EACH,aAAa,EACb,UAAU,GAC4C,EAAE,EAAE;;IAC1D,IAAI,eAAe,IAAI,eAAe,CAAC,QAAQ,EAAE,CAAC;QAChD,MAAM,OAAO,GAAG,IAAA,qBAAa,EAC3B,eAAe,CAAC,QAAQ,EACxB,UAAU,EACV,qBAAqB,EACrB,aAAa,CACd,CAAC;QAEF,MAAM,2BAA2B,GAAG,MAAM,CAAC,OAAO,CAChD,MAAA,eAAe,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AAe,CAAC,MAAM;iBAC/B,CAAC;aACH,CAAC,CACL;YACH,CAAC,CAAC,EAAE,CAAC;QAET,OAAO;YACL,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACnD,GAAG,oBAAoB,CAAC,GAAG,CAAC;YAC5B,GAAG,WAAW;YACd,6BAA6B,EAAE,IAAA,4CAA2B,EAAC,GAAG,CAAC;YAC/D,2BAA2B,EAAE,eAAe;gBAC1C,CAAC,CAAC,eAAe,CAAC,SAAS;gBAC3B,CAAC,CAAC,SAAS;YACb,uBAAuB,EAAE,eAAe;gBACtC,CAAC,CAAC,eAAe,CAAC,MAAM;gBACxB,CAAC,CAAC,SAAS;SACd,CAAC;IACJ,CAAC;IACD,oBAAoB,EAAE,CAAC,OAAO,EAAE,EAAE;;QAChC,MAAM,YAAY,GAAG,MAAA,OAAO,CAAC,MAAM,0CAAE,MAExB,CAAC;QACd,MAAM,OAAO,GAAG,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,OAAO,CAAC;QACtC,MAAM,aAAa,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;QACxE,IAAI,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,oBAAoB,MAAK,KAAK,EAAE,CAAC;YAClD,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,yEAAyE;QACzE,2EAA2E;QAC3E,OAAO,IAAA,4BAAmB,EACxB,kBAAkB,EAClB,sCAAsC,CACvC,CAAC;YACA,UAAU,qCAA6B,uCAAuC;YAC9E,yEAAyE;SAC1E,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -14,6 +14,11 @@ export type DeployTypeDefinition<D extends DeployConfig> = {
|
|
|
14
14
|
defaults: (envContext: EnvironmentContext<BuildConfig, D>) => PartialDeep<D>;
|
|
15
15
|
additionalSecretKeys: (envContext: EnvironmentContext<BuildConfig, D>) => SecretEnvVar[];
|
|
16
16
|
getAdditionalEnvVars: (envContext: EnvironmentContext<BuildConfig, D>) => Record<string, string | BashExpression | undefined | null>;
|
|
17
|
+
/**
|
|
18
|
+
* script lines the deploy type contributes to the start of the verify job,
|
|
19
|
+
* e.g. to authenticate against a non-public service
|
|
20
|
+
*/
|
|
21
|
+
verifyJobSetupScript?: (context: ComponentContext) => string[];
|
|
17
22
|
};
|
|
18
23
|
export type DeployTypes = { [T in DeployConfigType]: DeployTypeDefinition<DeployConfigGeneric<T>> };
|
|
19
24
|
export declare const DEPLOY_TYPES: DeployTypes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../pipeline/src/deploy/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAMA,yCAAoD;AACpD,qCAA8C;AAC9C,2CAAqD;AACrD,6CAAsD;AAMtD,6CAA2B;AAC3B,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../pipeline/src/deploy/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAMA,yCAAoD;AACpD,qCAA8C;AAC9C,2CAAqD;AACrD,6CAAsD;AAMtD,6CAA2B;AAC3B,+CAA6B;AAC7B,0CAAwB;AACxB,0CAAwB;AAqBX,QAAA,YAAY,GAAgB;IACvC,UAAU,EAAE,mCAAsB;IAClC,MAAM,EAAE,2BAAkB;IAC1B,SAAS,EAAE,kCAAsB;IACjC,iBAAiB,EAAE,iCAAsB;CAC1C,CAAC"}
|
|
@@ -32,6 +32,7 @@ __exportStar(require("./store"), exports);
|
|
|
32
32
|
__exportStar(require("./context"), exports);
|
|
33
33
|
__exportStar(require("./build"), exports);
|
|
34
34
|
__exportStar(require("./deploy"), exports);
|
|
35
|
+
__exportStar(require("./verify"), exports);
|
|
35
36
|
__exportStar(require("./utils/writeFiles"), exports);
|
|
36
37
|
__exportStar(require("./utils/measureTime"), exports);
|
|
37
38
|
__exportStar(require("./variables/VariableValue"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../pipeline/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,qDAAmC;AACnC,sDAAoC;AACpC,4DAA0C;AAC1C,yCAAuB;AACvB,2CAAyB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../pipeline/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,qDAAmC;AACnC,sDAAoC;AACpC,4DAA0C;AAC1C,yCAAuB;AACvB,2CAAyB"}
|
|
@@ -7,6 +7,7 @@ exports.createJobsForComponentContext = void 0;
|
|
|
7
7
|
const build_1 = require("../build");
|
|
8
8
|
const deploy_1 = require("../deploy");
|
|
9
9
|
const jobs_1 = require("../types/jobs");
|
|
10
|
+
const createVerifyJobs_1 = require("../verify/createVerifyJobs");
|
|
10
11
|
const injectDefaultVarsInCustomJobs = (context, jobs) => jobs.map(({
|
|
11
12
|
variables,
|
|
12
13
|
...job
|
|
@@ -28,8 +29,8 @@ const getCustomJobs = context => {
|
|
|
28
29
|
return injectDefaultVarsInCustomJobs(context, rawJobs);
|
|
29
30
|
};
|
|
30
31
|
const createJobsForComponentContext = async context => {
|
|
31
|
-
const [buildJobs, deployJobs] = await Promise.all([context.build.type !== "disabled" ? build_1.BUILD_TYPES[context.build.buildType].jobs(context) : [], context.componentConfig.deploy !== false ? deploy_1.DEPLOY_TYPES[context.componentConfig.deploy.type].jobs(context) : []]);
|
|
32
|
+
const [buildJobs, deployJobs, verifyJobs] = await Promise.all([context.build.type !== "disabled" ? build_1.BUILD_TYPES[context.build.buildType].jobs(context) : [], context.componentConfig.deploy !== false ? deploy_1.DEPLOY_TYPES[context.componentConfig.deploy.type].jobs(context) : [], (0, createVerifyJobs_1.createVerifyJobs)(context)]);
|
|
32
33
|
const customJobs = getCustomJobs(context);
|
|
33
|
-
return [...buildJobs, ...deployJobs, ...customJobs];
|
|
34
|
+
return [...buildJobs, ...deployJobs, ...verifyJobs, ...customJobs];
|
|
34
35
|
};
|
|
35
36
|
exports.createJobsForComponentContext = createJobsForComponentContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createJobsForComponent.js","sourceRoot":"","sources":["../../../../../pipeline/src/pipeline/createJobsForComponent.ts"],"names":[],"mappings":";;;AAAA,oCAAuC;AACvC,sCAAyC;AAMzC,wCAA6C;
|
|
1
|
+
{"version":3,"file":"createJobsForComponent.js","sourceRoot":"","sources":["../../../../../pipeline/src/pipeline/createJobsForComponent.ts"],"names":[],"mappings":";;;AAAA,oCAAuC;AACvC,sCAAyC;AAMzC,wCAA6C;AAC7C,iEAA8D;AAE9D,MAAM,6BAA6B,GAAG,CACpC,OAAyB,EACzB,IAAwB,EACxB,EAAE,CACF,IAAI,CAAC,GAAG,CACN,CAAC,EAAE,SAAS,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE;;IACxB,OAAA,IAAI,mBAAY,CAAC;QACf,SAAS,EAAE;YACT,GAAG,CAAC,MAAA,OAAO,CAAC,WAAW,CAAC,OAAO,mCAAI,EAAE,CAAC;YACtC,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;SACrB;QACD,GAAG,GAAG;KACP,CAAC,CAAA;CAAA,CACL,CAAC;AACJ,MAAM,aAAa,GAAG,CAAC,OAAyB,EAAE,EAAE;IAClD,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;IACnC,OAAO,6BAA6B,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC,CAAC;AACK,MAAM,6BAA6B,GAAG,KAAK,EAChD,OAAyB,EACA,EAAE;IAC3B,MAAM,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC5D,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,UAAU;YAC/B,CAAC,CAAC,mBAAW,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,IAAI,CACvC,OAAoC,CACrC;YACH,CAAC,CAAC,EAAE;QACN,OAAO,CAAC,eAAe,CAAC,MAAM,KAAK,KAAK;YACtC,CAAC,CAAC,qBAAY,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC;YACjE,CAAC,CAAC,EAAE;QACN,IAAA,mCAAgB,EAAC,OAAO,CAAC;KAC1B,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAE1C,OAAO,CAAC,GAAG,SAAS,EAAE,GAAG,UAAU,EAAE,GAAG,UAAU,EAAE,GAAG,UAAU,CAAC,CAAC;AACrE,CAAC,CAAC;AAlBW,QAAA,6BAA6B,iCAkBxC"}
|
|
@@ -8,6 +8,7 @@ import type { AgentConfig } from "./agent";
|
|
|
8
8
|
import type { Hooks } from "./hooks";
|
|
9
9
|
import type { ReleaseConfig } from "./release";
|
|
10
10
|
import type { CatladderStore } from "../store";
|
|
11
|
+
import type { VerifyConfig } from "../verify/types";
|
|
11
12
|
export declare const ALL_PIPELINE_TRIGGERS: readonly ["mainBranch", "mr", "taggedRelease"];
|
|
12
13
|
export type PipelineTrigger = (typeof ALL_PIPELINE_TRIGGERS)[number];
|
|
13
14
|
/**
|
|
@@ -88,6 +89,13 @@ export type DefaultEnvConfig = {
|
|
|
88
89
|
* environment variables
|
|
89
90
|
*/
|
|
90
91
|
vars?: EnvVars;
|
|
92
|
+
/**
|
|
93
|
+
* post-deploy verification: runs a job in the `verify` stage after the deploy,
|
|
94
|
+
* e.g. an e2e test suite against the freshly deployed environment.
|
|
95
|
+
*
|
|
96
|
+
* Runs in all deployed envs by default, disable per env with `verify: false`
|
|
97
|
+
*/
|
|
98
|
+
verify?: VerifyConfig | false;
|
|
91
99
|
};
|
|
92
100
|
export type DevLocalEnvConfig = {
|
|
93
101
|
vars?: EnvVars;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../pipeline/src/types/config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../pipeline/src/types/config.ts"],"names":[],"mappings":";;;AAaa,QAAA,qBAAqB,GAAG;IACnC,YAAY;IACZ,IAAI;IACJ,eAAe;CACP,CAAC;AAGX;;;GAGG;AACU,QAAA,SAAS,GAAG;IACvB,GAAG,EAAE;QACH,QAAQ,EAAE,CAAC,YAAY,CAAC;KACzB;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,CAAC,IAAI,CAAC;KACjB;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,CAAC,eAAe,CAAC;KAC5B;IACD,IAAI,EAAE;QACJ,QAAQ,EAAE,CAAC,eAAe,CAAC;KAC5B;IACD,KAAK,EAAE;QACL,QAAQ,EAAE,EAAE;KACb;CACO,CAAC;AAEX;;;;GAIG;AACI,MAAM,oBAAoB,GAAG,CAAC,OAAwB,EAAE,EAAE,CAC/D,MAAM,CAAC,OAAO,CAAC,iBAAS,CAAC;KACtB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CACf,CAAC,CAAC,QAAuC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAC7D;KACA,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAY,CAAC,CAAC;AALnB,QAAA,oBAAoB,wBAKD;AAEnB,QAAA,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,iBAAS,CAAC,CAAC;AACtC,QAAA,iBAAiB,GAAG,oBAAyB,CAAC;AAGpD,MAAM,aAAa,GAAG,CAAC,GAAW,EAAkB,EAAE;IAC3D,OAAO,GAAG,IAAI,iBAAS,CAAC;AAC1B,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createVerifyJobs = exports.VERIFY_JOB_NAME = void 0;
|
|
7
|
+
const createArtifactsConfig_1 = require("../build/base/createArtifactsConfig");
|
|
8
|
+
const createJobCache_1 = require("../build/cache/createJobCache");
|
|
9
|
+
const cache_1 = require("../build/node/cache");
|
|
10
|
+
const constants_1 = require("../build/node/constants");
|
|
11
|
+
const yarn_1 = require("../build/node/yarn");
|
|
12
|
+
const deploy_1 = require("../deploy");
|
|
13
|
+
const runner_1 = require("../runner");
|
|
14
|
+
const utils_1 = require("../utils");
|
|
15
|
+
exports.VERIFY_JOB_NAME = "🔍 verify";
|
|
16
|
+
const createVerifyJobs = async context => {
|
|
17
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
18
|
+
const verifyConfig = context.componentConfig.verify;
|
|
19
|
+
if (!verifyConfig) {
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
|
|
23
|
+
if (!deployConfig) {
|
|
24
|
+
// nothing is deployed, so there is nothing to verify
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
const isNodeBuild = context.build.type !== "disabled" && context.build.buildType === "node";
|
|
28
|
+
const [yarnInstall, nodeCache] = isNodeBuild ? await Promise.all([(0, yarn_1.getYarnInstall)(context), (0, cache_1.getNodeCache)(context, "pull")]) : [null, null];
|
|
29
|
+
const setupScript = (_d = (_c = (_b = deploy_1.DEPLOY_TYPES[deployConfig.type]).verifyJobSetupScript) === null || _c === void 0 ? void 0 : _c.call(_b, context)) !== null && _d !== void 0 ? _d : [];
|
|
30
|
+
return [{
|
|
31
|
+
name: exports.VERIFY_JOB_NAME,
|
|
32
|
+
stage: "verify",
|
|
33
|
+
envMode: "stagePerEnv",
|
|
34
|
+
requires: [
|
|
35
|
+
// wait for this component's own deploy
|
|
36
|
+
{
|
|
37
|
+
capability: "deployment",
|
|
38
|
+
artifacts: false
|
|
39
|
+
},
|
|
40
|
+
// ...and for the deploys of the components listed in waitFor
|
|
41
|
+
...((_e = verifyConfig.waitFor) !== null && _e !== void 0 ? _e : []).map(componentName => ({
|
|
42
|
+
capability: "deployment",
|
|
43
|
+
from: {
|
|
44
|
+
component: componentName
|
|
45
|
+
},
|
|
46
|
+
artifacts: false,
|
|
47
|
+
strict: true
|
|
48
|
+
}))],
|
|
49
|
+
image: (_f = verifyConfig.jobImage) !== null && _f !== void 0 ? _f : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
|
|
50
|
+
cache: nodeCache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, nodeCache) : undefined,
|
|
51
|
+
variables: {
|
|
52
|
+
...context.environment.envVars
|
|
53
|
+
},
|
|
54
|
+
runnerVariables: {
|
|
55
|
+
...constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
56
|
+
...((_g = verifyConfig.runnerVariables) !== null && _g !== void 0 ? _g : {})
|
|
57
|
+
},
|
|
58
|
+
script: [...setupScript, ...(yarnInstall ? (0, yarn_1.ensureNodeVersion)(context) : []), `cd ${context.build.dir}`, ...(yarnInstall !== null && yarnInstall !== void 0 ? yarnInstall : []), ...(0, utils_1.ensureArray)(verifyConfig.command)],
|
|
59
|
+
allow_failure: verifyConfig.allowFailure,
|
|
60
|
+
...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, verifyConfig.artifactsReports, verifyConfig.artifacts)
|
|
61
|
+
}];
|
|
62
|
+
};
|
|
63
|
+
exports.createVerifyJobs = createVerifyJobs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createVerifyJobs.js","sourceRoot":"","sources":["../../../../../pipeline/src/verify/createVerifyJobs.ts"],"names":[],"mappings":";;;AAAA,+EAA4E;AAC5E,kEAA+E;AAC/E,+CAAmD;AACnD,uDAAsE;AACtE,6CAAuE;AACvE,sCAAyC;AACzC,sCAA2C;AAG3C,oCAAuC;AAE1B,QAAA,eAAe,GAAG,WAAW,CAAC;AAEpC,MAAM,gBAAgB,GAAG,KAAK,EACnC,OAAyB,EACA,EAAE;;IAC3B,MAAM,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC;IACpD,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,YAAY,GAAG,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM,CAAC;IAC5C,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,qDAAqD;QACrD,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,WAAW,GACf,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK,UAAU,IAAI,OAAO,CAAC,KAAK,CAAC,SAAS,KAAK,MAAM,CAAC;IAE1E,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,WAAW;QAC1C,CAAC,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC;YAChB,IAAA,qBAAc,EAAC,OAAO,CAAC;YACvB,IAAA,oBAAY,EAAC,OAAO,EAAE,MAAM,CAAC;SAC9B,CAAC;QACJ,CAAC,CAAC,CAAC,IAAI,EAAE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,EAAE,CAAC;gBACtB,GAAG,IAAA,mBAAW,EAAC,YAAY,CAAC,OAAO,CAAC;aACrC;YACD,aAAa,EAAE,YAAY,CAAC,YAAY;YACxC,GAAG,IAAA,6CAAqB,EACtB,OAAO,CAAC,KAAK,CAAC,GAAG,EACjB,YAAY,CAAC,gBAAgB,EAC7B,YAAY,CAAC,SAAS,CACvB;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AArEW,QAAA,gBAAgB,oBAqE3B"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return m[k];
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
} : function (o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
});
|
|
19
|
+
var __exportStar = this && this.__exportStar || function (m, exports) {
|
|
20
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", {
|
|
23
|
+
value: true
|
|
24
|
+
});
|
|
25
|
+
__exportStar(require("./types"), exports);
|
|
26
|
+
__exportStar(require("./createVerifyJobs"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../pipeline/src/verify/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,qDAAmC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TestJobCustom } from "../build/types";
|
|
2
|
+
/**
|
|
3
|
+
* post-deploy verification job configuration
|
|
4
|
+
*/
|
|
5
|
+
export type VerifyConfig = TestJobCustom & {
|
|
6
|
+
/**
|
|
7
|
+
* command(s) to run against the deployed environment (e.g. `yarn e2e`).
|
|
8
|
+
* Runs in the component's directory.
|
|
9
|
+
*/
|
|
10
|
+
command: string | string[];
|
|
11
|
+
/**
|
|
12
|
+
* names of other components whose deploy must finish before this verify job runs
|
|
13
|
+
* (in addition to this component's own deploy, which is always awaited)
|
|
14
|
+
*/
|
|
15
|
+
waitFor?: string[];
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../pipeline/src/verify/types.ts"],"names":[],"mappings":""}
|