@catladder/cli 0.0.0-main-c009adef โ 0.0.0-main-8a8ce056
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/bundles/catenv/index.js +23 -23
- package/dist/bundles/cli/index.js +23 -23
- package/dist/pipeline/src/build/base/createAppBuildJob.js +1 -1
- package/dist/pipeline/src/build/base/createAppBuildJob.js.map +1 -1
- package/dist/pipeline/src/build/node/buildJob.js +6 -7
- package/dist/pipeline/src/build/node/buildJob.js.map +1 -1
- package/dist/pipeline/src/build/node/cache.d.ts +4 -4
- package/dist/pipeline/src/build/node/cache.js +5 -5
- package/dist/pipeline/src/build/node/cache.js.map +1 -1
- package/dist/pipeline/src/build/node/meteor.js +2 -2
- package/dist/pipeline/src/build/node/meteor.js.map +1 -1
- package/dist/pipeline/src/build/node/testJob.js +4 -4
- package/dist/pipeline/src/build/node/testJob.js.map +1 -1
- package/dist/pipeline/src/build/node/yarn.d.ts +4 -4
- package/dist/pipeline/src/build/node/yarn.js +3 -1
- package/dist/pipeline/src/build/node/yarn.js.map +1 -1
- package/dist/pipeline/src/build/sbom.js +1 -1
- package/dist/pipeline/src/build/sbom.js.map +1 -1
- package/dist/pipeline/src/context/createComponentContext.js +0 -1
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/deploy/custom/deployJob.js +1 -1
- package/dist/pipeline/src/deploy/custom/deployJob.js.map +1 -1
- package/dist/pipeline/src/types/context.d.ts +0 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -2284,7 +2284,7 @@ var createAppBuildJob = function (context, _a) {
|
|
|
2284
2284
|
runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), (runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {})), ((_c = context.build.config.runnerVariables) !== null && _c !== void 0 ? _c : {})),
|
|
2285
2285
|
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(context)
|
|
2286
2286
|
? (0, writeDotEnv_1.writeDotEnv)(context)
|
|
2287
|
-
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context
|
|
2287
|
+
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
2288
2288
|
"cd ".concat(context.build.dir)
|
|
2289
2289
|
], false), __read(((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : [])), false),
|
|
2290
2290
|
artifacts: {
|
|
@@ -3020,19 +3020,18 @@ var createNodeBuildJobs = function (context) {
|
|
|
3020
3020
|
throw new Error("deploy config is not node, node-static or storybook");
|
|
3021
3021
|
}
|
|
3022
3022
|
var defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
|
|
3023
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
3023
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
3024
3024
|
return (0, base_1.createBuildJobs)(context, {
|
|
3025
3025
|
appBuild: buildConfig.buildCommand !== null
|
|
3026
3026
|
? {
|
|
3027
3027
|
image: (_a = buildConfig.jobImage) !== null && _a !== void 0 ? _a : defaultImage,
|
|
3028
3028
|
runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
3029
|
-
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context
|
|
3029
|
+
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context)), false), __read((0, cache_1.getNextCache)(context)), false),
|
|
3030
3030
|
script: __spreadArray(__spreadArray([], __read(yarnInstall), false), __read(((_c = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _c !== void 0 ? _c : [])), false),
|
|
3031
3031
|
artifacts: {
|
|
3032
3032
|
paths: __spreadArray([
|
|
3033
3033
|
context.build.dir
|
|
3034
|
-
], __read(((_d = context.
|
|
3035
|
-
.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
3034
|
+
], __read(((_d = context.packageManagerInfo.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
3036
3035
|
var _a, _b;
|
|
3037
3036
|
return __spreadArray([
|
|
3038
3037
|
(0, path_1.join)(dir, "__build_info.json"),
|
|
@@ -3052,11 +3051,11 @@ var createNodeBuildJobs = function (context) {
|
|
|
3052
3051
|
script: (0, docker_1.getDockerBuildScriptWithBuiltInDockerFile)(context, buildConfig.type === "node-static" || buildConfig.type === "storybook"
|
|
3053
3052
|
? "nginx"
|
|
3054
3053
|
: "node"),
|
|
3055
|
-
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context
|
|
3054
|
+
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
|
|
3056
3055
|
variables: {
|
|
3057
3056
|
// only required for non static
|
|
3058
|
-
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context
|
|
3059
|
-
DOCKER_COPY_WORKSPACE_FILES: (_e = context.
|
|
3057
|
+
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context),
|
|
3058
|
+
DOCKER_COPY_WORKSPACE_FILES: (_e = context.packageManagerInfo.pathsToCopyInDocker
|
|
3060
3059
|
.map(function (dir) { return "COPY --chown=node:node ".concat(dir, " /app/").concat(dir); })) === null || _e === void 0 ? void 0 : _e.join("\n"),
|
|
3061
3060
|
},
|
|
3062
3061
|
},
|
|
@@ -3102,9 +3101,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3102
3101
|
};
|
|
3103
3102
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3104
3103
|
exports.getNextCache = exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
|
|
3104
|
+
var lodash_1 = __nccwpck_require__(3255);
|
|
3105
3105
|
var path_1 = __nccwpck_require__(1017);
|
|
3106
3106
|
var slugify_1 = __importDefault(__nccwpck_require__(4035));
|
|
3107
|
-
var lodash_1 = __nccwpck_require__(3255);
|
|
3108
3107
|
var getYarnCache = function (context, policy) {
|
|
3109
3108
|
if (policy === void 0) { policy = "pull-push"; }
|
|
3110
3109
|
var componentIsInWorkspace = context.packageManagerInfo.componentIsInWorkspace;
|
|
@@ -3116,9 +3115,9 @@ var getYarnCache = function (context, policy) {
|
|
|
3116
3115
|
paths: [".yarn"],
|
|
3117
3116
|
}
|
|
3118
3117
|
: {
|
|
3119
|
-
key: (0, slugify_1.default)(context.dir) + "-yarn",
|
|
3118
|
+
key: (0, slugify_1.default)(context.build.dir) + "-yarn",
|
|
3120
3119
|
policy: policy,
|
|
3121
|
-
paths: [(0, path_1.join)(context.dir, ".yarn")],
|
|
3120
|
+
paths: [(0, path_1.join)(context.build.dir, ".yarn")],
|
|
3122
3121
|
},
|
|
3123
3122
|
];
|
|
3124
3123
|
};
|
|
@@ -3134,7 +3133,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
3134
3133
|
// if component is in a shared workspace, use workspace cache. use individual cache else
|
|
3135
3134
|
key: componentIsInWorkspace
|
|
3136
3135
|
? "node-modules-workspace"
|
|
3137
|
-
: (0, slugify_1.default)(context.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
3136
|
+
: (0, slugify_1.default)(context.build.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
3138
3137
|
policy: policy,
|
|
3139
3138
|
paths: __spreadArray([], __read((componentIsInWorkspace
|
|
3140
3139
|
? (0, lodash_1.uniq)(__spreadArray([
|
|
@@ -3142,7 +3141,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
3142
3141
|
], __read(((_a = context.packageManagerInfo.workspaces.map(function (w) {
|
|
3143
3142
|
return (0, path_1.join)(w.location, "node_modules");
|
|
3144
3143
|
})) !== null && _a !== void 0 ? _a : [])), false))
|
|
3145
|
-
: [(0, path_1.join)(context.dir, "node_modules")])), false),
|
|
3144
|
+
: [(0, path_1.join)(context.build.dir, "node_modules")])), false),
|
|
3146
3145
|
},
|
|
3147
3146
|
];
|
|
3148
3147
|
};
|
|
@@ -3287,11 +3286,11 @@ var createMeteorBuildJobs = function (context) {
|
|
|
3287
3286
|
if (!(0, types_1.isOfBuildType)(buildConfig, "meteor")) {
|
|
3288
3287
|
throw new Error("deploy config is not meteor");
|
|
3289
3288
|
}
|
|
3290
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
3289
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
3291
3290
|
return (0, base_1.createBuildJobs)(context, {
|
|
3292
3291
|
appBuild: buildConfig.buildCommand !== null
|
|
3293
3292
|
? {
|
|
3294
|
-
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context
|
|
3293
|
+
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read(getMeteorCache(context)), false),
|
|
3295
3294
|
image: (0, runner_1.getRunnerImage)("jobs-meteor"),
|
|
3296
3295
|
variables: {
|
|
3297
3296
|
METEOR_DISABLE_OPTIMISTIC_CACHING: "1", // see https://forums.meteor.com/t/veeery-long-building-time-inside-docker-container/58673/17?u=macrozone
|
|
@@ -3389,21 +3388,21 @@ var createNodeTestJobs = function (context) {
|
|
|
3389
3388
|
needs: [],
|
|
3390
3389
|
envMode: "none",
|
|
3391
3390
|
};
|
|
3392
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
3391
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
3393
3392
|
var auditJob = buildConfig.audit !== false
|
|
3394
3393
|
? __assign(__assign(__assign({ name: "๐ก audit" }, base), { image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage, cache: undefined, script: __spreadArray([
|
|
3395
3394
|
"cd ".concat(context.build.dir)
|
|
3396
3395
|
], __read(((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
|
|
3397
|
-
context.
|
|
3396
|
+
context.packageManagerInfo.isClassic
|
|
3398
3397
|
? "yarn audit"
|
|
3399
3398
|
: "yarn npm audit --environment production", // yarn 2
|
|
3400
3399
|
])), false), allow_failure: true }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifactsReports, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifacts)) : null;
|
|
3401
3400
|
var lintJob = buildConfig.lint !== false
|
|
3402
|
-
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context
|
|
3401
|
+
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
3403
3402
|
"cd ".concat(context.build.dir)
|
|
3404
3403
|
], false), __read(yarnInstall), false), __read(((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifactsReports, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifacts)) : null;
|
|
3405
3404
|
var testJob = buildConfig.test !== false
|
|
3406
|
-
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context
|
|
3405
|
+
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
3407
3406
|
"cd ".concat(context.build.dir)
|
|
3408
3407
|
], false), __read(yarnInstall), false), __read(((_s = (0, utils_1.ensureArray)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifactsReports, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifacts)) : null;
|
|
3409
3408
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -3466,7 +3465,9 @@ var ensureNodeVersion = function (context) {
|
|
|
3466
3465
|
exports.ensureNodeVersion = ensureNodeVersion;
|
|
3467
3466
|
var getYarnInstall = function (context, options) {
|
|
3468
3467
|
var _a;
|
|
3469
|
-
var postInstall = "postInstall" in context.
|
|
3468
|
+
var postInstall = "postInstall" in context.build.config
|
|
3469
|
+
? context.build.config.postInstall
|
|
3470
|
+
: null;
|
|
3470
3471
|
return __spreadArray(__spreadArray(__spreadArray([], __read((0, exports.ensureNodeVersion)(context)), false), __read((0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([getYarnInstallCommand(context)])), false), __read((postInstall && !(options === null || options === void 0 ? void 0 : options.noCustomPostInstall)
|
|
3471
3472
|
? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((_a = (0, utils_1.ensureArray)(postInstall)) !== null && _a !== void 0 ? _a : [])
|
|
3472
3473
|
: [])), false);
|
|
@@ -3739,7 +3740,7 @@ var createSbomBuildJob = function (context) {
|
|
|
3739
3740
|
var buildConfig = context.build.config;
|
|
3740
3741
|
var defaultImage = "aquasec/trivy:0.38.3";
|
|
3741
3742
|
var defaultScript = [
|
|
3742
|
-
"trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.
|
|
3743
|
+
"trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.packageManagerInfo.componentIsInWorkspace
|
|
3743
3744
|
? "."
|
|
3744
3745
|
: context.build.dir),
|
|
3745
3746
|
];
|
|
@@ -4045,7 +4046,6 @@ var createComponentContext = function (ctx) { return __awaiter(void 0, void 0, v
|
|
|
4045
4046
|
componentConfig: componentConfig,
|
|
4046
4047
|
build: {
|
|
4047
4048
|
dir: dir,
|
|
4048
|
-
packageManagerInfo: packageManagerInfo,
|
|
4049
4049
|
config: build,
|
|
4050
4050
|
},
|
|
4051
4051
|
deploy: deploy
|
|
@@ -6425,7 +6425,7 @@ var createCustomDeployJobs = function (context) {
|
|
|
6425
6425
|
throw new Error("deploy config is not custom");
|
|
6426
6426
|
}
|
|
6427
6427
|
// FIXME: custom deploy currently assumes yarn-based project
|
|
6428
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
6428
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context, {
|
|
6429
6429
|
noCustomPostInstall: true,
|
|
6430
6430
|
});
|
|
6431
6431
|
return (0, base_1.createDeployementJobs)(context, {
|
|
@@ -9728,7 +9728,7 @@ var createAppBuildJob = function (context, _a) {
|
|
|
9728
9728
|
runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), (runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {})), ((_c = context.build.config.runnerVariables) !== null && _c !== void 0 ? _c : {})),
|
|
9729
9729
|
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(context)
|
|
9730
9730
|
? (0, writeDotEnv_1.writeDotEnv)(context)
|
|
9731
|
-
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context
|
|
9731
|
+
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
9732
9732
|
"cd ".concat(context.build.dir)
|
|
9733
9733
|
], false), __read(((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : [])), false),
|
|
9734
9734
|
artifacts: {
|
|
@@ -10464,19 +10464,18 @@ var createNodeBuildJobs = function (context) {
|
|
|
10464
10464
|
throw new Error("deploy config is not node, node-static or storybook");
|
|
10465
10465
|
}
|
|
10466
10466
|
var defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
|
|
10467
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
10467
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
10468
10468
|
return (0, base_1.createBuildJobs)(context, {
|
|
10469
10469
|
appBuild: buildConfig.buildCommand !== null
|
|
10470
10470
|
? {
|
|
10471
10471
|
image: (_a = buildConfig.jobImage) !== null && _a !== void 0 ? _a : defaultImage,
|
|
10472
10472
|
runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
10473
|
-
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context
|
|
10473
|
+
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context)), false), __read((0, cache_1.getNextCache)(context)), false),
|
|
10474
10474
|
script: __spreadArray(__spreadArray([], __read(yarnInstall), false), __read(((_c = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _c !== void 0 ? _c : [])), false),
|
|
10475
10475
|
artifacts: {
|
|
10476
10476
|
paths: __spreadArray([
|
|
10477
10477
|
context.build.dir
|
|
10478
|
-
], __read(((_d = context.
|
|
10479
|
-
.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
10478
|
+
], __read(((_d = context.packageManagerInfo.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
10480
10479
|
var _a, _b;
|
|
10481
10480
|
return __spreadArray([
|
|
10482
10481
|
(0, path_1.join)(dir, "__build_info.json"),
|
|
@@ -10496,11 +10495,11 @@ var createNodeBuildJobs = function (context) {
|
|
|
10496
10495
|
script: (0, docker_1.getDockerBuildScriptWithBuiltInDockerFile)(context, buildConfig.type === "node-static" || buildConfig.type === "storybook"
|
|
10497
10496
|
? "nginx"
|
|
10498
10497
|
: "node"),
|
|
10499
|
-
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context
|
|
10498
|
+
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
|
|
10500
10499
|
variables: {
|
|
10501
10500
|
// only required for non static
|
|
10502
|
-
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context
|
|
10503
|
-
DOCKER_COPY_WORKSPACE_FILES: (_e = context.
|
|
10501
|
+
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context),
|
|
10502
|
+
DOCKER_COPY_WORKSPACE_FILES: (_e = context.packageManagerInfo.pathsToCopyInDocker
|
|
10504
10503
|
.map(function (dir) { return "COPY --chown=node:node ".concat(dir, " /app/").concat(dir); })) === null || _e === void 0 ? void 0 : _e.join("\n"),
|
|
10505
10504
|
},
|
|
10506
10505
|
},
|
|
@@ -10546,9 +10545,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10546
10545
|
};
|
|
10547
10546
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
10548
10547
|
exports.getNextCache = exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
|
|
10548
|
+
var lodash_1 = __nccwpck_require__(23255);
|
|
10549
10549
|
var path_1 = __nccwpck_require__(71017);
|
|
10550
10550
|
var slugify_1 = __importDefault(__nccwpck_require__(44035));
|
|
10551
|
-
var lodash_1 = __nccwpck_require__(23255);
|
|
10552
10551
|
var getYarnCache = function (context, policy) {
|
|
10553
10552
|
if (policy === void 0) { policy = "pull-push"; }
|
|
10554
10553
|
var componentIsInWorkspace = context.packageManagerInfo.componentIsInWorkspace;
|
|
@@ -10560,9 +10559,9 @@ var getYarnCache = function (context, policy) {
|
|
|
10560
10559
|
paths: [".yarn"],
|
|
10561
10560
|
}
|
|
10562
10561
|
: {
|
|
10563
|
-
key: (0, slugify_1.default)(context.dir) + "-yarn",
|
|
10562
|
+
key: (0, slugify_1.default)(context.build.dir) + "-yarn",
|
|
10564
10563
|
policy: policy,
|
|
10565
|
-
paths: [(0, path_1.join)(context.dir, ".yarn")],
|
|
10564
|
+
paths: [(0, path_1.join)(context.build.dir, ".yarn")],
|
|
10566
10565
|
},
|
|
10567
10566
|
];
|
|
10568
10567
|
};
|
|
@@ -10578,7 +10577,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
10578
10577
|
// if component is in a shared workspace, use workspace cache. use individual cache else
|
|
10579
10578
|
key: componentIsInWorkspace
|
|
10580
10579
|
? "node-modules-workspace"
|
|
10581
|
-
: (0, slugify_1.default)(context.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
10580
|
+
: (0, slugify_1.default)(context.build.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
10582
10581
|
policy: policy,
|
|
10583
10582
|
paths: __spreadArray([], __read((componentIsInWorkspace
|
|
10584
10583
|
? (0, lodash_1.uniq)(__spreadArray([
|
|
@@ -10586,7 +10585,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
10586
10585
|
], __read(((_a = context.packageManagerInfo.workspaces.map(function (w) {
|
|
10587
10586
|
return (0, path_1.join)(w.location, "node_modules");
|
|
10588
10587
|
})) !== null && _a !== void 0 ? _a : [])), false))
|
|
10589
|
-
: [(0, path_1.join)(context.dir, "node_modules")])), false),
|
|
10588
|
+
: [(0, path_1.join)(context.build.dir, "node_modules")])), false),
|
|
10590
10589
|
},
|
|
10591
10590
|
];
|
|
10592
10591
|
};
|
|
@@ -10731,11 +10730,11 @@ var createMeteorBuildJobs = function (context) {
|
|
|
10731
10730
|
if (!(0, types_1.isOfBuildType)(buildConfig, "meteor")) {
|
|
10732
10731
|
throw new Error("deploy config is not meteor");
|
|
10733
10732
|
}
|
|
10734
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
10733
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
10735
10734
|
return (0, base_1.createBuildJobs)(context, {
|
|
10736
10735
|
appBuild: buildConfig.buildCommand !== null
|
|
10737
10736
|
? {
|
|
10738
|
-
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context
|
|
10737
|
+
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read(getMeteorCache(context)), false),
|
|
10739
10738
|
image: (0, runner_1.getRunnerImage)("jobs-meteor"),
|
|
10740
10739
|
variables: {
|
|
10741
10740
|
METEOR_DISABLE_OPTIMISTIC_CACHING: "1", // see https://forums.meteor.com/t/veeery-long-building-time-inside-docker-container/58673/17?u=macrozone
|
|
@@ -10833,21 +10832,21 @@ var createNodeTestJobs = function (context) {
|
|
|
10833
10832
|
needs: [],
|
|
10834
10833
|
envMode: "none",
|
|
10835
10834
|
};
|
|
10836
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
10835
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
10837
10836
|
var auditJob = buildConfig.audit !== false
|
|
10838
10837
|
? __assign(__assign(__assign({ name: "๐ก audit" }, base), { image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage, cache: undefined, script: __spreadArray([
|
|
10839
10838
|
"cd ".concat(context.build.dir)
|
|
10840
10839
|
], __read(((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
|
|
10841
|
-
context.
|
|
10840
|
+
context.packageManagerInfo.isClassic
|
|
10842
10841
|
? "yarn audit"
|
|
10843
10842
|
: "yarn npm audit --environment production", // yarn 2
|
|
10844
10843
|
])), false), allow_failure: true }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifactsReports, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifacts)) : null;
|
|
10845
10844
|
var lintJob = buildConfig.lint !== false
|
|
10846
|
-
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context
|
|
10845
|
+
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
10847
10846
|
"cd ".concat(context.build.dir)
|
|
10848
10847
|
], false), __read(yarnInstall), false), __read(((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifactsReports, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifacts)) : null;
|
|
10849
10848
|
var testJob = buildConfig.test !== false
|
|
10850
|
-
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context
|
|
10849
|
+
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
10851
10850
|
"cd ".concat(context.build.dir)
|
|
10852
10851
|
], false), __read(yarnInstall), false), __read(((_s = (0, utils_1.ensureArray)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifactsReports, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifacts)) : null;
|
|
10853
10852
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -10910,7 +10909,9 @@ var ensureNodeVersion = function (context) {
|
|
|
10910
10909
|
exports.ensureNodeVersion = ensureNodeVersion;
|
|
10911
10910
|
var getYarnInstall = function (context, options) {
|
|
10912
10911
|
var _a;
|
|
10913
|
-
var postInstall = "postInstall" in context.
|
|
10912
|
+
var postInstall = "postInstall" in context.build.config
|
|
10913
|
+
? context.build.config.postInstall
|
|
10914
|
+
: null;
|
|
10914
10915
|
return __spreadArray(__spreadArray(__spreadArray([], __read((0, exports.ensureNodeVersion)(context)), false), __read((0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([getYarnInstallCommand(context)])), false), __read((postInstall && !(options === null || options === void 0 ? void 0 : options.noCustomPostInstall)
|
|
10915
10916
|
? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((_a = (0, utils_1.ensureArray)(postInstall)) !== null && _a !== void 0 ? _a : [])
|
|
10916
10917
|
: [])), false);
|
|
@@ -11183,7 +11184,7 @@ var createSbomBuildJob = function (context) {
|
|
|
11183
11184
|
var buildConfig = context.build.config;
|
|
11184
11185
|
var defaultImage = "aquasec/trivy:0.38.3";
|
|
11185
11186
|
var defaultScript = [
|
|
11186
|
-
"trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.
|
|
11187
|
+
"trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.packageManagerInfo.componentIsInWorkspace
|
|
11187
11188
|
? "."
|
|
11188
11189
|
: context.build.dir),
|
|
11189
11190
|
];
|
|
@@ -11489,7 +11490,6 @@ var createComponentContext = function (ctx) { return __awaiter(void 0, void 0, v
|
|
|
11489
11490
|
componentConfig: componentConfig,
|
|
11490
11491
|
build: {
|
|
11491
11492
|
dir: dir,
|
|
11492
|
-
packageManagerInfo: packageManagerInfo,
|
|
11493
11493
|
config: build,
|
|
11494
11494
|
},
|
|
11495
11495
|
deploy: deploy
|
|
@@ -13869,7 +13869,7 @@ var createCustomDeployJobs = function (context) {
|
|
|
13869
13869
|
throw new Error("deploy config is not custom");
|
|
13870
13870
|
}
|
|
13871
13871
|
// FIXME: custom deploy currently assumes yarn-based project
|
|
13872
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
13872
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context, {
|
|
13873
13873
|
noCustomPostInstall: true,
|
|
13874
13874
|
});
|
|
13875
13875
|
return (0, base_1.createDeployementJobs)(context, {
|
|
@@ -70,7 +70,7 @@ var createAppBuildJob = function (context, _a) {
|
|
|
70
70
|
runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), (runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {})), ((_c = context.build.config.runnerVariables) !== null && _c !== void 0 ? _c : {})),
|
|
71
71
|
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(((0, writeDotEnv_1.componentContextNeedsBuildTimeDotEnv)(context)
|
|
72
72
|
? (0, writeDotEnv_1.writeDotEnv)(context)
|
|
73
|
-
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context
|
|
73
|
+
: [])), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
74
74
|
"cd ".concat(context.build.dir)
|
|
75
75
|
], false), __read(((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : [])), false),
|
|
76
76
|
artifacts: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA+B;AAC/B,6BAA4B;AAE5B,2BAAuC;AAEvC,qCAA0C;AAC1C,qCAAiD;AACjD,yCAGqB;AACrB,mDAAkD;AAClD,6CAGuB;AAGhB,IAAM,iBAAiB,GAAG,UAC/B,OAAyB,EACzB,EAAqE;;IAAnE,IAAA,MAAM,YAAA,EAAE,SAAS,eAAA,EAAE,eAAe,qBAAA,EAAK,GAAG,cAA5C,0CAA8C,CAAF;IAE5C,OAAO,IAAA,cAAK,EACV;QACE,IAAI,EAAE,8BAAkB;QACxB,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAA,kBAAc,EAAC,cAAc,CAAC;QACrC,KAAK,EAAE,EAAE;QACT,KAAK,EAAE,EAAE;QACT,SAAS,0CACJ,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC,GACjB,OAAO,CAAC,WAAW,CAAC,OAAO,GAC3B,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,GAC7C,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,mCAAI,EAAE,CAAC,CAC1C;QACD,eAAe,iCACV,2CAA+B,GAC/B,CAAC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,CAAC,GACvB,CAAC,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,mCAAI,EAAE,CAAC,CAChD;QAED,MAAM,mFACD,CAAC,IAAA,kDAAoC,EAAC,OAAO,CAAC;YAC/C,CAAC,CAAC,IAAA,yBAAW,EAAC,OAAO,CAAC;YACtB,CAAC,CAAC,EAAE,CAAC,kBACJ,IAAA,+BAAc,EAAC,OAAO,CAAC,kBACvB,IAAA,wBAAiB,EAAC,OAAO,CAAC
|
|
1
|
+
{"version":3,"file":"createAppBuildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/base/createAppBuildJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA+B;AAC/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,EAAE;YACT,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;YACrD,OAAO,EAAE;gBACP,KAAK,EAAE,MAAA,MAAA,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,gBAAgB,0CAAE,KAAK,0CAAE,GAAG,CAAC,UAAC,CAAC;oBACzD,OAAA,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;gBAA1B,CAA0B,CAC3B;aACF;SACF;KACF,EACD,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,iBAAiB,qBA4C5B"}
|
|
@@ -42,19 +42,18 @@ var createNodeBuildJobs = function (context) {
|
|
|
42
42
|
throw new Error("deploy config is not node, node-static or storybook");
|
|
43
43
|
}
|
|
44
44
|
var defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
|
|
45
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
45
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
46
46
|
return (0, base_1.createBuildJobs)(context, {
|
|
47
47
|
appBuild: buildConfig.buildCommand !== null
|
|
48
48
|
? {
|
|
49
49
|
image: (_a = buildConfig.jobImage) !== null && _a !== void 0 ? _a : defaultImage,
|
|
50
50
|
runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
51
|
-
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context
|
|
51
|
+
cache: __spreadArray(__spreadArray(__spreadArray([], __read(((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : [])), false), __read((0, cache_1.getNodeCache)(context)), false), __read((0, cache_1.getNextCache)(context)), false),
|
|
52
52
|
script: __spreadArray(__spreadArray([], __read(yarnInstall), false), __read(((_c = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _c !== void 0 ? _c : [])), false),
|
|
53
53
|
artifacts: {
|
|
54
54
|
paths: __spreadArray([
|
|
55
55
|
context.build.dir
|
|
56
|
-
], __read(((_d = context.
|
|
57
|
-
.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
56
|
+
], __read(((_d = context.packageManagerInfo.currentWorkspaceDependencies) !== null && _d !== void 0 ? _d : [])), false).flatMap(function (dir) {
|
|
58
57
|
var _a, _b;
|
|
59
58
|
return __spreadArray([
|
|
60
59
|
(0, path_1.join)(dir, "__build_info.json"),
|
|
@@ -74,11 +73,11 @@ var createNodeBuildJobs = function (context) {
|
|
|
74
73
|
script: (0, docker_1.getDockerBuildScriptWithBuiltInDockerFile)(context, buildConfig.type === "node-static" || buildConfig.type === "storybook"
|
|
75
74
|
? "nginx"
|
|
76
75
|
: "node"),
|
|
77
|
-
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context
|
|
76
|
+
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
|
|
78
77
|
variables: {
|
|
79
78
|
// only required for non static
|
|
80
|
-
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context
|
|
81
|
-
DOCKER_COPY_WORKSPACE_FILES: (_e = context.
|
|
79
|
+
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context),
|
|
80
|
+
DOCKER_COPY_WORKSPACE_FILES: (_e = context.packageManagerInfo.pathsToCopyInDocker
|
|
82
81
|
.map(function (dir) { return "COPY --chown=node:node ".concat(dir, " /app/").concat(dir); })) === null || _e === void 0 ? void 0 : _e.join("\n"),
|
|
83
82
|
},
|
|
84
83
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/buildJob.ts"],"names":[],"mappings":";;;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E,CAAC,CAAC,OAAO;gBACT,CAAC,CAAC,MAAM,CACX;YACD,KAAK,2BAAM,IAAA,oBAAY,EAAC,OAAO,EAAE,MAAM,CAAC,SAAC;YACzC,SAAS,EAAE;gBACT,+BAA+B;gBAC/B,2BAA2B,EAAE,IAAA,qCAA8B,EAAC,OAAO,CAAC;gBACpE,2BAA2B,EACzB,MAAA,OAAO,CAAC,kBAAkB,CAAC,mBAAmB;qBAC3C,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,iCAA0B,GAAG,mBAAS,GAAG,CAAE,EAA3C,CAA2C,CAAC,0CACxD,IAAI,CAAC,IAAI,CAAC;aACjB;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAlEW,QAAA,mBAAmB,uBAkE9B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext, Context } from "../../types/context";
|
|
2
2
|
import type { GitlabJobCache } from "../../types/gitlab-types";
|
|
3
|
-
export declare const getYarnCache: (context:
|
|
4
|
-
export declare const getNodeModulesCache: (context:
|
|
5
|
-
export declare const getNodeCache: (context:
|
|
3
|
+
export declare const getYarnCache: (context: Context, policy?: string) => GitlabJobCache[];
|
|
4
|
+
export declare const getNodeModulesCache: (context: Context, policy?: string) => GitlabJobCache[];
|
|
5
|
+
export declare const getNodeCache: (context: Context, policy?: string) => GitlabJobCache[];
|
|
6
6
|
export declare const getNextCache: (context: ComponentContext) => GitlabJobCache[];
|
|
@@ -29,9 +29,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
29
29
|
};
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
31
|
exports.getNextCache = exports.getNodeCache = exports.getNodeModulesCache = exports.getYarnCache = void 0;
|
|
32
|
+
var lodash_1 = require("lodash");
|
|
32
33
|
var path_1 = require("path");
|
|
33
34
|
var slugify_1 = __importDefault(require("slugify"));
|
|
34
|
-
var lodash_1 = require("lodash");
|
|
35
35
|
var getYarnCache = function (context, policy) {
|
|
36
36
|
if (policy === void 0) { policy = "pull-push"; }
|
|
37
37
|
var componentIsInWorkspace = context.packageManagerInfo.componentIsInWorkspace;
|
|
@@ -43,9 +43,9 @@ var getYarnCache = function (context, policy) {
|
|
|
43
43
|
paths: [".yarn"],
|
|
44
44
|
}
|
|
45
45
|
: {
|
|
46
|
-
key: (0, slugify_1.default)(context.dir) + "-yarn",
|
|
46
|
+
key: (0, slugify_1.default)(context.build.dir) + "-yarn",
|
|
47
47
|
policy: policy,
|
|
48
|
-
paths: [(0, path_1.join)(context.dir, ".yarn")],
|
|
48
|
+
paths: [(0, path_1.join)(context.build.dir, ".yarn")],
|
|
49
49
|
},
|
|
50
50
|
];
|
|
51
51
|
};
|
|
@@ -61,7 +61,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
61
61
|
// if component is in a shared workspace, use workspace cache. use individual cache else
|
|
62
62
|
key: componentIsInWorkspace
|
|
63
63
|
? "node-modules-workspace"
|
|
64
|
-
: (0, slugify_1.default)(context.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
64
|
+
: (0, slugify_1.default)(context.build.dir) + "-node-modules", // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
|
|
65
65
|
policy: policy,
|
|
66
66
|
paths: __spreadArray([], __read((componentIsInWorkspace
|
|
67
67
|
? (0, lodash_1.uniq)(__spreadArray([
|
|
@@ -69,7 +69,7 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
69
69
|
], __read(((_a = context.packageManagerInfo.workspaces.map(function (w) {
|
|
70
70
|
return (0, path_1.join)(w.location, "node_modules");
|
|
71
71
|
})) !== null && _a !== void 0 ? _a : [])), false))
|
|
72
|
-
: [(0, path_1.join)(context.dir, "node_modules")])), false),
|
|
72
|
+
: [(0, path_1.join)(context.build.dir, "node_modules")])), false),
|
|
73
73
|
},
|
|
74
74
|
];
|
|
75
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA4B;AAC5B,oDAA8B;
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA8B;AAC9B,6BAA4B;AAC5B,oDAA8B;AAIvB,IAAM,YAAY,GAAG,UAC1B,OAAgB,EAChB,MAAoB;IAApB,uBAAA,EAAA,oBAAoB;IAEpB,IAAM,sBAAsB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,CAAC;IACpD,OAAO;QACL,sBAAsB;YACpB,CAAC,CAAC;gBACE,GAAG,EAAE,MAAM;gBACX,MAAM,QAAA;gBACN,KAAK,EAAE,CAAC,OAAO,CAAC;aACjB;YACH,CAAC,CAAC;gBACE,GAAG,EAAE,IAAA,iBAAO,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,OAAO;gBACzC,MAAM,QAAA;gBACN,KAAK,EAAE,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;aAC1C;KACN,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,YAAY,gBAmBvB;AAEK,IAAM,mBAAmB,GAAG,UACjC,OAAgB,EAChB,MAAoB;;IAApB,uBAAA,EAAA,oBAAoB;IAEpB,IAAM,sBAAsB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,sBAAsB,CAAC;IAEpD,uNAAuN;IACvN,0HAA0H;IAC1H,OAAO;QACL;YACE,wFAAwF;YACxF,GAAG,EAAE,sBAAsB;gBACzB,CAAC,CAAC,wBAAwB;gBAC1B,CAAC,CAAC,IAAA,iBAAO,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,eAAe,EAAE,+LAA+L;YACjP,MAAM,QAAA;YACN,KAAK,2BACA,CAAC,sBAAsB;gBACxB,CAAC,CAAC,IAAA,aAAI;oBACF,cAAc;0BACX,CAAC,MAAA,OAAO,CAAC,kBAAkB,CAAC,UAAU,CAAC,GAAG,CAAC,UAAC,CAAC;oBAC9C,OAAA,IAAA,WAAI,EAAC,CAAC,CAAC,QAAQ,EAAE,cAAc,CAAC;gBAAhC,CAAgC,CACjC,mCAAI,EAAE,CAAC,UACR;gBACJ,CAAC,CAAC,CAAC,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,SAC/C;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,mBAAmB,uBA4B9B;AACK,IAAM,YAAY,GAAG,UAC1B,OAAgB,EAChB,MAAoB;IAApB,uBAAA,EAAA,oBAAoB;IAEpB,8CACK,IAAA,oBAAY,EAAC,OAAO,EAAE,MAAM,CAAC,kBAC7B,IAAA,2BAAmB,EAAC,OAAO,EAAE,MAAM,CAAC,UACvC;AACJ,CAAC,CAAC;AARW,QAAA,YAAY,gBAQvB;AAEK,IAAM,YAAY,GAAG,UAAC,OAAyB,IAAuB,OAAA;IAC3E;QACE,GAAG,EAAE,OAAO,CAAC,aAAa,GAAG,aAAa;QAC1C,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,GAAG,eAAe,CAAC;KAC7C;CACF,EAN4E,CAM5E,CAAC;AANW,QAAA,YAAY,gBAMvB"}
|
|
@@ -50,11 +50,11 @@ var createMeteorBuildJobs = function (context) {
|
|
|
50
50
|
if (!(0, types_1.isOfBuildType)(buildConfig, "meteor")) {
|
|
51
51
|
throw new Error("deploy config is not meteor");
|
|
52
52
|
}
|
|
53
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
53
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
54
54
|
return (0, base_1.createBuildJobs)(context, {
|
|
55
55
|
appBuild: buildConfig.buildCommand !== null
|
|
56
56
|
? {
|
|
57
|
-
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context
|
|
57
|
+
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read(getMeteorCache(context)), false),
|
|
58
58
|
image: (0, runner_1.getRunnerImage)("jobs-meteor"),
|
|
59
59
|
variables: {
|
|
60
60
|
METEOR_DISABLE_OPTIMISTIC_CACHING: "1", // see https://forums.meteor.com/t/veeery-long-building-time-inside-docker-container/58673/17?u=macrozone
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meteor.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/meteor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6BAA4B;AAC5B,uCAA8C;AAM9C,gCAA0C;AAC1C,oCAAsE;AACtE,kCAAyC;AACzC,iCAAuC;AACvC,+BAAwC;AAExC,IAAM,cAAc,GAAG,UAAC,OAAyB,IAAuB,OAAA;IACtE;QACE,GAAG,EAAE,OAAO,CAAC,aAAa,GAAG,oBAAoB;QACjD,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE;YACL,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,0CAA0C,CAAC;YACnE,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,4BAA4B,CAAC;YACrD,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,wBAAwB,CAAC;YACjD,IAAA,WAAI,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,qCAAqC,CAAC;SAC/D;KACF;CACF,EAXuE,CAWvE,CAAC;AACK,IAAM,qBAAqB,GAAG,UACnC,OAAyB;IAEzB,IAAM,WAAW,GAAG,OAAO,CAAC,K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C,OAAO,IAAA,sBAAe,EAAC,OAAO,EAAE;QAC9B,QAAQ,EACN,WAAW,CAAC,YAAY,KAAK,IAAI;YAC/B,CAAC,CAAC;gBACE,KAAK,yCAAM,IAAA,oBAAY,EAAC,OAAO,CAAC,kBAAK,cAAc,CAAC,OAAO,CAAC,SAAC;gBAC7D,KAAK,EAAE,IAAA,uBAAc,EAAC,aAAa,CAAC;gBACpC,SAAS,EAAE;oBACT,iCAAiC,EAAE,GAAG,EAAE,yGAAyG;iBAClJ;gBACD,MAAM,yCACD,WAAW;oBAEd,gCAAgC;oBAChC,iDAAiD;oBACjD,gDAAgD;oBAEhD,kNAAkN;oBAElN,sDAAsD;yBACvD;gBACD,SAAS,EAAE;oBACT,KAAK,EAAE;wBACL,OAAO,CAAC,KAAK,CAAC,GAAG,GAAG,oBAAoB;wBACxC,OAAO,CAAC,KAAK,CAAC,GAAG,GAAG,OAAO;qBAC5B;iBACF;aACF;YACH,CAAC,CAAC,SAAS;QACf,WAAW,EAAE;YACX,MAAM,EAAE,IAAA,kDAAyC,EAAC,OAAO,EAAE,QAAQ,CAAC;YACpE,SAAS,EAAE;gBACT,sBAAsB,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE;aACjE;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AA9CW,QAAA,qBAAqB,yBA8ChC"}
|
|
@@ -59,21 +59,21 @@ var createNodeTestJobs = function (context) {
|
|
|
59
59
|
needs: [],
|
|
60
60
|
envMode: "none",
|
|
61
61
|
};
|
|
62
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context
|
|
62
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
63
63
|
var auditJob = buildConfig.audit !== false
|
|
64
64
|
? __assign(__assign(__assign({ name: "๐ก audit" }, base), { image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage, cache: undefined, script: __spreadArray([
|
|
65
65
|
"cd ".concat(context.build.dir)
|
|
66
66
|
], __read(((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [
|
|
67
|
-
context.
|
|
67
|
+
context.packageManagerInfo.isClassic
|
|
68
68
|
? "yarn audit"
|
|
69
69
|
: "yarn npm audit --environment production", // yarn 2
|
|
70
70
|
])), false), allow_failure: true }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_f = buildConfig.audit) === null || _f === void 0 ? void 0 : _f.artifactsReports, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifacts)) : null;
|
|
71
71
|
var lintJob = buildConfig.lint !== false
|
|
72
|
-
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context
|
|
72
|
+
? __assign(__assign(__assign({ name: "๐ฎ lint" }, base), { image: (_j = (_h = buildConfig.lint) === null || _h === void 0 ? void 0 : _h.jobImage) !== null && _j !== void 0 ? _j : defaultImage, cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
73
73
|
"cd ".concat(context.build.dir)
|
|
74
74
|
], false), __read(yarnInstall), false), __read(((_l = (0, utils_1.ensureArray)((_k = buildConfig.lint) === null || _k === void 0 ? void 0 : _k.command)) !== null && _l !== void 0 ? _l : ["yarn lint"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.artifactsReports, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifacts)) : null;
|
|
75
75
|
var testJob = buildConfig.test !== false
|
|
76
|
-
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context
|
|
76
|
+
? __assign(__assign(__assign({ name: "๐งช test" }, base), { image: (_q = (_p = buildConfig.test) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : (0, runner_1.getRunnerImage)("jobs-testing-chrome"), cache: (0, cache_1.getNodeCache)(context), script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), [
|
|
77
77
|
"cd ".concat(context.build.dir)
|
|
78
78
|
], false), __read(yarnInstall), false), __read(((_s = (0, utils_1.ensureArray)((_r = buildConfig.test) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : ["yarn test"])), false) }), (0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_t = buildConfig.test) === null || _t === void 0 ? void 0 : _t.artifactsReports, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifacts)) : null;
|
|
79
79
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testJob.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/testJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA8C;AAG9C,qCAAkD;AAClD,iCAAuC;AACvC,yCAA0D;AAC1D,+BAA2D;AAC3D,uEAAsE;AAE/D,IAAM,kBAAkB,GAAG,UAChC,OAAyB;;IAEzB,gCAAgC;IAChC,6CAA6C;IAC7C,IAAI,OAAO,CAAC,OAAO,KAAK,eAAe,EAAE,CAAC;QACxC,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,IAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;IAEzC,IAAM,YAAY,GAAG,IAAA,uBAAc,E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C,GAAG,EACjB,MAAA,WAAW,CAAC,IAAI,0CAAE,gBAAgB,EAClC,MAAA,WAAW,CAAC,IAAI,0CAAE,SAAS,CAC5B,EAEL,CAAC,CAAC,IAAI,CAAC;IACX,IAAM,OAAO,GACX,WAAW,CAAC,IAAI,KAAK,KAAK;QACxB,CAAC,8BACG,IAAI,EAAE,SAAS,IAEZ,IAAI,KACP,KAAK,EACH,MAAA,MAAA,WAAW,CAAC,IAAI,0CAAE,QAAQ,mCAAI,IAAA,uBAAc,EAAC,qBAAqB,CAAC,EACrE,KAAK,EAAE,IAAA,oBAAY,EAAC,OAAO,CAAC,EAC5B,MAAM,qEACD,IAAA,wBAAiB,EAAC,OAAO,CAAC;gBAC7B,aAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAE;8BACtB,WAAW,kBACX,CAAC,MAAA,IAAA,mBAAW,EAAC,MAAA,WAAW,CAAC,IAAI,0CAAE,OAAO,CAAC,mCAAI,CAAC,WAAW,CAAC,CAAC,cAE3D,IAAA,6CAAqB,EACtB,OAAO,CAAC,KAAK,CAAC,GAAG,EACjB,MAAA,WAAW,CAAC,IAAI,0CAAE,gBAAgB,EAClC,MAAA,WAAW,CAAC,IAAI,0CAAE,SAAS,CAC5B,EAEL,CAAC,CAAC,IAAI,CAAC;IACX,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,cAAM,CAAC,CAAC;AACrD,CAAC,CAAC;AA3FW,QAAA,kBAAkB,sBA2F7B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BashExpression } from "../../bash/BashExpression";
|
|
2
|
-
import type {
|
|
3
|
-
export declare const ensureNodeVersion: (context:
|
|
4
|
-
export declare const getYarnInstall: (context:
|
|
2
|
+
import type { Context } from "../../types";
|
|
3
|
+
export declare const ensureNodeVersion: (context: Context) => string[];
|
|
4
|
+
export declare const getYarnInstall: (context: Context, options?: {
|
|
5
5
|
noCustomPostInstall: boolean;
|
|
6
6
|
}) => string[];
|
|
7
|
-
export declare const getDockerAppCopyAndBuildScript: (context:
|
|
7
|
+
export declare const getDockerAppCopyAndBuildScript: (context: Context) => BashExpression;
|
|
@@ -47,7 +47,9 @@ var ensureNodeVersion = function (context) {
|
|
|
47
47
|
exports.ensureNodeVersion = ensureNodeVersion;
|
|
48
48
|
var getYarnInstall = function (context, options) {
|
|
49
49
|
var _a;
|
|
50
|
-
var postInstall = "postInstall" in context.
|
|
50
|
+
var postInstall = "postInstall" in context.build.config
|
|
51
|
+
? context.build.config.postInstall
|
|
52
|
+
: null;
|
|
51
53
|
return __spreadArray(__spreadArray(__spreadArray([], __read((0, exports.ensureNodeVersion)(context)), false), __read((0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([getYarnInstallCommand(context)])), false), __read((postInstall && !(options === null || options === void 0 ? void 0 : options.noCustomPostInstall)
|
|
52
54
|
? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((_a = (0, utils_1.ensureArray)(postInstall)) !== null && _a !== void 0 ? _a : [])
|
|
53
55
|
: [])), false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yarn.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/yarn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA2D;AAE3D,qCAA0C;AAC1C,6CAAyD;AAEzD,IAAM,oBAAoB,GAAG,gCAAgC,CAAC;AAE9D,8CAA8C;AAC9C,IAAM,uBAAuB,GAAG,oDAAoD,CAAC;AAErF,IAAM,qBAAqB,GAAG,UAAC,
|
|
1
|
+
{"version":3,"file":"yarn.js","sourceRoot":"","sources":["../../../../../../pipeline/src/build/node/yarn.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4DAA2D;AAE3D,qCAA0C;AAC1C,6CAAyD;AAEzD,IAAM,oBAAoB,GAAG,gCAAgC,CAAC;AAE9D,8CAA8C;AAC9C,IAAM,uBAAuB,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iBAAiB,mBACb,oBAAoB,yBACrB,CAAC,IAAI,EAAE,CACP,CAAC;IACJ,CAAC;IAED,wFAAwF;IACxF,8CAA8C;IAC9C,IAAM,6BAA6B,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,UAAC,CAAC;QACtD,OAAA,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC;IAAhD,CAAgD,CACjD,CAAC;IACF,IAAM,6BAA6B,GAAG,6BAA6B;QACjE,CAAC,CAAC,wCAAwC;QAC1C,CAAC,CAAC,EAAE,CAAC;IAEP,yCAAyC;IACzC,iGAAiG;IACjG,OAAO,IAAI,+BAAc,CACvB,YACF,iBAAiB,eACjB,6BAA6B,mBACzB,uBAAuB,aAExB,CAAC,IAAI,EAAE,CACT,CAAC;AACJ,CAAC,CAAC;AA9BW,QAAA,8BAA8B,kCA8BzC"}
|
|
@@ -9,7 +9,7 @@ var createSbomBuildJob = function (context) {
|
|
|
9
9
|
var buildConfig = context.build.config;
|
|
10
10
|
var defaultImage = "aquasec/trivy:0.38.3";
|
|
11
11
|
var defaultScript = [
|
|
12
|
-
"trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.
|
|
12
|
+
"trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.packageManagerInfo.componentIsInWorkspace
|
|
13
13
|
? "."
|
|
14
14
|
: context.build.dir),
|
|
15
15
|
];
|