@catladder/cli 0.0.0-main-55992239 → 0.0.0-main-2e888690

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.
@@ -2824,7 +2824,7 @@ Object.defineProperty(exports, "__esModule", ({
2824
2824
  value: true
2825
2825
  }));
2826
2826
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
2827
- exports.PIPELINE_IMAGE_TAG = "main-55992239" || 0;
2827
+ exports.PIPELINE_IMAGE_TAG = "main-2e888690" || 0;
2828
2828
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
2829
2829
 
2830
2830
  /***/ }),
@@ -4751,6 +4751,18 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
4751
4751
  DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw ? deployConfigRaw.projectId : undefined,
4752
4752
  DEPLOY_CLOUD_RUN_REGION: deployConfigRaw ? deployConfigRaw.region : undefined
4753
4753
  };
4754
+ },
4755
+ verifyJobSetupScript: context => {
4756
+ var _a;
4757
+ const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
4758
+ const service = deployConfig === null || deployConfig === void 0 ? void 0 : deployConfig.service;
4759
+ const serviceConfig = typeof service === "object" ? service : undefined;
4760
+ if ((serviceConfig === null || serviceConfig === void 0 ? void 0 : serviceConfig.allowUnauthenticated) !== false) {
4761
+ return [];
4762
+ }
4763
+ // the service requires IAM auth: provide application default credentials
4764
+ // so the verify command can fetch identity tokens for the deployed service
4765
+ 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"`]);
4754
4766
  }
4755
4767
  };
4756
4768
 
@@ -5869,6 +5881,7 @@ __exportStar(__nccwpck_require__(940), exports);
5869
5881
  __exportStar(__nccwpck_require__(8045), exports);
5870
5882
  __exportStar(__nccwpck_require__(1398), exports);
5871
5883
  __exportStar(__nccwpck_require__(8025), exports);
5884
+ __exportStar(__nccwpck_require__(9871), exports);
5872
5885
  __exportStar(__nccwpck_require__(5585), exports);
5873
5886
  __exportStar(__nccwpck_require__(7666), exports);
5874
5887
  __exportStar(__nccwpck_require__(250), exports);
@@ -6487,6 +6500,7 @@ Object.defineProperty(exports, "__esModule", ({
6487
6500
  exports.createJobsForComponentContext = void 0;
6488
6501
  const build_1 = __nccwpck_require__(1398);
6489
6502
  const deploy_1 = __nccwpck_require__(8025);
6503
+ const createVerifyJobs_1 = __nccwpck_require__(9134);
6490
6504
  const injectDefaultVarsInCustomJobs = (context, jobs) => jobs.map(({
6491
6505
  variables,
6492
6506
  ...job
@@ -6508,9 +6522,9 @@ const getCustomJobs = context => {
6508
6522
  return injectDefaultVarsInCustomJobs(context, rawJobs);
6509
6523
  };
6510
6524
  const createJobsForComponentContext = async context => {
6511
- 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) : []]);
6525
+ 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)]);
6512
6526
  const customJobs = getCustomJobs(context);
6513
- return [...buildJobs, ...deployJobs, ...customJobs];
6527
+ return [...buildJobs, ...deployJobs, ...verifyJobs, ...customJobs];
6514
6528
  };
6515
6529
  exports.createJobsForComponentContext = createJobsForComponentContext;
6516
6530
 
@@ -8056,6 +8070,118 @@ exports.resolveReferencesOnce = resolveReferencesOnce;
8056
8070
 
8057
8071
  /***/ }),
8058
8072
 
