@catladder/cli 0.0.0-main-79fbaf60 → 0.0.0-main-8462e63f

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.
@@ -40845,7 +40845,7 @@ exports.readConfigSync = readConfigSync;
40845
40845
 
40846
40846
  exports.__esModule = true;
40847
40847
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
40848
- exports.PIPELINE_IMAGE_TAG = "main-79fbaf60" || 0;
40848
+ exports.PIPELINE_IMAGE_TAG = "main-8462e63f" || 0;
40849
40849
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
40850
40850
 
40851
40851
  /***/ }),
@@ -43281,12 +43281,12 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
43281
43281
  exports.__esModule = true;
43282
43282
  exports.createKubernetesDeployJobs = void 0;
43283
43283
  var js_yaml_1 = __nccwpck_require__(3618);
43284
- var __1 = __nccwpck_require__(5355);
43285
43284
  var runner_1 = __nccwpck_require__(5071);
43286
43285
  var base_1 = __nccwpck_require__(2866);
43287
43286
  var sbom_1 = __nccwpck_require__(5928);
43288
43287
  var types_1 = __nccwpck_require__(3109);
43289
43288
  var kubeValues_1 = __nccwpck_require__(1061);
43289
+ var getEnvironmentVariables_1 = __nccwpck_require__(6602);
43290
43290
  var createKubernetesDeployJobs = function (context) {
43291
43291
  var _a, _b, _c;
43292
43292
  var deployConfig = context.componentConfig.deploy;
@@ -43316,7 +43316,7 @@ var createKubernetesDeployJobs = function (context) {
43316
43316
  })
43317
43317
  };
43318
43318
  var clusterName = "kube-".concat(context.environment.fullName);
43319
- var connectContext = ["kubectl config set-cluster \"".concat(clusterName, "\" --server=\"$").concat((0, __1.getSecretVarNameForContext)(context, "KUBE_URL"), "\" --certificate-authority <(echo $").concat((0, __1.getSecretVarNameForContext)(context, "KUBE_CA_PEM"), " | base64 -d) --embed-certs=true"), "kubectl config set-credentials \"".concat(clusterName, "\" --token=\"$").concat((0, __1.getSecretVarNameForContext)(context, "KUBE_TOKEN"), "\""), "kubectl config set-context \"".concat(clusterName, "\" --cluster=\"").concat(clusterName, "\" --user=\"").concat(clusterName, "\" --namespace=\"").concat(context.environment.envVars.KUBE_NAMESPACE, "\""), "kubectl config use-context \"".concat(clusterName, "\"")];
43319
+ var connectContext = ["kubectl config set-cluster \"".concat(clusterName, "\" --server=\"$").concat((0, getEnvironmentVariables_1.getSecretVarNameForContext)(context, "KUBE_URL"), "\" --certificate-authority <(echo $").concat((0, getEnvironmentVariables_1.getSecretVarNameForContext)(context, "KUBE_CA_PEM"), " | base64 -d) --embed-certs=true"), "kubectl config set-credentials \"".concat(clusterName, "\" --token=\"$").concat((0, getEnvironmentVariables_1.getSecretVarNameForContext)(context, "KUBE_TOKEN"), "\""), "kubectl config set-context \"".concat(clusterName, "\" --cluster=\"").concat(clusterName, "\" --user=\"").concat(clusterName, "\" --namespace=\"").concat(context.environment.envVars.KUBE_NAMESPACE, "\""), "kubectl config use-context \"".concat(clusterName, "\"")];
43320
43320
  return (0, base_1.createDeployementJobs)(context, {
43321
43321
  deploy: __assign(__assign({}, shared), {
43322
43322
  script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(connectContext), false), ["kubernetesCreateSecret", "kubernetesDeploy"], false), __read((0, sbom_1.getDependencyTrackUploadScript)(context)), false), ["echo deployment successful 😻"], false)
