@catladder/cli 0.0.0-pipeline-variables-fb0640d0 → 0.0.0-pipeline-variables-e3e4f641

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.
@@ -41217,7 +41217,7 @@ exports.readConfigSync = readConfigSync;
41217
41217
 
41218
41218
  exports.__esModule = true;
41219
41219
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
41220
- exports.PIPELINE_IMAGE_TAG = "pipeline-variables-fb0640d0" || 0;
41220
+ exports.PIPELINE_IMAGE_TAG = "pipeline-variables-e3e4f641" || 0;
41221
41221
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
41222
41222
 
41223
41223
  /***/ }),
@@ -43593,7 +43593,8 @@ function getDeployJobVariables(context) {
43593
43593
  ENV_VARS: (0, js_yaml_1.dump)(allEnvVars, {
43594
43594
  lineWidth: -1,
43595
43595
  quotingType: "'",
43596
- forceQuotes: true
43596
+ forceQuotes: true,
43597
+ noRefs: true
43597
43598
  })
43598
43599
  };
43599
43600
  }
@@ -46292,9 +46293,27 @@ var makeGitlabJob = function (componentName, env, _a, allJobs) {
46292
46293
  return [(0, lodash_1.isObject)(n) ? n.job : n, n];
46293
46294
  })).values()), false);
46294
46295
  var fullJobName = getFullJobName(name, componentName, envMode !== "none" ? env : undefined);
46295
- var varsInjectScripts = (0, gitlab_1.collapseableSection)("injectvars", "Injecting variables")(__spreadArray(__spreadArray([], __read((0, jobBuildVars_1.getBuildVariablesAssignmentCommand)("gitlab")), false), __read((0, getInjectVarsScript_1.getInjectVarsScript)(variables)), false));
46296
+ // backwards compatibility, some may still use KUBERNETES_CPU_REQUEST, KUBERNETES_MEMORY_REQUEST, etc. in variables.
46297
+ // those should now be set in the runnerVariables as they don't work in the variables key of the catladder job, becuase those get injected
46298
+ var PIPELINE_RUNNER_VARIABLES = ["KUBERNETES_CPU_REQUEST", "KUBERNETES_MEMORY_REQUEST", "KUBERNETES_CPU_LIMIT", "KUBERNETES_MEMORY_LIMIT"];
46299
+ // remove those from variables and add them to runnerVariables
46300
+ var varsInjectScripts = (0, gitlab_1.collapseableSection)("injectvars", "Injecting variables")(__spreadArray(__spreadArray([], __read((0, jobBuildVars_1.getBuildVariablesAssignmentCommand)("gitlab")), false), __read((0, getInjectVarsScript_1.getInjectVarsScript)(
46301
+ // remove legacy variables
46302
+ Object.fromEntries(Object.entries(variables !== null && variables !== void 0 ? variables : {}).filter(function (_a) {
46303
+ var _b = __read(_a, 1),
46304
+ key = _b[0];
46305
+ return !PIPELINE_RUNNER_VARIABLES.includes(key);
46306
+ })))), false));
46307
+ var legacyRunnerVariables = Object.fromEntries(Object.entries(variables !== null && variables !== void 0 ? variables : {}).filter(function (_a) {
46308
+ var _b = __read(_a, 1),
46309
+ key = _b[0];
46310
+ return PIPELINE_RUNNER_VARIABLES.includes(key);
46311
+ }));
46312
+ if (Object.keys(legacyRunnerVariables).length > 0) {
46313
+ console.warn("Legacy variables detected in ".concat(fullJobName, ": ").concat(Object.keys(legacyRunnerVariables).join(", "), ". Please move them to the runnerVariables key."));
46314
+ }
46296
46315
  var modified = addGitlabEnvironment(context, environment, __assign(__assign({}, job), {
46297
- variables: runnerVariables,
46316
+ variables: __assign(__assign({}, legacyRunnerVariables), runnerVariables),
46298
46317
  script: __spreadArray(__spreadArray([], __read(varsInjectScripts), false), __read(((_b = script === null || script === void 0 ? void 0 : script.filter(utils_1.notNil)) !== null && _b !== void 0 ? _b : []).flatMap(function (s) {
46299
46318
  return ["echo \"".concat(s, "\""), s];
46300
46319
  })), false),
@@ -356149,7 +356149,7 @@ exports.readConfigSync = readConfigSync;
356149
356149
 
356150
356150
  exports.__esModule = true;
356151
356151
  exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
356152
- exports.PIPELINE_IMAGE_TAG = "pipeline-variables-fb0640d0" || 0;
356152
+ exports.PIPELINE_IMAGE_TAG = "pipeline-variables-e3e4f641" || 0;
356153
356153
  exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
356154
356154
 
356155
356155
  /***/ }),
@@ -358525,7 +358525,8 @@ function getDeployJobVariables(context) {
358525
358525
  ENV_VARS: (0, js_yaml_1.dump)(allEnvVars, {
358526
358526
  lineWidth: -1,
358527
358527
  quotingType: "'",
358528
- forceQuotes: true
358528
+ forceQuotes: true,
358529
+ noRefs: true
358529
358530
  })
358530
358531
  };
358531
358532
  }