8073
+ /***/ 9134:
8074
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
8075
+
8076
+ "use strict";
8077
+
8078
+
8079
+ Object.defineProperty(exports, "__esModule", ({
8080
+ value: true
8081
+ }));
8082
+ exports.createVerifyJobs = exports.VERIFY_JOB_NAME = void 0;
8083
+ const createArtifactsConfig_1 = __nccwpck_require__(3983);
8084
+ const createJobCache_1 = __nccwpck_require__(5644);
8085
+ const cache_1 = __nccwpck_require__(4189);
8086
+ const constants_1 = __nccwpck_require__(5497);
8087
+ const yarn_1 = __nccwpck_require__(8897);
8088
+ const deploy_1 = __nccwpck_require__(8025);
8089
+ const deploy_2 = __nccwpck_require__(4328);
8090
+ const runner_1 = __nccwpck_require__(2348);
8091
+ const utils_1 = __nccwpck_require__(595);
8092
+ exports.VERIFY_JOB_NAME = "🔍 verify";
8093
+ const createVerifyJobs = async context => {
8094
+ var _a, _b, _c, _d, _e, _f, _g;
8095
+ const verifyConfig = context.componentConfig.verify;
8096
+ if (!verifyConfig) {
8097
+ return [];
8098
+ }
8099
+ const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
8100
+ if (!deployConfig) {
8101
+ // nothing is deployed, so there is nothing to verify
8102
+ return [];
8103
+ }
8104
+ const isNodeBuild = context.build.type !== "disabled" && context.build.buildType === "node";
8105
+ const [yarnInstall, nodeCache] = isNodeBuild ? await Promise.all([(0, yarn_1.getYarnInstall)(context), (0, cache_1.getNodeCache)(context, "pull")]) : [null, null];
8106
+ 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 : [];
8107
+ return [{
8108
+ name: exports.VERIFY_JOB_NAME,
8109
+ stage: "verify",
8110
+ envMode: "stagePerEnv",
8111
+ // wait for this component's own deploy
8112
+ needsStages: [{
8113
+ stage: "deploy",
8114
+ artifacts: false
8115
+ }],
8116
+ // ...and for the deploys of the components listed in waitFor
8117
+ needs: ((_e = verifyConfig.waitFor) !== null && _e !== void 0 ? _e : []).map(componentName => ({
8118
+ job: deploy_2.DEPLOY_JOB_NAME,
8119
+ componentName,
8120
+ artifacts: false
8121
+ })),
8122
+ image: (_f = verifyConfig.jobImage) !== null && _f !== void 0 ? _f : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
8123
+ cache: nodeCache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, nodeCache) : undefined,
8124
+ variables: {
8125
+ ...context.environment.envVars
8126
+ },
8127
+ runnerVariables: {
8128
+ ...constants_1.NODE_RUNNER_BUILD_VARIABLES,
8129
+ ...((_g = verifyConfig.runnerVariables) !== null && _g !== void 0 ? _g : {})
8130
+ },
8131
+ script: [...setupScript, ...(yarnInstall ? (0, yarn_1.ensureNodeVersion)(context) : []), `cd ${context.build.dir}`, ...(yarnInstall !== null && yarnInstall !== void 0 ? yarnInstall : []), ...(0, utils_1.ensureArray)(verifyConfig.command)],
8132
+ allow_failure: verifyConfig.allowFailure,
8133
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, verifyConfig.artifactsReports, verifyConfig.artifacts)
8134
+ }];
8135
+ };
8136
+ exports.createVerifyJobs = createVerifyJobs;
8137
+
8138
+ /***/ }),
8139
+
8140
+ /***/ 9871:
8141
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
8142
+
8143
+ "use strict";
8144
+
8145
+
8146
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
8147
+ if (k2 === undefined) k2 = k;
8148
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8149
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8150
+ desc = {
8151
+ enumerable: true,
8152
+ get: function () {
8153
+ return m[k];
8154
+ }
8155
+ };
8156
+ }
8157
+ Object.defineProperty(o, k2, desc);
8158
+ } : function (o, m, k, k2) {
8159
+ if (k2 === undefined) k2 = k;
8160
+ o[k2] = m[k];
8161
+ });
8162
+ var __exportStar = this && this.__exportStar || function (m, exports) {
8163
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
8164
+ };
8165
+ Object.defineProperty(exports, "__esModule", ({
8166
+ value: true
8167
+ }));
8168
+ __exportStar(__nccwpck_require__(9318), exports);
8169
+ __exportStar(__nccwpck_require__(9134), exports);
8170
+
8171
+ /***/ }),
8172
+
8173
+ /***/ 9318:
8174
+ /***/ ((__unused_webpack_module, exports) => {
8175
+
8176
+ "use strict";
8177
+
8178
+
8179
+ Object.defineProperty(exports, "__esModule", ({
8180
+ value: true
8181
+ }));
8182
+
8183
+ /***/ }),
8184
+
8059
8185
  /***/ 1748:
8060
8186
  /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
8061
8187
 
@@ -7725,7 +7725,7 @@ Object.defineProperty(exports, "__esModule", ({
7725
7725
  value: true
7726
7726
  }));
7727
7727
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
7728
- exports.PIPELINE_IMAGE_TAG = "main-55992239" || 0;
7728
+ exports.PIPELINE_IMAGE_TAG = "main-2e888690" || 0;
7729
7729
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
7730
7730
 
7731
7731
  /***/ }),