@@ -43629,9 +43629,10 @@ var __assign = this && this.__assign || function () {
43629
43629
  exports.__esModule = true;
43630
43630
  exports.createMongodbBaseConfig = void 0;
43631
43631
  var lodash_1 = __nccwpck_require__(3255);
43632
- var __1 = __nccwpck_require__(5355);
43632
+ var getEnvironmentVariables_1 = __nccwpck_require__(6602);
43633
+ var types_1 = __nccwpck_require__(3109);
43633
43634
  var getCredentialString = function (context) {
43634
- return "root:$".concat((0, __1.getSecretVarNameForContext)(context, "MONGODB_ROOT_PASSWORD"), "@");
43635
+ return "root:$".concat((0, getEnvironmentVariables_1.getSecretVarNameForContext)(context, "MONGODB_ROOT_PASSWORD"), "@");
43635
43636
  };
43636
43637
  var getMongodbHost = function (context, name) {
43637
43638
  var namespace = context.environment.envVars.KUBE_NAMESPACE;
@@ -43647,7 +43648,7 @@ var getMongodbReplicasetHost = function (context, index) {
43647
43648
  };
43648
43649
  var createMongodbUrl = function (context, dbName) {
43649
43650
  var _a, _b;
43650
- if (!(0, __1.isOfDeployType)(context.componentConfig.deploy, "kubernetes")) {
43651
+ if (!(0, types_1.isOfDeployType)(context.componentConfig.deploy, "kubernetes")) {
43651
43652
  throw new Error("can only createMongodbUrl on supported deploys");
43652
43653
  }
43653
43654
  var mongodbConfig = (_a = context.componentConfig.deploy.values) === null || _a === void 0 ? void 0 : _a.mongodb;
@@ -43666,7 +43667,7 @@ var createMongodbUrl = function (context, dbName) {
43666
43667
  };
43667
43668
  var createMongoBackupDefaultConfig = function (context) {
43668
43669
  var _a;
43669
- if (!(0, __1.isOfDeployType)(context.componentConfig.deploy, "kubernetes")) {
43670
+ if (!(0, types_1.isOfDeployType)(context.componentConfig.deploy, "kubernetes")) {
43670
43671
  throw new Error("can only create mongodb base config on supported deploys");
43671
43672
  }
43672
43673
  var mongodbConfig = (_a = context.componentConfig.deploy.values) === null || _a === void 0 ? void 0 : _a.mongodb;
@@ -43695,7 +43696,7 @@ var createMongoBackupDefaultConfig = function (context) {
43695
43696
  };
43696
43697
  var createMongodbBaseConfig = function (context) {
43697
43698
  var _a, _b;
43698
- if (!(0, __1.isOfDeployType)(context.componentConfig.deploy, "kubernetes")) {
43699
+ if (!(0, types_1.isOfDeployType)(context.componentConfig.deploy, "kubernetes")) {
43699
43700
  throw new Error("can only create mongodb base config on supported deploys");
43700
43701
  }
43701
43702
  var mongodbConfig = (_a = context.componentConfig.deploy.values) === null || _a === void 0 ? void 0 : _a.mongodb;
@@ -43704,8 +43705,8 @@ var createMongodbBaseConfig = function (context) {
43704
43705
  enabled: true,
43705
43706
  auth: {
43706
43707
  enabled: true,
43707
- rootPassword: "$" + (0, __1.getSecretVarNameForContext)(context, "MONGODB_ROOT_PASSWORD"),
43708
- replicaSetKey: "$" + (0, __1.getSecretVarNameForContext)(context, "MONGODB_REPLICASET_KEY")
43708
+ rootPassword: "$" + (0, getEnvironmentVariables_1.getSecretVarNameForContext)(context, "MONGODB_ROOT_PASSWORD"),
43709
+ replicaSetKey: "$" + (0, getEnvironmentVariables_1.getSecretVarNameForContext)(context, "MONGODB_REPLICASET_KEY")
43709
43710
  },
43710
43711
  persistence: {
43711
43712
  storageClass: "standard-rwo"
@@ -45021,6 +45022,7 @@ exports.__esModule = true;
45021
45022
  exports.createGitlabJobs = exports.makeGitlabJob = void 0;
45022
45023
  var lodash_1 = __nccwpck_require__(3255);
45023
45024
  var defaults_1 = __nccwpck_require__(7383);
45025
+ var utils_1 = __nccwpck_require__(7461);
45024
45026
  var removeUndefined = function (obj) {
45025
45027
  return Object.fromEntries(Object.entries(obj).filter(function (_a) {
45026
45028
  var _b = __read(_a, 2),
@@ -45056,7 +45058,8 @@ var makeGitlabJob = function (componentName, env, _a, allJobs) {
45056
45058
  name = _a.name,
45057
45059
  needs = _a.needs,
45058
45060
  jobTags = _a.jobTags,
45059
- job = __rest(_a, ["envMode", "needsStages", "needsOtherComponent", "name", "needs", "jobTags"]);
45061
+ script = _a.script,
45062
+ job = __rest(_a, ["envMode", "needsStages", "needsOtherComponent", "name", "needs", "jobTags", "script"]);
45060
45063
  var stage = envMode === "stagePerEnv" ? "".concat(job.stage, " ").concat(env) : job.stage;
45061
45064
  var needsFromStages = needsStages === null || needsStages === void 0 ? void 0 : needsStages.flatMap(function (n) {
45062
45065
  var _a, _b, _c, _d;
@@ -45090,6 +45093,7 @@ var makeGitlabJob = function (componentName, env, _a, allJobs) {
45090
45093
  })).values()), false);
45091
45094
  var fullJobName = getFullJobName(name, componentName, envMode !== "none" ? env : undefined);
45092
45095
  var gitlabJob = removeUndefined(__assign(__assign({}, job), {
45096
+ script: script === null || script === void 0 ? void 0 : script.filter(utils_1.notNil),
45093
45097
  tags: jobTags,
45094
45098
  stage: stage,
45095
45099
  environment: ((_b = job.environment) === null || _b === void 0 ? void 0 : _b.on_stop) ? __assign(__assign({}, job.environment), {