@@ -361224,9 +361225,27 @@ var makeGitlabJob = function (componentName, env, _a, allJobs) {
361224
361225
  return [(0, lodash_1.isObject)(n) ? n.job : n, n];
361225
361226
  })).values()), false);
361226
361227
  var fullJobName = getFullJobName(name, componentName, envMode !== "none" ? env : undefined);
361227
- var varsInjectScripts = (0, gitlab_1.collapseableSection)("injectvars", "Injecting variables")(__spreadArray(__spreadArray([], __read((0, jobBuildVars_1.getBuildVariablesAssignmentCommand)("gitlab")), false), __read((0, getInjectVarsScript_1.getInjectVarsScript)(variables)), false));
361228
+ // backwards compatibility, some may still use KUBERNETES_CPU_REQUEST, KUBERNETES_MEMORY_REQUEST, etc. in variables.
361229
+ // those should now be set in the runnerVariables as they don't work in the variables key of the catladder job, becuase those get injected
361230
+ var PIPELINE_RUNNER_VARIABLES = ["KUBERNETES_CPU_REQUEST", "KUBERNETES_MEMORY_REQUEST", "KUBERNETES_CPU_LIMIT", "KUBERNETES_MEMORY_LIMIT"];
361231
+ // remove those from variables and add them to runnerVariables
361232
+ var varsInjectScripts = (0, gitlab_1.collapseableSection)("injectvars", "Injecting variables")(__spreadArray(__spreadArray([], __read((0, jobBuildVars_1.getBuildVariablesAssignmentCommand)("gitlab")), false), __read((0, getInjectVarsScript_1.getInjectVarsScript)(
361233
+ // remove legacy variables
361234
+ Object.fromEntries(Object.entries(variables !== null && variables !== void 0 ? variables : {}).filter(function (_a) {
361235
+ var _b = __read(_a, 1),
361236
+ key = _b[0];
361237
+ return !PIPELINE_RUNNER_VARIABLES.includes(key);
361238
+ })))), false));
361239
+ var legacyRunnerVariables = Object.fromEntries(Object.entries(variables !== null && variables !== void 0 ? variables : {}).filter(function (_a) {
361240
+ var _b = __read(_a, 1),
361241
+ key = _b[0];
361242
+ return PIPELINE_RUNNER_VARIABLES.includes(key);
361243
+ }));
361244
+ if (Object.keys(legacyRunnerVariables).length > 0) {
361245
+ console.warn("Legacy variables detected in ".concat(fullJobName, ": ").concat(Object.keys(legacyRunnerVariables).join(", "), ". Please move them to the runnerVariables key."));
361246
+ }
361228
361247
  var modified = addGitlabEnvironment(context, environment, __assign(__assign({}, job), {
361229
- variables: runnerVariables,
361248
+ variables: __assign(__assign({}, legacyRunnerVariables), runnerVariables),
361230
361249
  script: __spreadArray(__spreadArray([], __read(varsInjectScripts), false), __read(((_b = script === null || script === void 0 ? void 0 : script.filter(utils_1.notNil)) !== null && _b !== void 0 ? _b : []).flatMap(function (s) {
361231
361250
  return ["echo \"".concat(s, "\""), s];
361232
361251
  })), false),
package/package.json CHANGED
@@ -52,7 +52,7 @@
52
52
  }
53
53
  ],
54
54
  "license": "MIT",
55
- "version": "0.0.0-pipeline-variables-fb0640d0",
55
+ "version": "0.0.0-pipeline-variables-e3e4f641",
56
56
  "scripts": {
57
57
  "lint": "eslint \"src/**/*.ts\"",
58
58
  "lint:fix": "eslint \"src/**/*.ts\" --fix",
@@ -74,7 +74,7 @@
74
74
  "ts-node": "^10.9.1"
75
75
  },
76
76
  "devDependencies": {
77
- "@catladder/pipeline": "0.0.0-pipeline-variables-fb0640d0",
77
+ "@catladder/pipeline": "0.0.0-pipeline-variables-e3e4f641",
78
78
  "@gitbeaker/rest": "^39.28.0",
79
79
  "@kubernetes/client-node": "^0.16.2",
80
80
  "@tsconfig/node14": "^1.0.1",