@@ -9652,6 +9652,18 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
9652
9652
  DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw ? deployConfigRaw.projectId : undefined,
9653
9653
  DEPLOY_CLOUD_RUN_REGION: deployConfigRaw ? deployConfigRaw.region : undefined
9654
9654
  };
9655
+ },
9656
+ verifyJobSetupScript: context => {
9657
+ var _a;
9658
+ const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
9659
+ const service = deployConfig === null || deployConfig === void 0 ? void 0 : deployConfig.service;
9660
+ const serviceConfig = typeof service === "object" ? service : undefined;
9661
+ if ((serviceConfig === null || serviceConfig === void 0 ? void 0 : serviceConfig.allowUnauthenticated) !== false) {
9662
+ return [];
9663
+ }
9664
+ // the service requires IAM auth: provide application default credentials
9665
+ // so the verify command can fetch identity tokens for the deployed service
9666
+ 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"`]);
9655
9667
  }
9656
9668
  };
9657
9669
 
@@ -10770,6 +10782,7 @@ __exportStar(__nccwpck_require__(20940), exports);
10770
10782
  __exportStar(__nccwpck_require__(38045), exports);
10771
10783
  __exportStar(__nccwpck_require__(51398), exports);
10772
10784
  __exportStar(__nccwpck_require__(88025), exports);
10785
+ __exportStar(__nccwpck_require__(39871), exports);
10773
10786
  __exportStar(__nccwpck_require__(45585), exports);
10774
10787
  __exportStar(__nccwpck_require__(47666), exports);
10775
10788
  __exportStar(__nccwpck_require__(60250), exports);
@@ -11388,6 +11401,7 @@ Object.defineProperty(exports, "__esModule", ({
11388
11401
  exports.createJobsForComponentContext = void 0;
11389
11402
  const build_1 = __nccwpck_require__(51398);
11390
11403
  const deploy_1 = __nccwpck_require__(88025);
11404
+ const createVerifyJobs_1 = __nccwpck_require__(69134);
11391
11405
  const injectDefaultVarsInCustomJobs = (context, jobs) => jobs.map(({
11392
11406
  variables,
11393
11407
  ...job
@@ -11409,9 +11423,9 @@ const getCustomJobs = context => {
11409
11423
  return injectDefaultVarsInCustomJobs(context, rawJobs);
11410
11424
  };
11411
11425
  const createJobsForComponentContext = async context => {
11412
- 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) : []]);
11426
+ 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)]);
11413
11427
  const customJobs = getCustomJobs(context);
11414
- return [...buildJobs, ...deployJobs, ...customJobs];
11428
+ return [...buildJobs, ...deployJobs, ...verifyJobs, ...customJobs];
11415
11429
  };
11416
11430
  exports.createJobsForComponentContext = createJobsForComponentContext;
11417
11431
 
@@ -12957,6 +12971,118 @@ exports.resolveReferencesOnce = resolveReferencesOnce;
12957
12971
 
12958
12972
  /***/ }),
12959
12973
 
