@catladder/cli 0.0.0-pipeline-variables-5972f354 โ†’ 0.0.0-pipeline-variables-e64adaf2

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.
@@ -701,7 +701,11 @@ var getPipelineContextByChoice = function (env, componentName) { return __awaite
701
701
  case 0: return [4 /*yield*/, (0, exports.getProjectConfig)()];
702
702
  case 1:
703
703
  config = _a.sent();
704
- return [4 /*yield*/, (0, pipeline_1.createContext)(config, componentName, env)];
704
+ return [4 /*yield*/, (0, pipeline_1.createContext)({
705
+ config: config,
706
+ componentName: componentName,
707
+ env: env
708
+ })];
705
709
  case 2: return [2 /*return*/, _a.sent()];
706
710
  }
707
711
  });
@@ -39926,10 +39930,10 @@ var RUNNER_CUSTOM_TEST_VARIABLES = {
39926
39930
  KUBERNETES_MEMORY_LIMIT: "4Gi"
39927
39931
  };
39928
39932
  var createCustomTestJobs = function (context) {
39929
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
39933
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
39930
39934
  // don't run tests after release
39931
39935
  // TODO: this will be replaced by using rules
39932
- if (((_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.trigger) === "taggedRelease") {
39936
+ if (context.trigger === "taggedRelease") {
39933
39937
  return [];
39934
39938
  }
39935
39939
  var buildConfig = context.componentConfig.build;
@@ -39939,7 +39943,7 @@ var createCustomTestJobs = function (context) {
39939
39943
  var base = {
39940
39944
  variables: __assign(__assign({
39941
39945
  APP_PATH: context.componentConfig.dir
39942
- }, context.environment.jobOnlyVars.build.envVars), (_b = buildConfig.extraVars) !== null && _b !== void 0 ? _b : {}),
39946
+ }, context.environment.jobOnlyVars.build.envVars), (_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
39943
39947
  runnerVariables: RUNNER_CUSTOM_TEST_VARIABLES,
39944
39948
  services: buildConfig.jobServices,
39945
39949
  cache: buildConfig.jobCache,
@@ -39950,23 +39954,23 @@ var createCustomTestJobs = function (context) {
39950
39954
  var auditJob = buildConfig.audit ? __assign(__assign(__assign({
39951
39955
  name: "๐Ÿ›ก audit"
39952
39956
  }, base), {
39953
- image: (_d = (_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.jobImage) !== null && _d !== void 0 ? _d : buildConfig.jobImage,
39957
+ image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : buildConfig.jobImage,
39954
39958
  cache: undefined,
39955
- script: __spreadArray([], __read((_f = (0, utils_1.ensureArray)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : []), false),
39959
+ script: __spreadArray([], __read((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : []), false),
39956
39960
  allow_failure: true
39957
- }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifactsReports, (_h = buildConfig.audit) === null || _h === void 0 ? void 0 : _h.artifacts)) : null;
39961
+ }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifactsReports, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifacts)) : null;
39958
39962
  var lintJob = buildConfig.lint ? __assign(__assign(__assign({
39959
39963
  name: "๐Ÿ‘ฎ lint"
39960
39964
  }, base), {
39961
- image: (_k = (_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.jobImage) !== null && _k !== void 0 ? _k : buildConfig.jobImage,
39962
- script: __spreadArray([], __read((_m = (0, utils_1.ensureArray)((_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.command)) !== null && _m !== void 0 ? _m : []), false)
39963
- }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifactsReports, (_p = buildConfig.lint) === null || _p === void 0 ? void 0 : _p.artifacts)) : null;
39965
+ image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : buildConfig.jobImage,
39966
+ script: __spreadArray([], __read((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : []), false)
39967
+ }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifactsReports, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifacts)) : null;
39964
39968
  var testJob = buildConfig.test ? __assign(__assign(__assign({
39965
39969
  name: "๐Ÿงช test"
39966
39970
  }, base), {
39967
- image: (_r = (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.jobImage) !== null && _r !== void 0 ? _r : buildConfig.jobImage,
39968
- script: __spreadArray([], __read((_t = (0, utils_1.ensureArray)((_s = buildConfig.test) === null || _s === void 0 ? void 0 : _s.command)) !== null && _t !== void 0 ? _t : []), false)
39969
- }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifactsReports, (_v = buildConfig.test) === null || _v === void 0 ? void 0 : _v.artifacts)) : null;
39971
+ image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : buildConfig.jobImage,
39972
+ script: __spreadArray([], __read((_s = (0, utils_1.ensureArray)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : []), false)
39973
+ }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifactsReports, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifacts)) : null;
39970
39974
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
39971
39975
  };
39972
39976
  exports.createCustomTestJobs = createCustomTestJobs;
@@ -40624,10 +40628,10 @@ var constants_1 = __nccwpck_require__(9284);
40624
40628
  var yarn_1 = __nccwpck_require__(464);
40625
40629
  var createArtifactsConfig_1 = __nccwpck_require__(5669);
40626
40630
  var createNodeTestJobs = function (context) {
40627
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
40631
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
40628
40632
  // don't run tests after release
40629
40633
  // TODO: this will be replaced by using rules
40630
- if (((_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.trigger) === "taggedRelease") {
40634
+ if (context.trigger === "taggedRelease") {
40631
40635
  return [];
40632
40636
  }
40633
40637
  var buildConfig = context.componentConfig.build;
@@ -40635,7 +40639,7 @@ var createNodeTestJobs = function (context) {
40635
40639
  var base = {
40636
40640
  variables: __assign(__assign({
40637
40641
  APP_PATH: context.componentConfig.dir
40638
- }, context.environment.jobOnlyVars.build.envVars), (_b = buildConfig.extraVars) !== null && _b !== void 0 ? _b : {}),
40642
+ }, context.environment.jobOnlyVars.build.envVars), (_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
40639
40643
  runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
40640
40644
  stage: "test",
40641
40645
  needs: [],
@@ -40645,26 +40649,26 @@ var createNodeTestJobs = function (context) {
40645
40649
  var auditJob = buildConfig.audit !== false ? __assign(__assign(__assign({
40646
40650
  name: "๐Ÿ›ก audit"
40647
40651
  }, base), {
40648
- image: (_d = (_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.jobImage) !== null && _d !== void 0 ? _d : defaultImage,
40652
+ image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage,
40649
40653
  cache: undefined,
40650
- script: __spreadArray(["cd ".concat(context.componentConfig.dir)], __read((_f = (0, utils_1.ensureArray)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : [((_g = context.packageManagerInfo) === null || _g === void 0 ? void 0 : _g.isClassic) ? "yarn audit" : "yarn npm audit --environment production" // yarn 2
40654
+ script: __spreadArray(["cd ".concat(context.componentConfig.dir)], __read((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [((_f = context.packageManagerInfo) === null || _f === void 0 ? void 0 : _f.isClassic) ? "yarn audit" : "yarn npm audit --environment production" // yarn 2
40651
40655
  ]), false),
40652
40656
  allow_failure: true
40653
- }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_h = buildConfig.audit) === null || _h === void 0 ? void 0 : _h.artifactsReports, (_j = buildConfig.audit) === null || _j === void 0 ? void 0 : _j.artifacts)) : null;
40657
+ }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifactsReports, (_h = buildConfig.audit) === null || _h === void 0 ? void 0 : _h.artifacts)) : null;
40654
40658
  var lintJob = buildConfig.lint !== false ? __assign(__assign(__assign({
40655
40659
  name: "๐Ÿ‘ฎ lint"
40656
40660
  }, base), {
40657
- image: (_l = (_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.jobImage) !== null && _l !== void 0 ? _l : defaultImage,
40661
+ image: (_k = (_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.jobImage) !== null && _k !== void 0 ? _k : defaultImage,
40658
40662
  cache: (0, cache_1.getNodeCache)(context),
40659
- script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_o = (0, utils_1.ensureArray)((_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.command)) !== null && _o !== void 0 ? _o : ["yarn lint"]), false)
40660
- }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_p = buildConfig.lint) === null || _p === void 0 ? void 0 : _p.artifactsReports, (_q = buildConfig.lint) === null || _q === void 0 ? void 0 : _q.artifacts)) : null;
40663
+ script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_m = (0, utils_1.ensureArray)((_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.command)) !== null && _m !== void 0 ? _m : ["yarn lint"]), false)
40664
+ }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifactsReports, (_p = buildConfig.lint) === null || _p === void 0 ? void 0 : _p.artifacts)) : null;
40661
40665
  var testJob = buildConfig.test !== false ? __assign(__assign(__assign({
40662
40666
  name: "๐Ÿงช test"
40663
40667
  }, base), {
40664
- image: (_s = (_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.jobImage) !== null && _s !== void 0 ? _s : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
40668
+ image: (_r = (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.jobImage) !== null && _r !== void 0 ? _r : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
40665
40669
  cache: (0, cache_1.getNodeCache)(context),
40666
- script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_u = (0, utils_1.ensureArray)((_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.command)) !== null && _u !== void 0 ? _u : ["yarn test"]), false)
40667
- }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_v = buildConfig.test) === null || _v === void 0 ? void 0 : _v.artifactsReports, (_w = buildConfig.test) === null || _w === void 0 ? void 0 : _w.artifacts)) : null;
40670
+ script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_t = (0, utils_1.ensureArray)((_s = buildConfig.test) === null || _s === void 0 ? void 0 : _s.command)) !== null && _t !== void 0 ? _t : ["yarn test"]), false)
40671
+ }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifactsReports, (_v = buildConfig.test) === null || _v === void 0 ? void 0 : _v.artifacts)) : null;
40668
40672
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
40669
40673
  };
