@catladder/pipeline 1.89.0 → 1.89.2

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.
Files changed (32) hide show
  1. package/dist/build/rails/build.js +4 -8
  2. package/dist/build/rails/test.js +1 -2
  3. package/dist/bundles/catladder-gitlab/index.js +3 -3
  4. package/dist/constants.js +1 -1
  5. package/dist/pipeline/createAllJobs.d.ts +8 -0
  6. package/dist/pipeline/createAllJobs.js +164 -0
  7. package/dist/pipeline/createChildPipeline.js +24 -48
  8. package/dist/pipeline/createJobsForComponent.d.ts +3 -0
  9. package/dist/pipeline/{createJobs.js → createJobsForComponent.js} +8 -100
  10. package/dist/pipeline/gitlab/createGitlabJobs.d.ts +14 -0
  11. package/dist/pipeline/gitlab/createGitlabJobs.js +260 -0
  12. package/dist/pipeline/index.d.ts +1 -1
  13. package/dist/pipeline/index.js +1 -1
  14. package/dist/tsconfig.tsbuildinfo +1 -1
  15. package/package.json +1 -1
  16. package/src/build/index.ts +1 -1
  17. package/src/build/node/cache.ts +2 -2
  18. package/src/build/rails/build.ts +9 -6
  19. package/src/build/rails/test.ts +43 -39
  20. package/src/config/configruedEnvs.ts +2 -8
  21. package/src/deploy/kubernetes/deployJob.ts +2 -1
  22. package/src/pipeline/createAllJobs.ts +38 -0
  23. package/src/pipeline/createChildPipeline.ts +6 -22
  24. package/src/pipeline/createJobsForComponent.ts +64 -0
  25. package/src/pipeline/gitlab/createGitlabJobs.ts +149 -0
  26. package/src/pipeline/index.ts +1 -1
  27. package/src/types/gitlab-types.ts +8 -6
  28. package/dist/pipeline/createJobs.d.ts +0 -3
  29. package/dist/pipeline/gitlab/makeGitlabJob.d.ts +0 -10
  30. package/dist/pipeline/gitlab/makeGitlabJob.js +0 -75
  31. package/src/pipeline/createJobs.ts +0 -196
  32. package/src/pipeline/gitlab/makeGitlabJob.ts +0 -25
@@ -27,29 +27,25 @@ exports.createRailsBuildJobs = void 0;
27
27
  var types_1 = require("../types");
28
28
  var docker_1 = require("../docker");
29
29
  var createRailsBuildJobs = function (context) {
30
- var _a, _b, _c, _d, _e, _f;
30
+ var _a, _b, _c;
31
31
  var buildConfig = context.componentConfig.build;
32
32
  if (!(0, types_1.isOfBuildType)(buildConfig, "rails")) {
33
33
  // should not happen
34
34
  throw new Error("build type is not rails");
35
35
  }
36
36
  var cnbConf = buildConfig.cnbBuilder;
37
- // backwards compatabilty with CNB_ENV_VARS
38
- // TODO: remove when all projects are migrated
39
- var packEnvArgs = (_c = (_b = (_a = buildConfig.extraVars) === null || _a === void 0 ? void 0 : _a.CNB_ENV_VARS) === null || _b === void 0 ? void 0 : _b.split(" ").map(function (v) {
40
- return "--env '".concat(v, "'");
41
- })) !== null && _c !== void 0 ? _c : Object.entries((_d = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.buildVars) !== null && _d !== void 0 ? _d : {}).map(function (_a) {
37
+ var packEnvArgs = Object.entries((_a = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.buildVars) !== null && _a !== void 0 ? _a : {}).map(function (_a) {
42
38
  var _b = __read(_a, 2),
43
39
  k = _b[0],
44
40
  v = _b[1];
45
41
  return "--env '".concat(k).concat(v ? "=".concat(v) : "", "'");
46
- });
42
+ }).join(" ");
47
43
  return [(0, docker_1.createDockerBuildJobBase)(context, {
48
44
  variables: context.componentConfig.build.extraVars,
49
45
  // custom script
50
46
  script: [docker_1.gitlabDockerLogin, "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
51
47
  // replace private git ssh gem sources with https to make bundler with credentials via env var work
52
- "sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs.join(" "), " ").concat((_f = (_e = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packExtraArgs) === null || _e === void 0 ? void 0 : _e.join(" ")) !== null && _f !== void 0 ? _f : "")]
48
+ "sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs, " ").concat((_c = (_b = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packExtraArgs) === null || _b === void 0 ? void 0 : _b.join(" ")) !== null && _c !== void 0 ? _c : "")]
53
49
  })];
54
50
  };
55
51
  exports.createRailsBuildJobs = createRailsBuildJobs;
@@ -63,9 +63,8 @@ var createRailsTestJobs = function (context) {
63
63
  var bundlerCache = {
64
64
  key: {
65
65
  files: ["Gemfile.lock"],
66
- prefix: "$CI_JOB_IMAGE" // a changed image might have different OS libraries which no longer work with the cached gems
66
+ prefix: "$CI_JOB_IMAGE"
67
67
  },
68
-
69
68
  paths: [bundlerCacheDir]
70
69
  };
71
70
  var auditJob = buildConfig.audit !== false ? __assign(__assign({