12974
+ /***/ 69134:
12975
+ /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
12976
+
12977
+ "use strict";
12978
+
12979
+
12980
+ Object.defineProperty(exports, "__esModule", ({
12981
+ value: true
12982
+ }));
12983
+ exports.createVerifyJobs = exports.VERIFY_JOB_NAME = void 0;
12984
+ const createArtifactsConfig_1 = __nccwpck_require__(43983);
12985
+ const createJobCache_1 = __nccwpck_require__(65644);
12986
+ const cache_1 = __nccwpck_require__(34189);
12987
+ const constants_1 = __nccwpck_require__(37878);
12988
+ const yarn_1 = __nccwpck_require__(78897);
12989
+ const deploy_1 = __nccwpck_require__(88025);
12990
+ const deploy_2 = __nccwpck_require__(24328);
12991
+ const runner_1 = __nccwpck_require__(92348);
12992
+ const utils_1 = __nccwpck_require__(20595);
12993
+ exports.VERIFY_JOB_NAME = "🔍 verify";
12994
+ const createVerifyJobs = async context => {
12995
+ var _a, _b, _c, _d, _e, _f, _g;
12996
+ const verifyConfig = context.componentConfig.verify;
12997
+ if (!verifyConfig) {
12998
+ return [];
12999
+ }
13000
+ const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
13001
+ if (!deployConfig) {
13002
+ // nothing is deployed, so there is nothing to verify
13003
+ return [];
13004
+ }
13005
+ const isNodeBuild = context.build.type !== "disabled" && context.build.buildType === "node";
13006
+ const [yarnInstall, nodeCache] = isNodeBuild ? await Promise.all([(0, yarn_1.getYarnInstall)(context), (0, cache_1.getNodeCache)(context, "pull")]) : [null, null];
13007
+ 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 : [];
13008
+ return [{
13009
+ name: exports.VERIFY_JOB_NAME,
13010
+ stage: "verify",
13011
+ envMode: "stagePerEnv",
13012
+ // wait for this component's own deploy
13013
+ needsStages: [{
13014
+ stage: "deploy",
13015
+ artifacts: false
13016
+ }],
13017
+ // ...and for the deploys of the components listed in waitFor
13018
+ needs: ((_e = verifyConfig.waitFor) !== null && _e !== void 0 ? _e : []).map(componentName => ({
13019
+ job: deploy_2.DEPLOY_JOB_NAME,
13020
+ componentName,
13021
+ artifacts: false
13022
+ })),
13023
+ image: (_f = verifyConfig.jobImage) !== null && _f !== void 0 ? _f : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
13024
+ cache: nodeCache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, nodeCache) : undefined,
13025
+ variables: {
13026
+ ...context.environment.envVars
13027
+ },
13028
+ runnerVariables: {
13029
+ ...constants_1.NODE_RUNNER_BUILD_VARIABLES,
13030
+ ...((_g = verifyConfig.runnerVariables) !== null && _g !== void 0 ? _g : {})
13031
+ },
13032
+ script: [...setupScript, ...(yarnInstall ? (0, yarn_1.ensureNodeVersion)(context) : []), `cd ${context.build.dir}`, ...(yarnInstall !== null && yarnInstall !== void 0 ? yarnInstall : []), ...(0, utils_1.ensureArray)(verifyConfig.command)],
13033
+ allow_failure: verifyConfig.allowFailure,
13034
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, verifyConfig.artifactsReports, verifyConfig.artifacts)
13035
+ }];
13036
+ };
13037
+ exports.createVerifyJobs = createVerifyJobs;
13038
+
13039
+ /***/ }),
13040
+
13041
+ /***/ 39871:
13042
+ /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
13043
+
13044
+ "use strict";
13045
+
13046
+
13047
+ var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
13048
+ if (k2 === undefined) k2 = k;
13049
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13050
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
13051
+ desc = {
13052
+ enumerable: true,
13053
+ get: function () {
13054
+ return m[k];
13055
+ }
13056
+ };
13057
+ }
13058
+ Object.defineProperty(o, k2, desc);
13059
+ } : function (o, m, k, k2) {
13060
+ if (k2 === undefined) k2 = k;
13061
+ o[k2] = m[k];
13062
+ });
13063
+ var __exportStar = this && this.__exportStar || function (m, exports) {
13064
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
13065
+ };
13066
+ Object.defineProperty(exports, "__esModule", ({
13067
+ value: true
13068
+ }));
13069
+ __exportStar(__nccwpck_require__(99318), exports);
13070
+ __exportStar(__nccwpck_require__(69134), exports);
13071
+
13072
+ /***/ }),
13073
+
13074
+ /***/ 99318:
13075
+ /***/ ((__unused_webpack_module, exports) => {
13076
+
13077
+ "use strict";
13078
+
13079
+
13080
+ Object.defineProperty(exports, "__esModule", ({
13081
+ value: true
13082
+ }));
13083
+
13084
+ /***/ }),
13085
+
12960
13086
  /***/ 29879:
12961
13087
  /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
12962
13088
 
@@ -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 = "main-55992239" || "latest";
7
+ exports.PIPELINE_IMAGE_TAG = "main-2e888690" || "latest";
8
8
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "git.panter.ch:5001/catladder/catladder";
@@ -85,5 +85,17 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
85
85
  DEPLOY_CLOUD_RUN_PROJECT_ID: deployConfigRaw ? deployConfigRaw.projectId : undefined,
86
86
  DEPLOY_CLOUD_RUN_REGION: deployConfigRaw ? deployConfigRaw.region : undefined
87
87
  };
88
+ },
89
+ verifyJobSetupScript: context => {
90
+ var _a;
91
+ const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
92
+ const service = deployConfig === null || deployConfig === void 0 ? void 0 : deployConfig.service;
93
+ const serviceConfig = typeof service === "object" ? service : undefined;
94
+ if ((serviceConfig === null || serviceConfig === void 0 ? void 0 : serviceConfig.allowUnauthenticated) !== false) {
95
+ return [];
96
+ }
97
+ // the service requires IAM auth: provide application default credentials
98
+ // so the verify command can fetch identity tokens for the deployed service
99
+ 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"`]);
88
100
  }