40670
40674
  exports.createNodeTestJobs = createNodeTestJobs;
@@ -40943,15 +40947,15 @@ exports.__esModule = true;
40943
40947
  exports.createRailsTestJobs = void 0;
40944
40948
  var utils_1 = __nccwpck_require__(7461);
40945
40949
  var createRailsTestJobs = function (context) {
40946
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
40950
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
40947
40951
  // don't run tests after release
40948
40952
  // TODO: this will be replaced by using rules
40949
- if (((_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.trigger) === "taggedRelease") {
40953
+ if (context.trigger === "taggedRelease") {
40950
40954
  return [];
40951
40955
  }
40952
40956
  var buildConfig = context.componentConfig.build;
40953
40957
  var base = {
40954
- variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), (_b = buildConfig.extraVars) !== null && _b !== void 0 ? _b : {}),
40958
+ variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), (_a = buildConfig.extraVars) !== null && _a !== void 0 ? _a : {}),
40955
40959
  stage: "test",
40956
40960
  needs: [],
40957
40961
  envMode: "none"
@@ -40970,23 +40974,23 @@ var createRailsTestJobs = function (context) {
40970
40974
  name: "๐Ÿ›ก audit"
40971
40975
  }, base), {
40972
40976
  cache: undefined,
40973
- image: (_e = (_d = (_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.jobImage) !== null && _d !== void 0 ? _d : buildConfig.jobImage) !== null && _e !== void 0 ? _e : defaultImage,
40974
- script: __spreadArray(["cd ".concat(context.componentConfig.dir)], __read((_g = (0, utils_1.ensureArray)((_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.command)) !== null && _g !== void 0 ? _g : ["gem install bundler-audit", "bundle audit check"]), false),
40977
+ 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,
40978
+ script: __spreadArray(["cd ".concat(context.componentConfig.dir)], __read((_f = (0, utils_1.ensureArray)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : ["gem install bundler-audit", "bundle audit check"]), false),
40975
40979
  allow_failure: true
40976
40980
  }) : null;
40977
40981
  var lintJob = buildConfig.lint !== false ? __assign(__assign({
40978
40982
  name: "๐Ÿ‘ฎ lint"
40979
40983
  }, base), {
40980
40984
  cache: bundlerCache,
40981
- image: (_k = (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : buildConfig.jobImage) !== null && _k !== void 0 ? _k : defaultImage,
40982
- script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(bundlerInstall), false), __read((_m = (0, utils_1.ensureArray)((_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.command)) !== null && _m !== void 0 ? _m : ["bundle exec rubocop"]), false)
40985
+ 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,
40986
+ script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(bundlerInstall), false), __read((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["bundle exec rubocop"]), false)
40983
40987
  }) : null;
40984
40988
  var testJob = buildConfig.test !== false ? __assign(__assign({
40985
40989
  name: "๐Ÿงช test"
40986
40990
  }, base), {
40987
40991
  cache: bundlerCache,
40988
- image: (_q = (_p = (_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.jobImage) !== null && _p !== void 0 ? _p : buildConfig.jobImage) !== null && _q !== void 0 ? _q : defaultImage,
40989
- script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(bundlerInstall), false), __read((_s = (0, utils_1.ensureArray)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["bundle exec rspec"]), false)
40992
+ 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,
40993
+ script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(bundlerInstall), false), __read((_r = (0, utils_1.ensureArray)((_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : ["bundle exec rspec"]), false)
40990
40994
  }) : null;
40991
40995
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);
40992
40996
  };
