@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.
- package/dist/build/rails/build.js +4 -8
- package/dist/build/rails/test.js +1 -2
- package/dist/bundles/catladder-gitlab/index.js +3 -3
- package/dist/constants.js +1 -1
- package/dist/pipeline/createAllJobs.d.ts +8 -0
- package/dist/pipeline/createAllJobs.js +164 -0
- package/dist/pipeline/createChildPipeline.js +24 -48
- package/dist/pipeline/createJobsForComponent.d.ts +3 -0
- package/dist/pipeline/{createJobs.js → createJobsForComponent.js} +8 -100
- package/dist/pipeline/gitlab/createGitlabJobs.d.ts +14 -0
- package/dist/pipeline/gitlab/createGitlabJobs.js +260 -0
- package/dist/pipeline/index.d.ts +1 -1
- package/dist/pipeline/index.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/build/index.ts +1 -1
- package/src/build/node/cache.ts +2 -2
- package/src/build/rails/build.ts +9 -6
- package/src/build/rails/test.ts +43 -39
- package/src/config/configruedEnvs.ts +2 -8
- package/src/deploy/kubernetes/deployJob.ts +2 -1
- package/src/pipeline/createAllJobs.ts +38 -0
- package/src/pipeline/createChildPipeline.ts +6 -22
- package/src/pipeline/createJobsForComponent.ts +64 -0
- package/src/pipeline/gitlab/createGitlabJobs.ts +149 -0
- package/src/pipeline/index.ts +1 -1
- package/src/types/gitlab-types.ts +8 -6
- package/dist/pipeline/createJobs.d.ts +0 -3
- package/dist/pipeline/gitlab/makeGitlabJob.d.ts +0 -10
- package/dist/pipeline/gitlab/makeGitlabJob.js +0 -75
- package/src/pipeline/createJobs.ts +0 -196
- 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
|
|
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
|
-
|
|
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
|
|
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;
|
package/dist/build/rails/test.js
CHANGED
|
@@ -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"
|
|
66
|
+
prefix: "$CI_JOB_IMAGE"
|
|
67
67
|
},
|
|
68
|
-
|
|
69
68
|
paths: [bundlerCacheDir]
|
|
70
69
|
};
|
|
71
70
|
var auditJob = buildConfig.audit !== false ? __assign(__assign({
|