89
101
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../pipeline/src/deploy/cloudRun/index.ts"],"names":[],"mappings":";;;AACA,8DAGmC;AAEnC,2CAAiD;AAEjD,+CAA6D;AAC7D,6CAAkD;AAClD,6CAA8D;AAC9D,uEAAwE;AACxE,+CAI0B;AAC1B,2DAAqE;AAExD,QAAA,6BAA6B,GAAG,8BAA8B,CAAC;AAE5E,4HAA4H;AAC/G,QAAA,gCAAgC,GAC3C,gCAAgC,CAAC;AAEnC,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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,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;AAgBX,QAAA,YAAY,GAAgB;IACvC,UAAU,EAAE,mCAAsB;IAClC,MAAM,EAAE,2BAAkB;IAC1B,SAAS,EAAE,kCAAsB;IACjC,iBAAiB,EAAE,iCAAsB;CAC1C,CAAC"}
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"}
@@ -6,6 +6,7 @@ export * from "./config";
6
6
  export * from "./context";
7
7
  export * from "./build";
8
8
  export * from "./deploy";
9
+ export * from "./verify";
9
10
  export * from "./utils/writeFiles";
10
11
  export * from "./utils/measureTime";
11
12
  export * from "./variables/VariableValue";
@@ -30,6 +30,7 @@ __exportStar(require("./config"), exports);
30
30
  __exportStar(require("./context"), exports);
31
31
  __exportStar(require("./build"), exports);
32
32
  __exportStar(require("./deploy"), exports);
33
+ __exportStar(require("./verify"), exports);
33
34
  __exportStar(require("./utils/writeFiles"), exports);
34
35
  __exportStar(require("./utils/measureTime"), exports);
35
36
  __exportStar(require("./variables/VariableValue"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../pipeline/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,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,0CAAwB;AACxB,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,qDAAmC;AACnC,sDAAoC;AACpC,4DAA0C;AAC1C,yCAAuB;AACvB,2CAAyB"}
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.createJobsForComponentContext = void 0;
7
7
  const build_1 = require("../build");
8
8
  const deploy_1 = require("../deploy");
9
+ const createVerifyJobs_1 = require("../verify/createVerifyJobs");
9
10
  const injectDefaultVarsInCustomJobs = (context, jobs) => jobs.map(({
10
11
  variables,
11
12
  ...job
@@ -27,8 +28,8 @@ const getCustomJobs = context => {
27
28
  return injectDefaultVarsInCustomJobs(context, rawJobs);
28
29
  };
29
30
  const createJobsForComponentContext = async context => {
30
- 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) : []]);
31
+ 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)]);
31
32
  const customJobs = getCustomJobs(context);
32
- return [...buildJobs, ...deployJobs, ...customJobs];
33
+ return [...buildJobs, ...deployJobs, ...verifyJobs, ...customJobs];
33
34
  };
34
35
  exports.createJobsForComponentContext = createJobsForComponentContext;
@@ -1 +1 @@
1
- {"version":3,"file":"createJobsForComponent.js","sourceRoot":"","sources":["../../../../../pipeline/src/pip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,CAAC,OAAO,CAAC,CAAC;IAE1C,OAAO,CAAC,GAAG,SAAS,EAAE,GAAG,UAAU,EAAE,GAAG,UAAU,CAAC,CAAC;AACtD,CAAC,CAAC;AAjBW,QAAA,6BAA6B,iCAiBxC"}
1
+ {"version":3,"file":"createJobsForComponent.js","sourceRoot":"","sources":["../../../../../pipeline/src/pipeline/createJobsForComponent.ts"],"names":[],"mappings":";;;AAAA,oCAAuC;AACvC,sCAAyC;AAMzC,iEAA8D;AAE9D,MAAM,6BAA6B,GAAG,CACpC,OAAyB,EACzB,IAAoB,EACpB,EAAE,CACF,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE;;IAAC,OAAA,CAAC;QACnC,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,CAAC,CAAC;AACN,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"}
@@ -7,6 +7,7 @@ import type { PipelineType, WorkspaceBuildConfig } from "..";
7
7
  import type { AgentConfig } from "./agent";
8
8
  import type { Hooks } from "./hooks";
9
9
  import type { ReleaseConfig } from "./release";
10
+ import type { VerifyConfig } from "../verify/types";
10
11
  export declare const ALL_PIPELINE_TRIGGERS: readonly ["mainBranch", "mr", "taggedRelease"];
11
12
  export type PipelineTrigger = (typeof ALL_PIPELINE_TRIGGERS)[number];
12
13
  /**
@@ -71,6 +72,13 @@ export type DefaultEnvConfig = {
71
72
  * environment variables
72
73
  */
73
74
  vars?: EnvVars;
75
+ /**
76
+ * post-deploy verification: runs a job in the `verify` stage after the deploy,
77
+ * e.g. an e2e test suite against the freshly deployed environment.
78
+ *
79
+ * Runs in all deployed envs by default, disable per env with `verify: false`
80
+ */
81
+ verify?: VerifyConfig | false;
74
82
  };