@@ -41220,7 +41224,7 @@ exports.readConfigSync = readConfigSync;
41220
41224
 
41221
41225
  exports.__esModule = true;
41222
41226
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
41223
- exports.PIPELINE_IMAGE_TAG = "pipeline-variables-5972f354" || 0;
41227
+ exports.PIPELINE_IMAGE_TAG = "pipeline-variables-e64adaf2" || 0;
41224
41228
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
41225
41229
 
41226
41230
  /***/ }),
@@ -41941,12 +41945,18 @@ var getEnvironment_1 = __nccwpck_require__(740);
41941
41945
  var getEnvironmentContext_1 = __nccwpck_require__(4650);
41942
41946
  __exportStar(__nccwpck_require__(740), exports);
41943
41947
  __exportStar(__nccwpck_require__(6602), exports);
41944
- var createContext = function (config, componentName, env, commitInfo, packageManagerInfo) {
41948
+ var createContext = function (_a) {
41949
+ var config = _a.config,
41950
+ componentName = _a.componentName,
41951
+ env = _a.env,
41952
+ trigger = _a.trigger,
41953
+ packageManagerInfo = _a.packageManagerInfo,
41954
+ pipelineType = _a.pipelineType;
41945
41955
  return __awaiter(void 0, void 0, void 0, function () {
41946
41956
  var envContext, componentConfigWithoutDefaults, defaults, componentConfig;
41947
- var _a;
41948
- return __generator(this, function (_b) {
41949
- switch (_b.label) {
41957
+ var _b;
41958
+ return __generator(this, function (_c) {
41959
+ switch (_c.label) {
41950
41960
  case 0:
41951
41961
  if (!/^[a-z0-9-]+$/.test(componentName)) {
41952
41962
  throw new Error("componentName may only contain lower case letters, numbers and -");
@@ -41961,14 +41971,14 @@ var createContext = function (config, componentName, env, commitInfo, packageMan
41961
41971
  deploy: {}
41962
41972
  };
41963
41973
  componentConfig = (0, utils_1.mergeWithMergingArrays)(defaults, componentConfigWithoutDefaults);
41964
- _a = {
41974
+ _b = {
41965
41975
  fullConfig: config,
41966
41976
  componentConfig: componentConfig,
41967
41977
  componentName: componentName
41968
41978
  };
41969
41979
  return [4 /*yield*/, (0, getEnvironment_1.getEnvironment)(config, componentName, env)];
41970
41980
  case 1:
41971
- return [2 /*return*/, (_a.environment = _b.sent(), _a.commitInfo = commitInfo, _a.packageManagerInfo = packageManagerInfo, _a)];
41981
+ return [2 /*return*/, (_b.environment = _c.sent(), _b.trigger = trigger, _b.packageManagerInfo = packageManagerInfo, _b.pipelineType = pipelineType, _b)];
41972
41982
  }
41973
41983
  });
41974
41984
  });
@@ -45140,166 +45150,6 @@ __exportStar(__nccwpck_require__(223), exports);
45140
45150
 
45141
45151
  /***/ }),
45142
45152
 
45143
- /***/ 630:
45144
- /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
45145
-
45146
- "use strict";
45147
-
45148
-
45149
- var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
45150
- function adopt(value) {
45151
- return value instanceof P ? value : new P(function (resolve) {
45152
- resolve(value);
45153
- });
45154
- }
45155
- return new (P || (P = Promise))(function (resolve, reject) {
45156
- function fulfilled(value) {
45157
- try {
45158
- step(generator.next(value));
45159
- } catch (e) {
45160
- reject(e);
45161
- }
45162
- }
45163
- function rejected(value) {
45164
- try {
45165
- step(generator["throw"](value));
45166
- } catch (e) {
45167
- reject(e);
45168
- }
45169
- }
45170
- function step(result) {
45171
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
45172
- }
45173
- step((generator = generator.apply(thisArg, _arguments || [])).next());
45174
- });
45175
- };
45176
- var __generator = this && this.__generator || function (thisArg, body) {
45177
- var _ = {
45178
- label: 0,
45179
- sent: function () {
45180
- if (t[0] & 1) throw t[1];
45181
- return t[1];
45182
- },
45183
- trys: [],
45184
- ops: []
45185
- },
45186
- f,
45187
- y,
45188
- t,
45189
- g;
45190
- return g = {
45191
- next: verb(0),
45192
- "throw": verb(1),
45193
- "return": verb(2)
45194
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
45195
- return this;
45196
- }), g;
45197
- function verb(n) {
45198
- return function (v) {
45199
- return step([n, v]);
45200
- };
45201
- }
45202
- function step(op) {
45203
- if (f) throw new TypeError("Generator is already executing.");
45204
- while (_) try {
45205
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
45206
- if (y = 0, t) op = [op[0] & 2, t.value];
45207
- switch (op[0]) {
45208
- case 0:
45209
- case 1:
45210
- t = op;
45211
- break;
45212
- case 4:
45213
- _.label++;
45214
- return {
45215
- value: op[1],
45216
- done: false
45217
- };
45218
- case 5:
45219
- _.label++;
45220
- y = op[1];
45221
- op = [0];
45222
- continue;
45223
- case 7:
45224
- op = _.ops.pop();
45225
- _.trys.pop();
45226
- continue;
45227
- default:
45228
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
45229
- _ = 0;
45230
- continue;
45231
- }
45232
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
45233
- _.label = op[1];
45234
- break;
45235
- }
45236
- if (op[0] === 6 && _.label < t[1]) {
45237
- _.label = t[1];
45238
- t = op;
45239
- break;
45240
- }
45241
- if (t && _.label < t[2]) {
45242
- _.label = t[2];
45243
- _.ops.push(op);
45244
- break;
45245
- }
45246
- if (t[2]) _.ops.pop();
45247
- _.trys.pop();
45248
- continue;
45249
- }
45250
- op = body.call(thisArg, _);
45251
- } catch (e) {
45252
- op = [6, e];
45253
- y = 0;
45254
- } finally {
45255
- f = t = 0;
45256
- }
45257
- if (op[0] & 5) throw op[1];
45258
- return {
45259
- value: op[0] ? op[1] : void 0,
45260
- done: true
45261
- };
45262
- }
45263
- };
45264
- exports.__esModule = true;
45265
- exports.getCurrentVersionString = exports.getBuildId = void 0;
45266
- var child_process_promise_1 = __nccwpck_require__(5763);
45267
- var getBuildIdCommands_1 = __nccwpck_require__(9350);
45268
- /**@deprecated */
45269
- var getBuildId = function () {
45270
- return __awaiter(void 0, void 0, void 0, function () {
45271
- return __generator(this, function (_a) {
45272
- switch (_a.label) {
45273
- case 0:
45274
- return [4 /*yield*/, (0, child_process_promise_1.exec)((0, getBuildIdCommands_1.getBuildIdCommand)()).then(function (s) {
45275
- return s.stdout.trim();
45276
- })];
45277
- case 1:
45278
- return [2 /*return*/, _a.sent()];
45279
- }
45280
- });
45281
- });
45282
- };
45283
- exports.getBuildId = getBuildId;
45284
- /**@deprecated */
45285
- var getCurrentVersionString = function () {
45286
- return __awaiter(void 0, void 0, void 0, function () {
45287
- return __generator(this, function (_a) {
45288
- switch (_a.label) {
45289
- case 0:
45290
- return [4 /*yield*/, (0, child_process_promise_1.exec)((0, getBuildIdCommands_1.getCurrentVersionStringCommand)()).then(function (s) {
45291
- return s.stdout.trim();
45292
- })];
45293
- case 1:
45294
- return [2 /*return*/, _a.sent()];
45295
- }
45296
- });
45297
- });
45298
- };
45299
- exports.getCurrentVersionString = getCurrentVersionString;
45300
-
45301
- /***/ }),
45302
-
45303
45153
  /***/ 9350:
45304
45154
  /***/ ((__unused_webpack_module, exports) => {
45305
45155
 
@@ -45324,158 +45174,6 @@ exports.getCurrentVersionStringCommand = getCurrentVersionStringCommand;
45324
45174
 
45325
45175
  /***/ }),
45326
45176
 
45327
- /***/ 5923:
45328
- /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
45329
-
45330
- "use strict";
45331
-
45332
-
45333
- var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
45334
- function adopt(value) {
45335
- return value instanceof P ? value : new P(function (resolve) {
45336
- resolve(value);
45337
- });
45338
- }
45339
- return new (P || (P = Promise))(function (resolve, reject) {
45340
- function fulfilled(value) {
45341
- try {
45342
- step(generator.next(value));
45343
- } catch (e) {
45344
- reject(e);
45345
- }
45346
- }
45347
- function rejected(value) {
45348
- try {
45349
- step(generator["throw"](value));
45350
- } catch (e) {
45351
- reject(e);
45352
- }
45353
- }
45354
- function step(result) {
45355
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
45356
- }
45357
- step((generator = generator.apply(thisArg, _arguments || [])).next());
45358
- });
45359
- };
45360
- var __generator = this && this.__generator || function (thisArg, body) {
45361
- var _ = {
45362
- label: 0,
45363
- sent: function () {
45364
- if (t[0] & 1) throw t[1];
45365
- return t[1];
45366
- },
45367
- trys: [],
45368
- ops: []
45369
- },
45370
- f,
45371
- y,
45372
- t,
45373
- g;
45374
- return g = {
45375
- next: verb(0),
45376
- "throw": verb(1),
45377
- "return": verb(2)
45378
- }, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
45379
- return this;
45380
- }), g;
45381
- function verb(n) {
45382
- return function (v) {
45383
- return step([n, v]);
45384
- };
45385
- }
45386
- function step(op) {
45387
- if (f) throw new TypeError("Generator is already executing.");
45388
- while (_) try {
45389
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
45390
- if (y = 0, t) op = [op[0] & 2, t.value];
45391
- switch (op[0]) {
45392
- case 0:
45393
- case 1:
45394
- t = op;
45395
- break;
45396
- case 4:
45397
- _.label++;
45398
- return {
45399
- value: op[1],
45400
- done: false
45401
- };
45402
- case 5:
45403
- _.label++;
45404
- y = op[1];
45405
- op = [0];
45406
- continue;
45407
- case 7:
45408
- op = _.ops.pop();
45409
- _.trys.pop();
45410
- continue;
45411
- default:
45412
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
45413
- _ = 0;
45414
- continue;
45415
- }
45416
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
45417
- _.label = op[1];
45418
- break;
45419
- }
45420
- if (op[0] === 6 && _.label < t[1]) {
45421
- _.label = t[1];
45422
- t = op;
45423
- break;
45424
- }
45425
- if (t && _.label < t[2]) {
45426
- _.label = t[2];
45427
- _.ops.push(op);
45428
- break;
45429
- }
45430
- if (t[2]) _.ops.pop();
45431
- _.trys.pop();
45432
- continue;
45433
- }
45434
- op = body.call(thisArg, _);
45435
- } catch (e) {
45436
- op = [6, e];
45437
- y = 0;
45438
- } finally {
45439
- f = t = 0;
45440
- }
45441
- if (op[0] & 5) throw op[1];
45442
- return {
45443
- value: op[0] ? op[1] : void 0,
45444
- done: true
45445
- };
45446
- }
45447
- };
45448
- exports.__esModule = true;
45449
- exports.getBaseCommitInfo = void 0;
45450
- var getBuildId_1 = __nccwpck_require__(630);
45451
- /**
45452
- * @deprecated we will move away from having pipeline-time scripts, so that we can create the pipelinefile locally as well */
45453
- var getBaseCommitInfo = function () {
45454
- return __awaiter(void 0, void 0, void 0, function () {
45455
- var _a;
45456
- var _b;
45457
- return __generator(this, function (_c) {
45458
- switch (_c.label) {
45459
- case 0:
45460
- _a = {
45461
- refName: (_b = process.env.CI_COMMIT_REF_NAME) !== null && _b !== void 0 ? _b : "unknown",
45462
- reviewSlug: process.env.CI_MERGE_REQUEST_IID ? "mr".concat(process.env.CI_MERGE_REQUEST_IID) : process.env.CI_COMMIT_REF_SLUG ? "hf".concat(process.env.CI_COMMIT_REF_SLUG) : "unknown",
45463
- buildTime: new Date().toISOString()
45464
- };
45465
- return [4 /*yield*/, (0, getBuildId_1.getBuildId)()];
45466
- case 1:
45467
- _a.buildId = _c.sent();
45468
- return [4 /*yield*/, (0, getBuildId_1.getCurrentVersionString)()];
45469
- case 2:
45470
- return [2 /*return*/, (_a.currentVersion = _c.sent(), _a)];
45471
- }
45472
- });
45473
- });
45474
- };
45475
- exports.getBaseCommitInfo = getBaseCommitInfo;
45476
-
45477
- /***/ }),
45478
-
45479
45177
  /***/ 7052:
45480
45178
  /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
45481
45179
 
@@ -45601,13 +45299,16 @@ exports.__esModule = true;
45601
45299
  exports.createAllJobs = void 0;
45602
45300
  var config_1 = __nccwpck_require__(3138);
45603
45301
  var createJobsForComponent_1 = __nccwpck_require__(962);
45604
- var createAllJobs = function (config, trigger) {
45302
+ var createAllJobs = function (_a) {
45303
+ var config = _a.config,
45304
+ trigger = _a.trigger,
45305
+ pipelineType = _a.pipelineType;
45605
45306
  return __awaiter(void 0, void 0, void 0, function () {
45606
- var _a, _b;
45607
- return __generator(this, function (_c) {
45608
- switch (_c.label) {
45307
+ var _b, _c;
45308
+ return __generator(this, function (_d) {
45309
+ switch (_d.label) {
45609
45310
  case 0:
45610
- _b = (_a = Object).fromEntries;
45311
+ _c = (_b = Object).fromEntries;
45611
45312
  return [4 /*yield*/, Promise.all(Object.keys(config.components).map(function (componentName) {
45612
45313
  return __awaiter(void 0, void 0, void 0, function () {
45613
45314
  var envs, _a, _b, _c;
@@ -45624,7 +45325,13 @@ var createAllJobs = function (config, trigger) {
45624
45325
  switch (_b.label) {
45625
45326
  case 0:
45626
45327
  _a = [env];
45627
- return [4 /*yield*/, (0, createJobsForComponent_1.createJobsForComponent)(config, componentName, env, trigger)];
45328
+ return [4 /*yield*/, (0, createJobsForComponent_1.createJobsForComponent)({
45329
+ config: config,
45330
+ componentName: componentName,
45331
+ env: env,
45332
+ trigger: trigger,
45333
+ pipelineType: pipelineType
45334
+ })];
45628
45335
  case 1:
45629
45336
  return [2 /*return*/, _a.concat([_b.sent()])];
45630
45337
  }
@@ -45638,7 +45345,7 @@ var createAllJobs = function (config, trigger) {
45638
45345
  });
45639
45346
  }))];
45640
45347
  case 1:
45641
- return [2 /*return*/, _b.apply(_a, [_c.sent()])];
45348
+ return [2 /*return*/, _c.apply(_b, [_d.sent()])];
45642
45349
  }
45643
45350
  });
45644
45351
  });
@@ -45774,23 +45481,27 @@ var createAllJobs_1 = __nccwpck_require__(7052);
45774
45481
  var getPipelineStages_1 = __nccwpck_require__(5812);
45775
45482
  var createGitlabJobs_1 = __nccwpck_require__(3920);
45776
45483
  var createGitlabPipeline_1 = __nccwpck_require__(9800);
45777
- var createChildPipeline = function (type, trigger, config) {
45484
+ var createChildPipeline = function (pipelineType, trigger, config) {
45778
45485
  return __awaiter(void 0, void 0, void 0, function () {
45779
45486
  var jobs, stages, gitlabJobs;
45780
45487
  return __generator(this, function (_a) {
45781
45488
  switch (_a.label) {
45782
45489
  case 0:
45783
- return [4 /*yield*/, (0, createAllJobs_1.createAllJobs)(config, trigger)];
45490
+ return [4 /*yield*/, (0, createAllJobs_1.createAllJobs)({
45491
+ config: config,
45492
+ trigger: trigger,
45493
+ pipelineType: pipelineType
45494
+ })];
45784
45495
  case 1:
45785
45496
  jobs = _a.sent();
45786
45497
  stages = (0, getPipelineStages_1.getPipelineStages)(config);
45787
- if (!(type === "gitlab")) return [3 /*break*/, 3];
45498
+ if (!(pipelineType === "gitlab")) return [3 /*break*/, 3];
45788
45499
  return [4 /*yield*/, (0, createGitlabJobs_1.createGitlabJobs)(jobs)];
45789
45500
  case 2:
45790
45501
  gitlabJobs = _a.sent();
45791
45502
  return [2 /*return*/, (0, createGitlabPipeline_1.createGitlabPipelineFromStagesAndJobs)(stages, gitlabJobs)];
45792
45503
  case 3:
45793
- throw new Error("".concat(type, " is not supported"));
45504
+ throw new Error("".concat(pipelineType, " is not supported"));
45794
45505
  }
45795
45506
  });
45796
45507
  });
@@ -45975,7 +45686,6 @@ var lodash_1 = __nccwpck_require__(3255);
45975
45686
  var build_1 = __nccwpck_require__(3760);
45976
45687
  var context_1 = __nccwpck_require__(2041);
45977
45688
  var deploy_1 = __nccwpck_require__(223);
45978
- var getCommitInfo_1 = __nccwpck_require__(5923);
45979
45689
  var packageManager_1 = __nccwpck_require__(9168);
45980
45690
  var injectDefaultVarsInCustomJobs = function (context, jobs) {
45981
45691
  return jobs.map(function (_a) {
@@ -46000,24 +45710,20 @@ var createRawJobs = function (context) {
46000
45710
  var customJobs = getCustomJobs(context);
46001
45711
  return __spreadArray(__spreadArray(__spreadArray([], __read(buildJobs), false), __read(deployJobs), false), __read(customJobs), false);
46002
45712
  };
46003
- var createJobsForComponent = function (config, componentName, env, trigger) {
45713
+ var createJobsForComponent = function (contextContext) {
46004
45714
  return __awaiter(void 0, void 0, void 0, function () {
46005
- var commitInfo, _a, packageManagerInfo, context;
46006
- return __generator(this, function (_b) {
46007
- switch (_b.label) {
45715
+ var packageManagerInfo, context;
45716
+ return __generator(this, function (_a) {
45717
+ switch (_a.label) {
46008
45718
  case 0:
46009
- _a = [{}];
46010
- return [4 /*yield*/, (0, getCommitInfo_1.getBaseCommitInfo)()];
45719
+ return [4 /*yield*/, (0, packageManager_1.getPackageManagerInfo)(contextContext.config, contextContext.componentName)];
46011
45720
  case 1:
46012
- commitInfo = __assign.apply(void 0, [__assign.apply(void 0, _a.concat([_b.sent()])), {
46013
- trigger: trigger
46014
- }]);
46015
- return [4 /*yield*/, (0, packageManager_1.getPackageManagerInfo)(config, componentName)];
45721
+ packageManagerInfo = _a.sent();
45722
+ return [4 /*yield*/, (0, context_1.createContext)(__assign(__assign({}, contextContext), {
45723
+ packageManagerInfo: packageManagerInfo
45724
+ }))];
46016
45725
  case 2:
46017
- packageManagerInfo = _b.sent();
46018
- return [4 /*yield*/, (0, context_1.createContext)(config, componentName, env, commitInfo, packageManagerInfo)];
46019
- case 3:
46020
- context = _b.sent();
45726
+ context = _a.sent();
46021
45727
  return [2 /*return*/, createRawJobs(context).map(function (job) {
46022
45728
  return __assign(__assign({}, job), {
46023
45729
  context: context