@catladder/pipeline 1.75.4 → 1.76.0
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/base/createBuildJob.js +5 -27
- package/dist/build/base/writeBuildInfo.js +0 -3
- package/dist/build/custom/buildJob.js +3 -23
- package/dist/build/custom/index.js +3 -10
- package/dist/build/docker.js +5 -40
- package/dist/build/index.js +0 -8
- package/dist/build/node/buildJob.js +3 -25
- package/dist/build/node/cache.js +3 -21
- package/dist/build/node/index.js +3 -16
- package/dist/build/node/meteor.js +3 -20
- package/dist/build/node/testJob.js +5 -22
- package/dist/build/node/yarn.js +5 -18
- package/dist/build/rails/build.js +2 -8
- package/dist/build/rails/index.js +3 -11
- package/dist/build/rails/test.js +5 -18
- package/dist/build/types.d.ts +0 -9
- package/dist/build/types.js +0 -4
- package/dist/bundles/catladder-gitlab/index.js +1 -1
- package/dist/catladder-gitlab.js +6 -24
- package/dist/config/{configruedEnvs.test.d.ts → __tests__/configruedEnvs.test.d.ts} +0 -0
- package/dist/config/{configruedEnvs.test.js → __tests__/configruedEnvs.test.js} +10 -12
- package/dist/config/configruedEnvs.js +7 -22
- package/dist/config/index.js +0 -4
- package/dist/config/readConfig.js +2 -13
- package/dist/constants.js +1 -1
- package/dist/context/{resolveReferences.test.d.ts → __tests__/resolveReferences.test.d.ts} +0 -0
- package/dist/context/{resolveReferences.test.js → __tests__/resolveReferences.test.js} +52 -103
- package/dist/context/getEnvConfig.js +0 -8
- package/dist/context/getEnvType.js +0 -5
- package/dist/context/getEnvironment.js +13 -49
- package/dist/context/getEnvironmentContext.js +0 -5
- package/dist/context/getEnvironmentVariables.js +20 -83
- package/dist/context/getLabels.js +2 -13
- package/dist/context/index.js +13 -58
- package/dist/context/resolveReferences.js +36 -126
- package/dist/deploy/base.js +4 -19
- package/dist/deploy/cloudRun/deployJob.js +19 -61
- package/dist/deploy/cloudRun/index.js +17 -39
- package/dist/deploy/cloudRun/utils/database.js +11 -29
- package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.js +0 -4
- package/dist/deploy/cloudRun/utils/jobName.js +0 -2
- package/dist/deploy/custom/deployJob.js +3 -18
- package/dist/deploy/custom/index.js +0 -2
- package/dist/deploy/dockerTag/deployJob.js +0 -9
- package/dist/deploy/dockerTag/index.js +0 -2
- package/dist/deploy/index.js +0 -11
- package/dist/deploy/kubernetes/additionalSecretKeys.js +0 -9
- package/dist/deploy/kubernetes/cloudSql/index.js +0 -12
- package/dist/deploy/kubernetes/deployJob.js +3 -24
- package/dist/deploy/kubernetes/index.js +7 -17
- package/dist/deploy/kubernetes/kubeEnv.d.ts +0 -1
- package/dist/deploy/kubernetes/kubeEnv.js +5 -23
- package/dist/deploy/kubernetes/kubeValues.js +6 -24
- package/dist/deploy/kubernetes/mongodb.js +0 -24
- package/dist/deploy/kubernetes/processSecretsAsFiles.js +2 -10
- package/dist/deploy/types/base.d.ts +0 -1
- package/dist/deploy/types/custom.d.ts +0 -6
- package/dist/deploy/types/googleCloudRun.d.ts +4 -12
- package/dist/deploy/types/index.js +0 -10
- package/dist/deploy/types/kubernetes.d.ts +0 -28
- package/dist/deploy/utils.js +0 -11
- package/dist/index.js +0 -10
- package/dist/pipeline/commitInfo/getBuildId.d.ts +1 -0
- package/dist/pipeline/{createChildPipeline.test.js → commitInfo/getBuildId.js} +25 -84
- package/dist/pipeline/commitInfo/getCommitInfo.d.ts +2 -0
- package/dist/{build/tests/storybook.test.js → pipeline/commitInfo/getCommitInfo.js} +30 -104
- package/dist/pipeline/createChildPipeline.js +19 -76
- package/dist/pipeline/createJobs.js +35 -135
- package/dist/pipeline/gitlab/makeGitlabJob.d.ts +1 -0
- package/dist/pipeline/gitlab/makeGitlabJob.js +13 -15
- package/dist/pipeline/index.js +0 -4
- package/dist/pipeline/packageManager.js +20 -173
- package/dist/pipeline/yarn/yarnUtils.d.ts +4 -0
- package/dist/pipeline/yarn/yarnUtils.js +193 -0
- package/dist/runner/index.js +0 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +0 -13
- package/dist/types/config.js +5 -15
- package/dist/types/context.d.ts +0 -2
- package/dist/types/environmentContext.d.ts +0 -1
- package/dist/types/gitlab-types.d.ts +0 -1
- package/dist/types/index.js +0 -6
- package/dist/types/jobs.d.ts +5 -15
- package/dist/utils/gitlab.js +3 -13
- package/dist/utils/index.js +5 -15
- package/examples/__snapshots__/cloud-run-with-sql.ts.snap +1765 -0
- package/examples/__snapshots__/custom-build-job.ts.snap +1174 -0
- package/examples/__snapshots__/custom-envs.ts.snap +261 -0
- package/examples/__snapshots__/wait-for-other-deploy.ts.snap +1626 -0
- package/examples/__utils__/helpers.ts +14 -0
- package/examples/{cloud-sql.ts → cloud-run-with-sql.ts} +12 -15
- package/examples/custom-build-job.ts +4 -1
- package/examples/custom-envs.ts +31 -0
- package/examples/wait-for-other-deploy.ts +36 -0
- package/package.json +2 -2
- package/src/config/{configruedEnvs.test.ts → __tests__/configruedEnvs.test.ts} +3 -3
- package/src/context/{resolveReferences.test.ts → __tests__/resolveReferences.test.ts} +3 -3
- package/src/deploy/cloudRun/index.ts +2 -1
- package/src/deploy/types/googleCloudRun.ts +5 -0
- package/src/pipeline/commitInfo/getBuildId.ts +6 -0
- package/src/pipeline/commitInfo/getCommitInfo.ts +12 -0
- package/src/pipeline/createChildPipeline.ts +6 -1
- package/src/pipeline/createJobs.ts +3 -10
- package/src/pipeline/gitlab/makeGitlabJob.ts +7 -1
- package/src/pipeline/packageManager.ts +4 -38
- package/src/pipeline/yarn/yarnUtils.ts +37 -0
- package/src/types/jobs.ts +2 -1
- package/tsconfig.json +1 -1
- package/dist/build/tests/storybook.test.d.ts +0 -1
- package/dist/pipeline/createChildPipeline.test.d.ts +0 -1
- package/src/build/tests/storybook.test.ts +0 -54
- package/src/pipeline/createChildPipeline.test.ts +0 -49
|
@@ -4,10 +4,9 @@ var __read = this && this.__read || function (o, n) {
|
|
|
4
4
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
5
|
if (!m) return o;
|
|
6
6
|
var i = m.call(o),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
r,
|
|
8
|
+
ar = [],
|
|
9
|
+
e;
|
|
11
10
|
try {
|
|
12
11
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
13
12
|
} catch (error) {
|
|
@@ -21,10 +20,8 @@ var __read = this && this.__read || function (o, n) {
|
|
|
21
20
|
if (e) throw e.error;
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
return ar;
|
|
26
24
|
};
|
|
27
|
-
|
|
28
25
|
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
29
26
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
27
|
if (ar || !(i in from)) {
|
|
@@ -34,26 +31,16 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
34
31
|
}
|
|
35
32
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
33
|
};
|
|
37
|
-
|
|
38
34
|
exports.__esModule = true;
|
|
39
35
|
exports.createMeteorBuildJobs = void 0;
|
|
40
|
-
|
|
41
36
|
var path_1 = require("path");
|
|
42
|
-
|
|
43
37
|
var runner_1 = require("../../runner");
|
|
44
|
-
|
|
45
38
|
var constants_1 = require("../base/constants");
|
|
46
|
-
|
|
47
39
|
var createBuildJob_1 = require("../base/createBuildJob");
|
|
48
|
-
|
|
49
40
|
var docker_1 = require("../docker");
|
|
50
|
-
|
|
51
41
|
var types_1 = require("../types");
|
|
52
|
-
|
|
53
42
|
var cache_1 = require("./cache");
|
|
54
|
-
|
|
55
43
|
var yarn_1 = require("./yarn");
|
|
56
|
-
|
|
57
44
|
var getMeteorCache = function (context) {
|
|
58
45
|
return [{
|
|
59
46
|
key: context.componentName + "meteor-build-cache",
|
|
@@ -61,14 +48,11 @@ var getMeteorCache = function (context) {
|
|
|
61
48
|
paths: [(0, path_1.join)(context.componentConfig.dir, ".meteor/local/resolver-result-cache.json"), (0, path_1.join)(context.componentConfig.dir, ".meteor/local/plugin-cache"), (0, path_1.join)(context.componentConfig.dir, ".meteor/local/isopacks"), (0, path_1.join)(context.componentConfig.dir, ".meteor/local/bundler-cache/scanner")]
|
|
62
49
|
}];
|
|
63
50
|
};
|
|
64
|
-
|
|
65
51
|
var createMeteorBuildJobs = function (context) {
|
|
66
52
|
var buildConfig = context.componentConfig.build;
|
|
67
|
-
|
|
68
53
|
if (!(0, types_1.isOfBuildType)(buildConfig, "meteor")) {
|
|
69
54
|
throw new Error("deploy config is not meteor");
|
|
70
55
|
}
|
|
71
|
-
|
|
72
56
|
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
73
57
|
var appBuildJob = buildConfig.buildCommand !== null ? (0, createBuildJob_1.createBuildJob)(context, {
|
|
74
58
|
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read(getMeteorCache(context)), false),
|
|
@@ -89,5 +73,4 @@ var createMeteorBuildJobs = function (context) {
|
|
|
89
73
|
needs: appBuildJob ? [constants_1.APP_BUILD_JOB_NAME] : []
|
|
90
74
|
})], false);
|
|
91
75
|
};
|
|
92
|
-
|
|
93
76
|
exports.createMeteorBuildJobs = createMeteorBuildJobs;
|
|
@@ -4,24 +4,19 @@ var __assign = this && this.__assign || function () {
|
|
|
4
4
|
__assign = Object.assign || function (t) {
|
|
5
5
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
6
|
s = arguments[i];
|
|
7
|
-
|
|
8
7
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return t;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
return __assign.apply(this, arguments);
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
var __read = this && this.__read || function (o, n) {
|
|
18
14
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
15
|
if (!m) return o;
|
|
20
16
|
var i = m.call(o),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
r,
|
|
18
|
+
ar = [],
|
|
19
|
+
e;
|
|
25
20
|
try {
|
|
26
21
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
22
|
} catch (error) {
|
|
@@ -35,10 +30,8 @@ var __read = this && this.__read || function (o, n) {
|
|
|
35
30
|
if (e) throw e.error;
|
|
36
31
|
}
|
|
37
32
|
}
|
|
38
|
-
|
|
39
33
|
return ar;
|
|
40
34
|
};
|
|
41
|
-
|
|
42
35
|
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
43
36
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
44
37
|
if (ar || !(i in from)) {
|
|
@@ -48,28 +41,19 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
48
41
|
}
|
|
49
42
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
50
43
|
};
|
|
51
|
-
|
|
52
44
|
exports.__esModule = true;
|
|
53
45
|
exports.createNodeTestJobs = void 0;
|
|
54
|
-
|
|
55
46
|
var runner_1 = require("../../runner");
|
|
56
|
-
|
|
57
47
|
var utils_1 = require("../../utils");
|
|
58
|
-
|
|
59
48
|
var cache_1 = require("./cache");
|
|
60
|
-
|
|
61
49
|
var constants_1 = require("./constants");
|
|
62
|
-
|
|
63
50
|
var yarn_1 = require("./yarn");
|
|
64
|
-
|
|
65
51
|
var createNodeTestJobs = function (context) {
|
|
66
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
67
|
-
|
|
68
|
-
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
53
|
+
// don't run tests after release
|
|
69
54
|
if (((_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.trigger) === "taggedRelease") {
|
|
70
55
|
return [];
|
|
71
56
|
}
|
|
72
|
-
|
|
73
57
|
var buildConfig = context.componentConfig.build;
|
|
74
58
|
var base = {
|
|
75
59
|
variables: __assign(__assign({
|
|
@@ -103,5 +87,4 @@ var createNodeTestJobs = function (context) {
|
|
|
103
87
|
}) : null;
|
|
104
88
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
105
89
|
};
|
|
106
|
-
|
|
107
90
|
exports.createNodeTestJobs = createNodeTestJobs;
|
package/dist/build/node/yarn.js
CHANGED
|
@@ -4,10 +4,9 @@ var __read = this && this.__read || function (o, n) {
|
|
|
4
4
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
5
|
if (!m) return o;
|
|
6
6
|
var i = m.call(o),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
r,
|
|
8
|
+
ar = [],
|
|
9
|
+
e;
|
|
11
10
|
try {
|
|
12
11
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
13
12
|
} catch (error) {
|
|
@@ -21,10 +20,8 @@ var __read = this && this.__read || function (o, n) {
|
|
|
21
20
|
if (e) throw e.error;
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
return ar;
|
|
26
24
|
};
|
|
27
|
-
|
|
28
25
|
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
29
26
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
27
|
if (ar || !(i in from)) {
|
|
@@ -34,39 +31,29 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
34
31
|
}
|
|
35
32
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
33
|
};
|
|
37
|
-
|
|
38
34
|
exports.__esModule = true;
|
|
39
35
|
exports.getYarnInstall = exports.ensureNodeVersion = exports.getYarnInstallCommand = void 0;
|
|
40
|
-
|
|
41
36
|
var getYarnInstallCommand = function (context, options) {
|
|
42
37
|
var _a;
|
|
43
|
-
|
|
44
38
|
if ((_a = context.packageManagerInfo) === null || _a === void 0 ? void 0 : _a.isClassic) {
|
|
45
39
|
return "yarn install --frozen-lockfile ".concat((options === null || options === void 0 ? void 0 : options.prodOnly) ? "--production" : "", " ").concat((options === null || options === void 0 ? void 0 : options.noScripts) ? "--ignore-scripts" : "");
|
|
46
|
-
}
|
|
40
|
+
}
|
|
41
|
+
// is modern
|
|
47
42
|
// yarn >= 4 ships with build in plugins, see https://github.com/yarnpkg/berry/pull/4253
|
|
48
43
|
// trying to import those fail on this version
|
|
49
|
-
|
|
50
|
-
|
|
51
44
|
var doesNotShipWithBuiltInPlugins = ["2", "3"].some(function (v) {
|
|
52
45
|
var _a;
|
|
53
|
-
|
|
54
46
|
return (_a = context.packageManagerInfo) === null || _a === void 0 ? void 0 : _a.version.startsWith(v);
|
|
55
47
|
});
|
|
56
48
|
return (options === null || options === void 0 ? void 0 : options.prodOnly) ? "".concat((options === null || options === void 0 ? void 0 : options.noScripts) ? "YARN_ENABLE_SCRIPTS=false " : "").concat(doesNotShipWithBuiltInPlugins ? "yarn plugin import workspace-tools && " : " ", "yarn workspaces focus --production && yarn rebuild") // needs yarn plugin import workspace-tools
|
|
57
49
|
: "".concat((options === null || options === void 0 ? void 0 : options.noScripts) ? "YARN_ENABLE_SCRIPTS=false " : "", "yarn install --immutable");
|
|
58
50
|
};
|
|
59
|
-
|
|
60
51
|
exports.getYarnInstallCommand = getYarnInstallCommand;
|
|
61
|
-
|
|
62
52
|
var ensureNodeVersion = function (context) {
|
|
63
53
|
return ["if [ -f ./.nvmrc ]; then source /root/.nvm/nvm.sh && nvm install <<< .nvmrc; fi"];
|
|
64
54
|
};
|
|
65
|
-
|
|
66
55
|
exports.ensureNodeVersion = ensureNodeVersion;
|
|
67
|
-
|
|
68
56
|
var getYarnInstall = function (context) {
|
|
69
57
|
return __spreadArray(__spreadArray([], __read((0, exports.ensureNodeVersion)(context)), false), [(0, exports.getYarnInstallCommand)(context)], false);
|
|
70
58
|
};
|
|
71
|
-
|
|
72
59
|
exports.getYarnInstall = getYarnInstall;
|
|
@@ -4,21 +4,15 @@ var __assign = this && this.__assign || function () {
|
|
|
4
4
|
__assign = Object.assign || function (t) {
|
|
5
5
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
6
|
s = arguments[i];
|
|
7
|
-
|
|
8
7
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return t;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
return __assign.apply(this, arguments);
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
exports.__esModule = true;
|
|
18
14
|
exports.createRailsBuildJobs = void 0;
|
|
19
|
-
|
|
20
15
|
var docker_1 = require("../docker");
|
|
21
|
-
|
|
22
16
|
var createRailsBuildJobs = function (context) {
|
|
23
17
|
return [(0, docker_1.createDockerBuildJobBase)(context, {
|
|
24
18
|
variables: __assign({
|
|
@@ -28,9 +22,9 @@ var createRailsBuildJobs = function (context) {
|
|
|
28
22
|
CNB_PACK_VERSION: "0.20.0"
|
|
29
23
|
}, context.componentConfig.build.extraVars),
|
|
30
24
|
// custom script
|
|
31
|
-
script: [docker_1.gitlabDockerLogin, "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v$CNB_PACK_VERSION/pack-v$CNB_PACK_VERSION-linux.tgz | tar -zx --directory /usr/local/bin pack", "chmod +x /usr/local/bin/pack",
|
|
25
|
+
script: [docker_1.gitlabDockerLogin, "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v$CNB_PACK_VERSION/pack-v$CNB_PACK_VERSION-linux.tgz | tar -zx --directory /usr/local/bin pack", "chmod +x /usr/local/bin/pack",
|
|
26
|
+
// replace private git ssh gem sources with https to make bundler with credentials via env var work
|
|
32
27
|
"sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "for v in $CNB_ENV_VARS; do env_args=\"$env_args --env $v\"; done", "pack build $DOCKER_IMAGE:$DOCKER_IMAGE_TAG --builder $CNB_BUILDER --publish --cache-image $DOCKER_CACHE_IMAGE $env_args $CNB_EXTRA_ARGS"]
|
|
33
28
|
})];
|
|
34
29
|
};
|
|
35
|
-
|
|
36
30
|
exports.createRailsBuildJobs = createRailsBuildJobs;
|
|
@@ -4,10 +4,9 @@ var __read = this && this.__read || function (o, n) {
|
|
|
4
4
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
5
|
if (!m) return o;
|
|
6
6
|
var i = m.call(o),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
r,
|
|
8
|
+
ar = [],
|
|
9
|
+
e;
|
|
11
10
|
try {
|
|
12
11
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
13
12
|
} catch (error) {
|
|
@@ -21,10 +20,8 @@ var __read = this && this.__read || function (o, n) {
|
|
|
21
20
|
if (e) throw e.error;
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
return ar;
|
|
26
24
|
};
|
|
27
|
-
|
|
28
25
|
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
29
26
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
30
27
|
if (ar || !(i in from)) {
|
|
@@ -34,16 +31,11 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
34
31
|
}
|
|
35
32
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
36
33
|
};
|
|
37
|
-
|
|
38
34
|
exports.__esModule = true;
|
|
39
35
|
exports.createRailsJobs = void 0;
|
|
40
|
-
|
|
41
36
|
var build_1 = require("./build");
|
|
42
|
-
|
|
43
37
|
var test_1 = require("./test");
|
|
44
|
-
|
|
45
38
|
var createRailsJobs = function (context) {
|
|
46
39
|
return __spreadArray(__spreadArray([], __read((0, test_1.createRailsTestJobs)(context)), false), __read((0, build_1.createRailsBuildJobs)(context)), false);
|
|
47
40
|
};
|
|
48
|
-
|
|
49
41
|
exports.createRailsJobs = createRailsJobs;
|
package/dist/build/rails/test.js
CHANGED
|
@@ -4,24 +4,19 @@ var __assign = this && this.__assign || function () {
|
|
|
4
4
|
__assign = Object.assign || function (t) {
|
|
5
5
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
6
|
s = arguments[i];
|
|
7
|
-
|
|
8
7
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
9
8
|
}
|
|
10
|
-
|
|
11
9
|
return t;
|
|
12
10
|
};
|
|
13
|
-
|
|
14
11
|
return __assign.apply(this, arguments);
|
|
15
12
|
};
|
|
16
|
-
|
|
17
13
|
var __read = this && this.__read || function (o, n) {
|
|
18
14
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
19
15
|
if (!m) return o;
|
|
20
16
|
var i = m.call(o),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
r,
|
|
18
|
+
ar = [],
|
|
19
|
+
e;
|
|
25
20
|
try {
|
|
26
21
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
27
22
|
} catch (error) {
|
|
@@ -35,10 +30,8 @@ var __read = this && this.__read || function (o, n) {
|
|
|
35
30
|
if (e) throw e.error;
|
|
36
31
|
}
|
|
37
32
|
}
|
|
38
|
-
|
|
39
33
|
return ar;
|
|
40
34
|
};
|
|
41
|
-
|
|
42
35
|
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
43
36
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
44
37
|
if (ar || !(i in from)) {
|
|
@@ -48,20 +41,15 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
48
41
|
}
|
|
49
42
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
50
43
|
};
|
|
51
|
-
|
|
52
44
|
exports.__esModule = true;
|
|
53
45
|
exports.createRailsTestJobs = void 0;
|
|
54
|
-
|
|
55
46
|
var utils_1 = require("../../utils");
|
|
56
|
-
|
|
57
47
|
var createRailsTestJobs = function (context) {
|
|
58
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
59
|
-
|
|
60
|
-
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
49
|
+
// don't run tests after release
|
|
61
50
|
if (((_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.trigger) === "taggedRelease") {
|
|
62
51
|
return [];
|
|
63
52
|
}
|
|
64
|
-
|
|
65
53
|
var buildConfig = context.componentConfig.build;
|
|
66
54
|
var base = {
|
|
67
55
|
variables: (_b = buildConfig.extraVars) !== null && _b !== void 0 ? _b : {},
|
|
@@ -103,5 +91,4 @@ var createRailsTestJobs = function (context) {
|
|
|
103
91
|
}) : null;
|
|
104
92
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
105
93
|
};
|
|
106
|
-
|
|
107
94
|
exports.createRailsTestJobs = createRailsTestJobs;
|
package/dist/build/types.d.ts
CHANGED
|
@@ -7,17 +7,14 @@ export declare type BuildConfigBase = {
|
|
|
7
7
|
/**
|
|
8
8
|
* additional env vars for the buid jobs
|
|
9
9
|
*/
|
|
10
|
-
|
|
11
10
|
extraVars?: Record<string, string>;
|
|
12
11
|
/**
|
|
13
12
|
* define the build command
|
|
14
13
|
*/
|
|
15
|
-
|
|
16
14
|
buildCommand?: string | string[] | null;
|
|
17
15
|
/**
|
|
18
16
|
* customize docker build
|
|
19
17
|
*/
|
|
20
|
-
|
|
21
18
|
docker?: {
|
|
22
19
|
additionsBegin?: string[];
|
|
23
20
|
additionsEnd?: string[];
|
|
@@ -25,7 +22,6 @@ export declare type BuildConfigBase = {
|
|
|
25
22
|
/**
|
|
26
23
|
* customize lint, set false to disable
|
|
27
24
|
*/
|
|
28
|
-
|
|
29
25
|
lint?: false | {
|
|
30
26
|
command?: string | string[];
|
|
31
27
|
jobImage?: string;
|
|
@@ -33,7 +29,6 @@ export declare type BuildConfigBase = {
|
|
|
33
29
|
/**
|
|
34
30
|
* customize test, set false to disable
|
|
35
31
|
*/
|
|
36
|
-
|
|
37
32
|
test?: false | {
|
|
38
33
|
command?: string | string[];
|
|
39
34
|
jobImage?: string;
|
|
@@ -41,7 +36,6 @@ export declare type BuildConfigBase = {
|
|
|
41
36
|
/**
|
|
42
37
|
* customize audit, set false to disable
|
|
43
38
|
*/
|
|
44
|
-
|
|
45
39
|
audit?: false | {
|
|
46
40
|
command?: string | string[];
|
|
47
41
|
jobImage?: string;
|
|
@@ -50,13 +44,11 @@ export declare type BuildConfigBase = {
|
|
|
50
44
|
* additional paths for artifacts,
|
|
51
45
|
* by default "dist" and ".next" are allways included
|
|
52
46
|
*/
|
|
53
|
-
|
|
54
47
|
artifactsPaths?: string[];
|
|
55
48
|
/**
|
|
56
49
|
* additional CI/CD artifacts reports,
|
|
57
50
|
* use to display information in merge requests, pipeline views and security dashboards.
|
|
58
51
|
*/
|
|
59
|
-
|
|
60
52
|
artifactsReports?: {
|
|
61
53
|
/**
|
|
62
54
|
* The junit report collects JUnit report format XML files.
|
|
@@ -81,7 +73,6 @@ export declare type BuildConfigMeteor = BuildConfigNodeBase & {
|
|
|
81
73
|
* whether to run yarn install inside the source folder in the docker image.
|
|
82
74
|
* This is only required if you have custom scripts in your image
|
|
83
75
|
*/
|
|
84
|
-
|
|
85
76
|
installScripts?: boolean;
|
|
86
77
|
};
|
|
87
78
|
export declare type BuildConfigCustomDocker = BuildConfigBase["docker"] & ({
|
package/dist/build/types.js
CHANGED
|
@@ -2,15 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.isOfBuildType = void 0;
|
|
5
|
-
|
|
6
5
|
var isOfBuildType = function (t) {
|
|
7
6
|
var types = [];
|
|
8
|
-
|
|
9
7
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
10
8
|
types[_i - 1] = arguments[_i];
|
|
11
9
|
}
|
|
12
|
-
|
|
13
10
|
return types.includes(t.type);
|
|
14
11
|
};
|
|
15
|
-
|
|
16
12
|
exports.isOfBuildType = isOfBuildType;
|