75
83
  export type DevLocalEnvConfig = {
76
84
  vars?: EnvVars;
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../pipeline/src/types/config.ts"],"names":[],"mappings":";;;AAWa,QAAA,qBAAqB,GAAG;IACnC,YAAY;IACZ,IAAI;IACJ,eAAe;CACP,CAAC;AAGX;;;GAGG;AACU,QAAA,SAAS,GAAG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Ae,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,4 @@
1
+ import type { ComponentContext } from "../types/context";
2
+ import type { CatladderJob } from "../types/jobs";
3
+ export declare const VERIFY_JOB_NAME = "\uD83D\uDD0D verify";
4
+ export declare const createVerifyJobs: (context: ComponentContext) => Promise<CatladderJob[]>;
@@ -0,0 +1,60 @@
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 deploy_2 = require("../deploy/base/deploy");
14
+ const runner_1 = require("../runner");
15
+ const utils_1 = require("../utils");
16
+ exports.VERIFY_JOB_NAME = "🔍 verify";
17
+ const createVerifyJobs = async context => {
18
+ var _a, _b, _c, _d, _e, _f, _g;
19
+ const verifyConfig = context.componentConfig.verify;
20
+ if (!verifyConfig) {
21
+ return [];
22
+ }
23
+ const deployConfig = (_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config;
24
+ if (!deployConfig) {
25
+ // nothing is deployed, so there is nothing to verify
26
+ return [];
27
+ }
28
+ const isNodeBuild = context.build.type !== "disabled" && context.build.buildType === "node";
29
+ const [yarnInstall, nodeCache] = isNodeBuild ? await Promise.all([(0, yarn_1.getYarnInstall)(context), (0, cache_1.getNodeCache)(context, "pull")]) : [null, null];
30
+ 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 : [];
31
+ return [{
32
+ name: exports.VERIFY_JOB_NAME,
33
+ stage: "verify",
34
+ envMode: "stagePerEnv",
35
+ // wait for this component's own deploy
36
+ needsStages: [{
37
+ stage: "deploy",
38
+ artifacts: false
39
+ }],
40
+ // ...and for the deploys of the components listed in waitFor
41
+ needs: ((_e = verifyConfig.waitFor) !== null && _e !== void 0 ? _e : []).map(componentName => ({
42
+ job: deploy_2.DEPLOY_JOB_NAME,
43
+ componentName,
44
+ artifacts: false
45
+ })),
46
+ image: (_f = verifyConfig.jobImage) !== null && _f !== void 0 ? _f : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
47
+ cache: nodeCache ? (0, createJobCache_1.createJobCacheFromCacheConfigs)(context, nodeCache) : undefined,
48
+ variables: {
49
+ ...context.environment.envVars
50
+ },
51
+ runnerVariables: {
52
+ ...constants_1.NODE_RUNNER_BUILD_VARIABLES,
53
+ ...((_g = verifyConfig.runnerVariables) !== null && _g !== void 0 ? _g : {})
54
+ },
55
+ script: [...setupScript, ...(yarnInstall ? (0, yarn_1.ensureNodeVersion)(context) : []), `cd ${context.build.dir}`, ...(yarnInstall !== null && yarnInstall !== void 0 ? yarnInstall : []), ...(0, utils_1.ensureArray)(verifyConfig.command)],
56
+ allow_failure: verifyConfig.allowFailure,
57
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, verifyConfig.artifactsReports, verifyConfig.artifacts)
58
+ }];
59
+ };
60
+ 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,kDAAwD;AACxD,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;Q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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;AAlEW,QAAA,gBAAgB,oBAkE3B"}
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./createVerifyJobs";
@@ -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,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../pipeline/src/verify/types.ts"],"names":[],"mappings":""}