@catladder/pipeline 0.0.0-refactor-docker-427f63d6 → 0.0.0-refactor-docker-c24f8608
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/createAppBuildJob.d.ts +2 -2
- package/dist/build/base/createAppBuildJob.js +1 -1
- package/dist/build/base/index.d.ts +2 -2
- package/dist/build/base/writeBuildInfo.d.ts +2 -2
- package/dist/build/base/writeDotEnv.d.ts +2 -2
- package/dist/build/custom/buildJob.d.ts +2 -2
- package/dist/build/custom/index.d.ts +2 -2
- package/dist/build/custom/testJob.d.ts +2 -2
- package/dist/build/docker.d.ts +11 -11
- package/dist/build/docker.js +6 -6
- package/dist/build/index.d.ts +2 -2
- package/dist/build/node/buildJob.d.ts +2 -2
- package/dist/build/node/buildJob.js +6 -6
- package/dist/build/node/cache.d.ts +5 -5
- package/dist/build/node/cache.js +4 -4
- package/dist/build/node/index.d.ts +4 -4
- package/dist/build/node/meteor.d.ts +2 -2
- package/dist/build/node/meteor.js +2 -2
- package/dist/build/node/testJob.d.ts +2 -2
- package/dist/build/node/testJob.js +6 -6
- package/dist/build/node/yarn.d.ts +4 -4
- package/dist/build/node/yarn.js +1 -1
- package/dist/build/rails/build.d.ts +2 -2
- package/dist/build/rails/index.d.ts +2 -2
- package/dist/build/rails/test.d.ts +2 -2
- package/dist/build/sbom.d.ts +2 -2
- package/dist/build/sbom.js +1 -1
- package/dist/bundles/catladder-gitlab/index.js +42 -33
- package/dist/constants.js +1 -1
- package/dist/context/getEnvironment.d.ts +2 -2
- package/dist/context/getEnvironmentContext.d.ts +2 -2
- package/dist/context/getEnvironmentVariables.d.ts +4 -4
- package/dist/context/getLabels.d.ts +2 -2
- package/dist/context/index.d.ts +7 -3
- package/dist/context/index.js +12 -3
- package/dist/deploy/base/deploy.d.ts +2 -2
- package/dist/deploy/base/index.d.ts +2 -2
- package/dist/deploy/base/rollback.d.ts +2 -2
- package/dist/deploy/base/stop.d.ts +2 -2
- package/dist/deploy/cloudRun/artifactsRegistry.d.ts +7 -7
- package/dist/deploy/cloudRun/cleanup.d.ts +2 -2
- package/dist/deploy/cloudRun/cloudRunRevisions.d.ts +2 -2
- package/dist/deploy/cloudRun/createJobs/cloudRunJobs.d.ts +6 -6
- package/dist/deploy/cloudRun/createJobs/cloudRunServices.d.ts +3 -3
- package/dist/deploy/cloudRun/createJobs/common.d.ts +4 -4
- package/dist/deploy/cloudRun/createJobs/getCloudRunDeployScripts.d.ts +2 -2
- package/dist/deploy/cloudRun/createJobs/getCloudRunStopScripts.d.ts +2 -2
- package/dist/deploy/cloudRun/createJobs/index.d.ts +2 -2
- package/dist/deploy/cloudRun/utils/database.d.ts +3 -3
- package/dist/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.d.ts +2 -2
- package/dist/deploy/cloudRun/utils/getServiceName.d.ts +2 -2
- package/dist/deploy/custom/deployJob.d.ts +2 -2
- package/dist/deploy/custom/deployJob.js +1 -1
- package/dist/deploy/dockerTag/deployJob.d.ts +2 -2
- package/dist/deploy/index.d.ts +2 -2
- package/dist/deploy/kubernetes/cloudSql/index.d.ts +3 -3
- package/dist/deploy/kubernetes/deployJob.d.ts +2 -2
- package/dist/deploy/kubernetes/kubeEnv.d.ts +2 -2
- package/dist/deploy/kubernetes/kubeValues.d.ts +2 -2
- package/dist/deploy/kubernetes/mongodb.d.ts +2 -2
- package/dist/deploy/sbom.d.ts +4 -4
- package/dist/deploy/utils.d.ts +2 -2
- package/dist/pipeline/createJobsForComponent.d.ts +2 -2
- package/dist/pipeline/createJobsForComponent.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +2 -2
- package/dist/types/context.d.ts +16 -2
- package/package.json +1 -1
- package/src/build/base/createAppBuildJob.ts +3 -3
- package/src/build/base/index.ts +2 -2
- package/src/build/base/writeBuildInfo.ts +2 -2
- package/src/build/base/writeDotEnv.ts +2 -2
- package/src/build/custom/__tests__/testJob.test.ts +5 -5
- package/src/build/custom/buildJob.ts +4 -2
- package/src/build/custom/index.ts +2 -2
- package/src/build/custom/testJob.ts +4 -2
- package/src/build/docker.ts +18 -18
- package/src/build/index.ts +2 -2
- package/src/build/node/buildJob.ts +13 -9
- package/src/build/node/cache.ts +9 -9
- package/src/build/node/index.ts +6 -4
- package/src/build/node/meteor.ts +10 -5
- package/src/build/node/testJob.ts +11 -8
- package/src/build/node/yarn.ts +6 -8
- package/src/build/rails/build.ts +4 -2
- package/src/build/rails/index.ts +2 -2
- package/src/build/rails/test.ts +4 -2
- package/src/build/sbom.ts +4 -4
- package/src/context/getEnvironment.ts +2 -2
- package/src/context/getEnvironmentContext.ts +2 -2
- package/src/context/getEnvironmentVariables.ts +7 -4
- package/src/context/getLabels.ts +2 -2
- package/src/context/index.ts +15 -5
- package/src/deploy/base/deploy.ts +2 -2
- package/src/deploy/base/index.ts +2 -2
- package/src/deploy/base/rollback.ts +2 -2
- package/src/deploy/base/stop.ts +2 -2
- package/src/deploy/cloudRun/artifactsRegistry.ts +12 -7
- package/src/deploy/cloudRun/cleanup.ts +2 -2
- package/src/deploy/cloudRun/cloudRunRevisions.ts +3 -3
- package/src/deploy/cloudRun/createJobs/cloudRunJobs.ts +10 -10
- package/src/deploy/cloudRun/createJobs/cloudRunServices.ts +3 -3
- package/src/deploy/cloudRun/createJobs/common.ts +4 -4
- package/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts +5 -2
- package/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.ts +2 -2
- package/src/deploy/cloudRun/createJobs/index.ts +2 -2
- package/src/deploy/cloudRun/utils/database.ts +3 -3
- package/src/deploy/cloudRun/utils/gcloudServiceAccountLoginCommands.ts +4 -2
- package/src/deploy/cloudRun/utils/getServiceName.ts +2 -2
- package/src/deploy/custom/deployJob.ts +7 -3
- package/src/deploy/dockerTag/deployJob.ts +4 -2
- package/src/deploy/index.ts +2 -2
- package/src/deploy/kubernetes/cloudSql/index.ts +3 -3
- package/src/deploy/kubernetes/deployJob.ts +2 -2
- package/src/deploy/kubernetes/kubeEnv.ts +2 -2
- package/src/deploy/kubernetes/kubeValues.ts +3 -3
- package/src/deploy/kubernetes/mongodb.ts +8 -8
- package/src/deploy/sbom.ts +8 -4
- package/src/deploy/utils.ts +2 -2
- package/src/pipeline/createJobsForComponent.ts +11 -7
- package/src/pipeline/gitlab/createGitlabJobs.ts +2 -2
- package/src/types/config.ts +2 -2
- package/src/types/context.ts +18 -2
|
@@ -23269,7 +23269,7 @@ var createAppBuildJob = function (context, _a) {
|
|
|
23269
23269
|
variables: __assign(__assign(__assign(__assign({}, variables !== null && variables !== void 0 ? variables : {}), context.environment.envVars), context.environment.jobOnlyVars.build.envVars), (_b = context.componentConfig.build.extraVars) !== null && _b !== void 0 ? _b : {}),
|
|
23270
23270
|
runnerVariables: __assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), runnerVariables !== null && runnerVariables !== void 0 ? runnerVariables : {}), (_c = context.componentConfig.build.runnerVariables) !== null && _c !== void 0 ? _c : {}),
|
|
23271
23271
|
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read(context.componentConfig.dotEnv === true // don't build when set to `local`
|
|
23272
|
-
? (0, writeDotEnv_1.writeDotEnv)(context) : []), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : []), false),
|
|
23272
|
+
? (0, writeDotEnv_1.writeDotEnv)(context) : []), false), __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context.buildContext)), false), ["cd ".concat(context.componentConfig.dir)], false), __read((_d = (0, utils_1.ensureArray)(script)) !== null && _d !== void 0 ? _d : []), false),
|
|
23273
23273
|
artifacts: {
|
|
23274
23274
|
paths: [(0, path_1.join)(context.componentConfig.dir, "__build_info.json")],
|
|
23275
23275
|
reports: {
|
|
@@ -23800,14 +23800,14 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
23800
23800
|
value: true
|
|
23801
23801
|
}));
|
|
23802
23802
|
exports.hasDockerfile = exports.getDockerBuildDefaultScript = exports.getDockerBuildScriptWithBuiltInDockerFile = exports.gitlabDockerLogin = exports.createDockerBuildJobBase = exports.getDockerJobBaseProps = exports.DOCKER_BUILD_JOB_NAME = exports.getDockerBuildVariables = exports.requiresDockerBuild = exports.getDockerImageVariables = void 0;
|
|
23803
|
-
var lodash_1 = __nccwpck_require__(3255);
|
|
23804
|
-
var deploy_1 = __nccwpck_require__(1264);
|
|
23805
|
-
var runner_1 = __nccwpck_require__(7666);
|
|
23806
23803
|
var fs_1 = __nccwpck_require__(7147);
|
|
23804
|
+
var lodash_1 = __nccwpck_require__(3255);
|
|
23807
23805
|
var path_1 = __importDefault(__nccwpck_require__(1017));
|
|
23808
|
-
var
|
|
23806
|
+
var deploy_1 = __nccwpck_require__(1264);
|
|
23809
23807
|
var artifactsRegistry_1 = __nccwpck_require__(998);
|
|
23810
23808
|
var gcloudServiceAccountLoginCommands_1 = __nccwpck_require__(818);
|
|
23809
|
+
var runner_1 = __nccwpck_require__(7666);
|
|
23810
|
+
var gitlab_1 = __nccwpck_require__(9818);
|
|
23811
23811
|
var DOCKER_BUILD_RUNNER_REQUESTS = {
|
|
23812
23812
|
KUBERNETES_CPU_REQUEST: "0.5",
|
|
23813
23813
|
KUBERNETES_MEMORY_REQUEST: "1Gi",
|
|
@@ -23859,8 +23859,8 @@ var getDockerAdditions = function (build) {
|
|
|
23859
23859
|
};
|
|
23860
23860
|
};
|
|
23861
23861
|
var getDockerBuildVariables = function (context) {
|
|
23862
|
-
return __assign(__assign(__assign({}, getDockerAdditions(context.
|
|
23863
|
-
APP_DIR: context.
|
|
23862
|
+
return __assign(__assign(__assign({}, getDockerAdditions(context.buildContext.config)), {
|
|
23863
|
+
APP_DIR: context.buildContext.dir,
|
|
23864
23864
|
DOCKER_DIR: "."
|
|
23865
23865
|
}), (0, exports.getDockerImageVariables)(context));
|
|
23866
23866
|
};
|
|
@@ -24069,15 +24069,15 @@ var createNodeBuildJobs = function (context) {
|
|
|
24069
24069
|
throw new Error("deploy config is not node, node-static or storybook");
|
|
24070
24070
|
}
|
|
24071
24071
|
var defaultImage = (0, runner_1.getRunnerImage)("jobs-default");
|
|
24072
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
24072
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context.buildContext);
|
|
24073
24073
|
return (0, base_1.createBuildJobs)(context, {
|
|
24074
24074
|
appBuild: buildConfig.buildCommand !== null ? {
|
|
24075
24075
|
image: (_a = buildConfig.jobImage) !== null && _a !== void 0 ? _a : defaultImage,
|
|
24076
24076
|
runnerVariables: constants_1.NODE_RUNNER_BUILD_VARIABLES,
|
|
24077
|
-
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),
|
|
24077
|
+
cache: __spreadArray(__spreadArray(__spreadArray([], __read((_b = (0, utils_1.ensureArray)(buildConfig.jobCache)) !== null && _b !== void 0 ? _b : []), false), __read((0, cache_1.getNodeCache)(context.buildContext)), false), __read((0, cache_1.getNextCache)(context)), false),
|
|
24078
24078
|
script: __spreadArray(__spreadArray([], __read(yarnInstall), false), __read((_c = (0, utils_1.ensureArray)(buildConfig.buildCommand)) !== null && _c !== void 0 ? _c : []), false),
|
|
24079
24079
|
artifacts: {
|
|
24080
|
-
paths: __spreadArray([context.componentConfig.dir], __read((_e = (_d = context.packageManagerInfo) === null || _d === void 0 ? void 0 : _d.currentWorkspaceDependencies) !== null && _e !== void 0 ? _e : []), false).flatMap(function (dir) {
|
|
24080
|
+
paths: __spreadArray([context.componentConfig.dir], __read((_e = (_d = context.buildContext.packageManagerInfo) === null || _d === void 0 ? void 0 : _d.currentWorkspaceDependencies) !== null && _e !== void 0 ? _e : []), false).flatMap(function (dir) {
|
|
24081
24081
|
var _a, _b;
|
|
24082
24082
|
return __spreadArray([(0, path_1.join)(dir, "__build_info.json"), (0, path_1.join)(dir, "dist"), (0, path_1.join)(dir, ".next")], __read((_b = (_a = buildConfig.artifactsPaths) === null || _a === void 0 ? void 0 : _a.map(function (path) {
|
|
24083
24083
|
return (0, path_1.join)(dir, path);
|
|
@@ -24090,11 +24090,11 @@ var createNodeBuildJobs = function (context) {
|
|
|
24090
24090
|
} : undefined,
|
|
24091
24091
|
dockerBuild: {
|
|
24092
24092
|
script: (0, docker_1.getDockerBuildScriptWithBuiltInDockerFile)(context, buildConfig.type === "node-static" || buildConfig.type === "storybook" ? "nginx" : "node"),
|
|
24093
|
-
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
|
|
24093
|
+
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context.buildContext, "pull")), false),
|
|
24094
24094
|
variables: {
|
|
24095
24095
|
// only required for non static
|
|
24096
|
-
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context),
|
|
24097
|
-
DOCKER_COPY_WORKSPACE_FILES: (_g = (_f = context.packageManagerInfo) === null || _f === void 0 ? void 0 : _f.pathsToCopyInDocker.map(function (dir) {
|
|
24096
|
+
DOCKER_COPY_AND_INSTALL_APP: (0, yarn_1.getDockerAppCopyAndBuildScript)(context.buildContext),
|
|
24097
|
+
DOCKER_COPY_WORKSPACE_FILES: (_g = (_f = context.buildContext.packageManagerInfo) === null || _f === void 0 ? void 0 : _f.pathsToCopyInDocker.map(function (dir) {
|
|
24098
24098
|
return "COPY --chown=node:node ".concat(dir, " /app/").concat(dir);
|
|
24099
24099
|
})) === null || _g === void 0 ? void 0 : _g.join("\n")
|
|
24100
24100
|
}
|
|
@@ -24165,9 +24165,9 @@ var getYarnCache = function (context, policy) {
|
|
|
24165
24165
|
policy: policy,
|
|
24166
24166
|
paths: [".yarn"]
|
|
24167
24167
|
} : {
|
|
24168
|
-
key: (0, slugify_1.default)(context.
|
|
24168
|
+
key: (0, slugify_1.default)(context.dir) + "-yarn",
|
|
24169
24169
|
policy: policy,
|
|
24170
|
-
paths: [(0, path_1.join)(context.
|
|
24170
|
+
paths: [(0, path_1.join)(context.dir, ".yarn")]
|
|
24171
24171
|
}];
|
|
24172
24172
|
};
|
|
24173
24173
|
exports.getYarnCache = getYarnCache;
|
|
@@ -24181,12 +24181,12 @@ var getNodeModulesCache = function (context, policy) {
|
|
|
24181
24181
|
// It would slow down all pipelines whenever one adds a new dependency as it will need to download all node_modules again.
|
|
24182
24182
|
return [{
|
|
24183
24183
|
// if component is in a shared workspace, use workspace cache. use individual cache else
|
|
24184
|
-
key: componentIsInWorkspace ? "node-modules-workspace" : (0, slugify_1.default)(context.
|
|
24184
|
+
key: componentIsInWorkspace ? "node-modules-workspace" : (0, slugify_1.default)(context.dir) + "-node-modules",
|
|
24185
24185
|
// 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
|
|
24186
24186
|
policy: policy,
|
|
24187
24187
|
paths: __spreadArray([], __read(componentIsInWorkspace ? (0, lodash_1.uniq)(__spreadArray(["node_modules"], __read((_c = (_b = context.packageManagerInfo) === null || _b === void 0 ? void 0 : _b.workspaces.map(function (w) {
|
|
24188
24188
|
return (0, path_1.join)(w.location, "node_modules");
|
|
24189
|
-
})) !== null && _c !== void 0 ? _c : []), false)) : [(0, path_1.join)(context.
|
|
24189
|
+
})) !== null && _c !== void 0 ? _c : []), false)) : [(0, path_1.join)(context.dir, "node_modules")]), false)
|
|
24190
24190
|
}];
|
|
24191
24191
|
};
|
|
24192
24192
|
exports.getNodeModulesCache = getNodeModulesCache;
|
|
@@ -24345,10 +24345,10 @@ var createMeteorBuildJobs = function (context) {
|
|
|
24345
24345
|
if (!(0, types_1.isOfBuildType)(buildConfig, "meteor")) {
|
|
24346
24346
|
throw new Error("deploy config is not meteor");
|
|
24347
24347
|
}
|
|
24348
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
24348
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context.buildContext);
|
|
24349
24349
|
return (0, base_1.createBuildJobs)(context, {
|
|
24350
24350
|
appBuild: buildConfig.buildCommand !== null ? {
|
|
24351
|
-
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context)), false), __read(getMeteorCache(context)), false),
|
|
24351
|
+
cache: __spreadArray(__spreadArray([], __read((0, cache_1.getNodeCache)(context.buildContext)), false), __read(getMeteorCache(context)), false),
|
|
24352
24352
|
image: (0, runner_1.getRunnerImage)("jobs-meteor"),
|
|
24353
24353
|
variables: {
|
|
24354
24354
|
METEOR_DISABLE_OPTIMISTIC_CACHING: "1" // see https://forums.meteor.com/t/veeery-long-building-time-inside-docker-container/58673/17?u=macrozone
|
|
@@ -24446,13 +24446,13 @@ var createNodeTestJobs = function (context) {
|
|
|
24446
24446
|
needs: [],
|
|
24447
24447
|
envMode: "none"
|
|
24448
24448
|
};
|
|
24449
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
24449
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context.buildContext);
|
|
24450
24450
|
var auditJob = buildConfig.audit !== false ? __assign(__assign(__assign({
|
|
24451
24451
|
name: "🛡 audit"
|
|
24452
24452
|
}, base), {
|
|
24453
24453
|
image: (_c = (_b = buildConfig.audit) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage,
|
|
24454
24454
|
cache: undefined,
|
|
24455
|
-
script: __spreadArray(["cd ".concat(context.componentConfig.dir)], __read((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [((_f = context.packageManagerInfo) === null || _f === void 0 ? void 0 : _f.isClassic) ? "yarn audit" : "yarn npm audit --environment production" // yarn 2
|
|
24455
|
+
script: __spreadArray(["cd ".concat(context.componentConfig.dir)], __read((_e = (0, utils_1.ensureArray)((_d = buildConfig.audit) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : [((_f = context.buildContext.packageManagerInfo) === null || _f === void 0 ? void 0 : _f.isClassic) ? "yarn audit" : "yarn npm audit --environment production" // yarn 2
|
|
24456
24456
|
]), false),
|
|
24457
24457
|
allow_failure: true
|
|
24458
24458
|
}), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.artifactsReports, (_h = buildConfig.audit) === null || _h === void 0 ? void 0 : _h.artifacts)) : null;
|
|
@@ -24460,15 +24460,15 @@ var createNodeTestJobs = function (context) {
|
|
|
24460
24460
|
name: "👮 lint"
|
|
24461
24461
|
}, base), {
|
|
24462
24462
|
image: (_k = (_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.jobImage) !== null && _k !== void 0 ? _k : defaultImage,
|
|
24463
|
-
cache: (0, cache_1.getNodeCache)(context),
|
|
24464
|
-
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_m = (0, utils_1.ensureArray)((_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.command)) !== null && _m !== void 0 ? _m : ["yarn lint"]), false)
|
|
24463
|
+
cache: (0, cache_1.getNodeCache)(context.buildContext),
|
|
24464
|
+
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context.buildContext)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_m = (0, utils_1.ensureArray)((_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.command)) !== null && _m !== void 0 ? _m : ["yarn lint"]), false)
|
|
24465
24465
|
}), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.artifactsReports, (_p = buildConfig.lint) === null || _p === void 0 ? void 0 : _p.artifacts)) : null;
|
|
24466
24466
|
var testJob = buildConfig.test !== false ? __assign(__assign(__assign({
|
|
24467
24467
|
name: "🧪 test"
|
|
24468
24468
|
}, base), {
|
|
24469
24469
|
image: (_r = (_q = buildConfig.test) === null || _q === void 0 ? void 0 : _q.jobImage) !== null && _r !== void 0 ? _r : (0, runner_1.getRunnerImage)("jobs-testing-chrome"),
|
|
24470
|
-
cache: (0, cache_1.getNodeCache)(context),
|
|
24471
|
-
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_t = (0, utils_1.ensureArray)((_s = buildConfig.test) === null || _s === void 0 ? void 0 : _s.command)) !== null && _t !== void 0 ? _t : ["yarn test"]), false)
|
|
24470
|
+
cache: (0, cache_1.getNodeCache)(context.buildContext),
|
|
24471
|
+
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, yarn_1.ensureNodeVersion)(context.buildContext)), false), ["cd ".concat(context.componentConfig.dir)], false), __read(yarnInstall), false), __read((_t = (0, utils_1.ensureArray)((_s = buildConfig.test) === null || _s === void 0 ? void 0 : _s.command)) !== null && _t !== void 0 ? _t : ["yarn test"]), false)
|
|
24472
24472
|
}), (0, createArtifactsConfig_1.createArtifactsConfig)(context.componentConfig.dir, (_u = buildConfig.test) === null || _u === void 0 ? void 0 : _u.artifactsReports, (_v = buildConfig.test) === null || _v === void 0 ? void 0 : _v.artifacts)) : null;
|
|
24473
24473
|
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
24474
24474
|
};
|
|
@@ -24536,7 +24536,7 @@ var ensureNodeVersion = function (context) {
|
|
|
24536
24536
|
exports.ensureNodeVersion = ensureNodeVersion;
|
|
24537
24537
|
var getYarnInstall = function (context, options) {
|
|
24538
24538
|
var _a;
|
|
24539
|
-
var postInstall = "postInstall" in context.
|
|
24539
|
+
var postInstall = "postInstall" in context.config ? context.config.postInstall : null;
|
|
24540
24540
|
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) ? (0, gitlab_1.collapseableSection)("postinstall", "Custom post install")((_a = (0, utils_1.ensureArray)(postInstall)) !== null && _a !== void 0 ? _a : []) : []), false);
|
|
24541
24541
|
};
|
|
24542
24542
|
exports.getYarnInstall = getYarnInstall;
|
|
@@ -24825,7 +24825,7 @@ var createSbomBuildJob = function (context) {
|
|
|
24825
24825
|
var _a, _b, _c, _d, _e;
|
|
24826
24826
|
var buildConfig = context.componentConfig.build;
|
|
24827
24827
|
var defaultImage = "aquasec/trivy:0.38.3";
|
|
24828
|
-
var defaultScript = ["trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(((_a = context.packageManagerInfo) === null || _a === void 0 ? void 0 : _a.componentIsInWorkspace) ? "." : context.
|
|
24828
|
+
var defaultScript = ["trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(((_a = context.buildContext.packageManagerInfo) === null || _a === void 0 ? void 0 : _a.componentIsInWorkspace) ? "." : context.buildContext.dir)];
|
|
24829
24829
|
var image = buildConfig.type === "custom" && buildConfig.sbom !== false ? (_c = (_b = buildConfig.sbom) === null || _b === void 0 ? void 0 : _b.jobImage) !== null && _c !== void 0 ? _c : defaultImage : defaultImage;
|
|
24830
24830
|
var script = buildConfig.type === "custom" && buildConfig.sbom !== false ? (_e = (0, utils_1.ensureArray)((_d = buildConfig.sbom) === null || _d === void 0 ? void 0 : _d.command)) !== null && _e !== void 0 ? _e : defaultScript : defaultScript;
|
|
24831
24831
|
return {
|
|
@@ -25049,7 +25049,7 @@ Object.defineProperty(exports, "__esModule", ({
|
|
|
25049
25049
|
value: true
|
|
25050
25050
|
}));
|
|
25051
25051
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
25052
|
-
exports.PIPELINE_IMAGE_TAG = "refactor-docker-
|
|
25052
|
+
exports.PIPELINE_IMAGE_TAG = "refactor-docker-c24f8608" || 0;
|
|
25053
25053
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
25054
25054
|
|
|
25055
25055
|
/***/ }),
|
|
@@ -25865,7 +25865,7 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
25865
25865
|
Object.defineProperty(exports, "__esModule", ({
|
|
25866
25866
|
value: true
|
|
25867
25867
|
}));
|
|
25868
|
-
exports.createContext = void 0;
|
|
25868
|
+
exports.createContext = exports.createComponentContext = void 0;
|
|
25869
25869
|
var build_1 = __nccwpck_require__(2004);
|
|
25870
25870
|
var deploy_1 = __nccwpck_require__(1264);
|
|
25871
25871
|
var utils_1 = __nccwpck_require__(1815);
|
|
@@ -25873,7 +25873,7 @@ var getEnvironment_1 = __nccwpck_require__(4029);
|
|
|
25873
25873
|
var getEnvironmentContext_1 = __nccwpck_require__(3817);
|
|
25874
25874
|
__exportStar(__nccwpck_require__(4029), exports);
|
|
25875
25875
|
__exportStar(__nccwpck_require__(2292), exports);
|
|
25876
|
-
var
|
|
25876
|
+
var createComponentContext = function (ctx) {
|
|
25877
25877
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
25878
25878
|
var envContext, componentConfigWithoutDefaults, defaults, componentConfig;
|
|
25879
25879
|
var _a;
|
|
@@ -25896,6 +25896,11 @@ var createContext = function (ctx) {
|
|
|
25896
25896
|
_a = {
|
|
25897
25897
|
fullConfig: ctx.config,
|
|
25898
25898
|
componentConfig: componentConfig,
|
|
25899
|
+
buildContext: {
|
|
25900
|
+
dir: componentConfig.dir,
|
|
25901
|
+
packageManagerInfo: ctx.packageManagerInfo,
|
|
25902
|
+
config: componentConfig.build
|
|
25903
|
+
},
|
|
25899
25904
|
componentName: ctx.componentName
|
|
25900
25905
|
};
|
|
25901
25906
|
return [4 /*yield*/, (0, getEnvironment_1.getEnvironment)(ctx)];
|
|
@@ -25905,7 +25910,11 @@ var createContext = function (ctx) {
|
|
|
25905
25910
|
});
|
|
25906
25911
|
});
|
|
25907
25912
|
};
|
|
25908
|
-
exports.
|
|
25913
|
+
exports.createComponentContext = createComponentContext;
|
|
25914
|
+
/**
|
|
25915
|
+
* @deprecated use createComponentContext instead
|
|
25916
|
+
*/
|
|
25917
|
+
exports.createContext = exports.createComponentContext;
|
|
25909
25918
|
|
|
25910
25919
|
/***/ }),
|
|
25911
25920
|
|
|
@@ -28110,7 +28119,7 @@ var createCustomDeployJobs = function (context) {
|
|
|
28110
28119
|
throw new Error("deploy config is not custom");
|
|
28111
28120
|
}
|
|
28112
28121
|
// FIXME: custom deploy currently assumes yarn-based project
|
|
28113
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context, {
|
|
28122
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context.buildContext, {
|
|
28114
28123
|
noCustomPostInstall: true
|
|
28115
28124
|
});
|
|
28116
28125
|
return (0, base_1.createDeployementJobs)(context, {
|
|
@@ -29763,7 +29772,7 @@ var createJobsForComponent = function (contextContext) {
|
|
|
29763
29772
|
return [4 /*yield*/, (0, packageManager_1.getPackageManagerInfo)(contextContext.config, contextContext.componentName)];
|
|
29764
29773
|
case 1:
|
|
29765
29774
|
packageManagerInfo = _a.sent();
|
|
29766
|
-
return [4 /*yield*/, (0, context_1.
|
|
29775
|
+
return [4 /*yield*/, (0, context_1.createComponentContext)(__assign(__assign({}, contextContext), {
|
|
29767
29776
|
packageManagerInfo: packageManagerInfo
|
|
29768
29777
|
}))];
|
|
29769
29778
|
case 2:
|
package/dist/constants.js
CHANGED
|
@@ -4,5 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
7
|
-
exports.PIPELINE_IMAGE_TAG = "refactor-docker-
|
|
7
|
+
exports.PIPELINE_IMAGE_TAG = "refactor-docker-c24f8608" || "latest";
|
|
8
8
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || "git.panter.ch:5001/catladder/catladder";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreateComponentContextContext } from "..";
|
|
2
2
|
import type { Environment } from "../types/context";
|
|
3
|
-
export declare const getEnvironment: (ctx:
|
|
3
|
+
export declare const getEnvironment: (ctx: CreateComponentContextContext) => Promise<Environment>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CreateComponentContextContext } from "..";
|
|
2
2
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
3
3
|
export declare const getEnvironmentContext: ({
|
|
4
4
|
env,
|
|
5
5
|
componentName,
|
|
6
6
|
config,
|
|
7
7
|
pipelineType
|
|
8
|
-
}:
|
|
8
|
+
}: CreateComponentContextContext) => EnvironmentContext<any, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ComponentContext, EnvironmentEnvVarPart as EnvironmentVariables } from "../types";
|
|
2
|
+
import type { CreateComponentContextContext } from "..";
|
|
3
3
|
import type { StringOrBashExpression } from "../bash/BashExpression";
|
|
4
4
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
5
5
|
export type SecretEnvVar = {
|
|
@@ -24,7 +24,7 @@ export type PredefinedVariables = BasePredefinedVariables & {
|
|
|
24
24
|
HOST_INTERNAL: StringOrBashExpression;
|
|
25
25
|
ROOT_URL_INTERNAL: StringOrBashExpression;
|
|
26
26
|
};
|
|
27
|
-
export declare const getEnvironmentVariables: (ctx:
|
|
27
|
+
export declare const getEnvironmentVariables: (ctx: CreateComponentContextContext, alreadyVisited?: Record<string, Record<string, boolean>>) => Promise<EnvironmentVariables>;
|
|
28
28
|
export declare const getSecretVarName: (env: string, componentName: string, key: string) => string;
|
|
29
|
-
export declare const getSecretVarNameForContext: (context:
|
|
29
|
+
export declare const getSecretVarNameForContext: (context: ComponentContext, key: string) => string;
|
|
30
30
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getLabels: (context:
|
|
1
|
+
import type { ComponentContext } from "../types";
|
|
2
|
+
export declare const getLabels: (context: ComponentContext) => {
|
|
3
3
|
"customer-name": string | undefined;
|
|
4
4
|
"component-name": string | undefined;
|
|
5
5
|
"app-name": string | undefined;
|
package/dist/context/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { PipelineType } from "../types";
|
|
2
2
|
import type { Config, PipelineTrigger } from "../types/config";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ComponentContext, PackageManagerInfo } from "../types/context";
|
|
4
4
|
export * from "./getEnvironment";
|
|
5
5
|
export * from "./getEnvironmentVariables";
|
|
6
|
-
export type
|
|
6
|
+
export type CreateComponentContextContext = {
|
|
7
7
|
config: Config;
|
|
8
8
|
componentName: string;
|
|
9
9
|
env: string;
|
|
@@ -11,4 +11,8 @@ export type CreateContextContext = {
|
|
|
11
11
|
trigger?: PipelineTrigger;
|
|
12
12
|
packageManagerInfo?: PackageManagerInfo;
|
|
13
13
|
};
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const createComponentContext: (ctx: CreateComponentContextContext) => Promise<ComponentContext>;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated use createComponentContext instead
|
|
17
|
+
*/
|
|
18
|
+
export declare const createContext: (ctx: CreateComponentContextContext) => Promise<ComponentContext>;
|
package/dist/context/index.js
CHANGED
|
@@ -137,7 +137,7 @@ var __generator = this && this.__generator || function (thisArg, body) {
|
|
|
137
137
|
Object.defineProperty(exports, "__esModule", {
|
|
138
138
|
value: true
|
|
139
139
|
});
|
|
140
|
-
exports.createContext = void 0;
|
|
140
|
+
exports.createContext = exports.createComponentContext = void 0;
|
|
141
141
|
var build_1 = require("../build");
|
|
142
142
|
var deploy_1 = require("../deploy");
|
|
143
143
|
var utils_1 = require("../utils");
|
|
@@ -145,7 +145,7 @@ var getEnvironment_1 = require("./getEnvironment");
|
|
|
145
145
|
var getEnvironmentContext_1 = require("./getEnvironmentContext");
|
|
146
146
|
__exportStar(require("./getEnvironment"), exports);
|
|
147
147
|
__exportStar(require("./getEnvironmentVariables"), exports);
|
|
148
|
-
var
|
|
148
|
+
var createComponentContext = function (ctx) {
|
|
149
149
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
150
150
|
var envContext, componentConfigWithoutDefaults, defaults, componentConfig;
|
|
151
151
|
var _a;
|
|
@@ -168,6 +168,11 @@ var createContext = function (ctx) {
|
|
|
168
168
|
_a = {
|
|
169
169
|
fullConfig: ctx.config,
|
|
170
170
|
componentConfig: componentConfig,
|
|
171
|
+
buildContext: {
|
|
172
|
+
dir: componentConfig.dir,
|
|
173
|
+
packageManagerInfo: ctx.packageManagerInfo,
|
|
174
|
+
config: componentConfig.build
|
|
175
|
+
},
|
|
171
176
|
componentName: ctx.componentName
|
|
172
177
|
};
|
|
173
178
|
return [4 /*yield*/, (0, getEnvironment_1.getEnvironment)(ctx)];
|
|
@@ -177,4 +182,8 @@ var createContext = function (ctx) {
|
|
|
177
182
|
});
|
|
178
183
|
});
|
|
179
184
|
};
|
|
180
|
-
exports.
|
|
185
|
+
exports.createComponentContext = createComponentContext;
|
|
186
|
+
/**
|
|
187
|
+
* @deprecated use createComponentContext instead
|
|
188
|
+
*/
|
|
189
|
+
exports.createContext = exports.createComponentContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
3
|
export declare const DEPLOY_JOB_NAME = "\uD83D\uDE80 Deploy";
|
|
4
4
|
export type DeployJobDefinition = Pick<CatladderJob, "script" | "variables" | "image" | "cache" | "artifacts" | "services" | "runnerVariables">;
|
|
5
|
-
export declare const createDeployJob: (context:
|
|
5
|
+
export declare const createDeployJob: (context: ComponentContext, jobDefinition: DeployJobDefinition) => CatladderJob;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
3
|
import { type DeployJobDefinition } from "./deploy";
|
|
4
4
|
import { type RollbackJobDefinition } from "./rollback";
|
|
5
5
|
import { type StopJobDefinition } from "./stop";
|
|
6
|
-
export declare const createDeployementJobs: (context:
|
|
6
|
+
export declare const createDeployementJobs: (context: ComponentContext, definitions: {
|
|
7
7
|
deploy: DeployJobDefinition;
|
|
8
8
|
stop?: StopJobDefinition;
|
|
9
9
|
rollback?: RollbackJobDefinition;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
3
|
export declare const ROLLBACK_JOB_NAME = "\u21A9\uFE0F Rollback \u26A0\uFE0F";
|
|
4
4
|
export type RollbackJobDefinition = Pick<CatladderJob, "script" | "variables" | "runnerVariables" | "image">;
|
|
5
|
-
export declare const createRollbackJob: (context:
|
|
5
|
+
export declare const createRollbackJob: (context: ComponentContext, jobDefinition: RollbackJobDefinition) => CatladderJob;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
3
|
export declare const STOP_JOB_NAME = "\uD83D\uDED1 Stop \u26A0\uFE0F";
|
|
4
4
|
export type StopJobDefinition = Pick<CatladderJob, "script" | "variables" | "image" | "runnerVariables">;
|
|
5
|
-
export declare const createStopJob: (context:
|
|
5
|
+
export declare const createStopJob: (context: ComponentContext, jobDefinition: StopJobDefinition) => CatladderJob;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { StringOrBashExpression } from "../../bash/BashExpression";
|
|
2
|
-
import type {
|
|
2
|
+
import type { ComponentContext } from "../../types/context";
|
|
3
3
|
export declare const getArtifactsRegistryHost: ({
|
|
4
4
|
componentConfig: {
|
|
5
5
|
deploy
|
|
6
6
|
}
|
|
7
|
-
}:
|
|
8
|
-
export declare const getArtifactsRegistryDockerUrl: (context:
|
|
7
|
+
}: ComponentContext) => string;
|
|
8
|
+
export declare const getArtifactsRegistryDockerUrl: (context: ComponentContext) => string;
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
11
|
* lecacyReviewImageName is only temporary. In old versions the images had no reviewslug in review apps, which makes cleanup harder. We delete all those images now, but need the path
|
|
12
12
|
*/
|
|
13
|
-
export declare const getArtifactsRegistryImageName: (context:
|
|
14
|
-
export declare const getArtifactsRegistryBuildCacheImage: (context:
|
|
15
|
-
export declare const getArtifactsRegistryImage: (context:
|
|
13
|
+
export declare const getArtifactsRegistryImageName: (context: ComponentContext, lecacyReviewImageName?: boolean) => StringOrBashExpression;
|
|
14
|
+
export declare const getArtifactsRegistryBuildCacheImage: (context: ComponentContext) => string;
|
|
15
|
+
export declare const getArtifactsRegistryImage: (context: ComponentContext) => string;
|
|
16
16
|
/**
|
|
17
17
|
* commands to delete unused images.
|
|
18
18
|
*
|
|
@@ -20,4 +20,4 @@ export declare const getArtifactsRegistryImage: (context: Context) => string;
|
|
|
20
20
|
* @param keep how many of the newest images to keep
|
|
21
21
|
* @returns
|
|
22
22
|
*/
|
|
23
|
-
export declare const getDeleteUnusedImagesCommands: (context:
|
|
23
|
+
export declare const getDeleteUnusedImagesCommands: (context: ComponentContext, keep?: number) => string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getRemoveOldRevisionsAndImagesCommand: (context:
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
|
+
export declare const getRemoveOldRevisionsAndImagesCommand: (context: ComponentContext, when: "postDeploy" | "onStop") => string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getDeleteUnusedRevisionsCommands: (context:
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
|
+
export declare const getDeleteUnusedRevisionsCommands: (context: ComponentContext, keep: number) => string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
2
|
import type { DeployConfigCloudRunJob } from "../../types/googleCloudRun";
|
|
3
|
-
export declare const getDeleteSchedulesScripts: (context:
|
|
4
|
-
export declare const getDeleteJobsScripts: (context:
|
|
5
|
-
export declare const getJobRunScripts: (context:
|
|
6
|
-
export declare const getJobCreateScripts: (context:
|
|
7
|
-
export declare const getCreateScheduleScripts: (context:
|
|
3
|
+
export declare const getDeleteSchedulesScripts: (context: ComponentContext) => string[];
|
|
4
|
+
export declare const getDeleteJobsScripts: (context: ComponentContext) => string[];
|
|
5
|
+
export declare const getJobRunScripts: (context: ComponentContext, when: DeployConfigCloudRunJob["when"]) => string[];
|
|
6
|
+
export declare const getJobCreateScripts: (context: ComponentContext) => string[];
|
|
7
|
+
export declare const getCreateScheduleScripts: (context: ComponentContext) => string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
2
|
import type { DeployConfigCloudRunService } from "../../types/googleCloudRun";
|
|
3
|
-
export declare const getServiceDeployScript: (context:
|
|
4
|
-
export declare const getServiceDeleteScript: (context:
|
|
3
|
+
export declare const getServiceDeployScript: (context: ComponentContext, service: DeployConfigCloudRunService | true | undefined, nameSuffix?: string) => string;
|
|
4
|
+
export declare const getServiceDeleteScript: (context: ComponentContext, serviceSuffix?: string) => string[];
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
2
|
import type { DeployConfigCloudRun } from "../../types/googleCloudRun";
|
|
3
3
|
export declare const gcloudCmd: (version?: "beta") => string;
|
|
4
4
|
export declare const gcloudRunCmd: (version?: "beta") => string;
|
|
5
5
|
export declare const gcloudSchedulerCmd: (version?: "beta") => string;
|
|
6
6
|
export declare const setGoogleProjectNumberScript: (deployConfig: DeployConfigCloudRun) => string[];
|
|
7
7
|
export declare const makeLabelString: (obj: Record<string, unknown>) => string;
|
|
8
|
-
export declare const getCloudRunDeployConfig: (context:
|
|
9
|
-
export declare function getCommonCloudRunArgs(context:
|
|
8
|
+
export declare const getCloudRunDeployConfig: (context: ComponentContext) => DeployConfigCloudRun;
|
|
9
|
+
export declare function getCommonCloudRunArgs(context: ComponentContext): {
|
|
10
10
|
project: string;
|
|
11
11
|
region: import("../../types").Gcloudregion;
|
|
12
12
|
};
|
|
13
|
-
export declare function getCommonDeployArgs(context:
|
|
13
|
+
export declare function getCommonDeployArgs(context: ComponentContext): {
|
|
14
14
|
"set-cloudsql-instances": string | undefined;
|
|
15
15
|
project: string;
|
|
16
16
|
region: import("../../types").Gcloudregion;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function getCloudRunDeployScripts(context:
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
|
+
export declare function getCloudRunDeployScripts(context: ComponentContext): string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function getCloudRunStopScripts(context:
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
|
+
export declare function getCloudRunStopScripts(context: ComponentContext): string[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../../types/jobs";
|
|
3
|
-
export declare const createGoogleCloudRunDeployJobs: (context:
|
|
3
|
+
export declare const createGoogleCloudRunDeployJobs: (context: ComponentContext) => CatladderJob[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../../types";
|
|
2
2
|
import type { DeployConfigCloudRun, DeployConfigCloudRunCloudSql } from "../../types";
|
|
3
|
-
export declare const getDatabaseDeleteScript: (context:
|
|
4
|
-
export declare const getDatabaseCreateScript: (context:
|
|
3
|
+
export declare const getDatabaseDeleteScript: (context: ComponentContext, deployConfig: DeployConfigCloudRun) => string[];
|
|
4
|
+
export declare const getDatabaseCreateScript: (context: ComponentContext, deployConfig: DeployConfigCloudRun) => string[];
|
|
5
5
|
export declare const DATABASE_JDBC_URL = "jdbc:postgresql:///$DB_NAME?cloudSqlInstance=$CLOUD_SQL_INSTANCE_CONNECTION_NAME&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=$DB_USER&password=$DB_PASSWORD";
|
|
6
6
|
export declare const getDatabaseConnectionString: (config: DeployConfigCloudRunCloudSql) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const gcloudServiceAccountLoginCommands: (context:
|
|
1
|
+
import type { ComponentContext } from "../../../types";
|
|
2
|
+
export declare const gcloudServiceAccountLoginCommands: (context: ComponentContext) => string[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const getServiceName: (context:
|
|
1
|
+
import type { ComponentContext } from "../../../types/context";
|
|
2
|
+
export declare const getServiceName: (context: ComponentContext) => string | import("../../../bash/BashExpression").BashExpression;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
|
-
export declare const createCustomDeployJobs: (context:
|
|
3
|
+
export declare const createCustomDeployJobs: (context: ComponentContext) => CatladderJob[];
|
|
@@ -51,7 +51,7 @@ var createCustomDeployJobs = function (context) {
|
|
|
51
51
|
throw new Error("deploy config is not custom");
|
|
52
52
|
}
|
|
53
53
|
// FIXME: custom deploy currently assumes yarn-based project
|
|
54
|
-
var yarnInstall = (0, yarn_1.getYarnInstall)(context, {
|
|
54
|
+
var yarnInstall = (0, yarn_1.getYarnInstall)(context.buildContext, {
|
|
55
55
|
noCustomPostInstall: true
|
|
56
56
|
});
|
|
57
57
|
return (0, base_1.createDeployementJobs)(context, {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
|
-
export declare const createDockerTagDeployJobs: (context:
|
|
3
|
+
export declare const createDockerTagDeployJobs: (context: ComponentContext) => CatladderJob[];
|
package/dist/deploy/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SecretEnvVar } from "..";
|
|
2
2
|
import type { BashExpression } from "../bash/BashExpression";
|
|
3
|
-
import type {
|
|
3
|
+
import type { ComponentContext } from "../types/context";
|
|
4
4
|
import type { EnvironmentContext } from "../types/environmentContext";
|
|
5
5
|
import type { CatladderJob } from "../types/jobs";
|
|
6
6
|
import type { PartialDeep } from "../types/utils";
|
|
@@ -10,7 +10,7 @@ export * from "./kubernetes";
|
|
|
10
10
|
export * from "./types";
|
|
11
11
|
export * from "./utils";
|
|
12
12
|
export type DeployTypeDefinition<T extends DeployConfigType> = {
|
|
13
|
-
jobs: (context:
|
|
13
|
+
jobs: (context: ComponentContext) => CatladderJob[];
|
|
14
14
|
defaults: (envContext: EnvironmentContext<any, T>) => PartialDeep<DeployConfigGeneric<T>>;
|
|
15
15
|
additionalSecretKeys: (envContext: EnvironmentContext<any, T>) => SecretEnvVar[];
|
|
16
16
|
getAdditionalEnvVars: (envContext: EnvironmentContext<any, T>) => Record<string, string | BashExpression | undefined | null>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { StringOrBashExpression } from "../../../bash/BashExpression";
|
|
2
|
-
import type {
|
|
3
|
-
export declare const hasKubernetesCloudSQL: (context:
|
|
2
|
+
import type { ComponentContext } from "../../../types";
|
|
3
|
+
export declare const hasKubernetesCloudSQL: (context: ComponentContext) => boolean | undefined;
|
|
4
4
|
type CloudSqlValues = {
|
|
5
5
|
enabled: boolean;
|
|
6
6
|
proxyCredentials: string;
|
|
@@ -8,7 +8,7 @@ type CloudSqlValues = {
|
|
|
8
8
|
fullDbName: StringOrBashExpression;
|
|
9
9
|
dbUser: string;
|
|
10
10
|
};
|
|
11
|
-
export declare const createKubernetesCloudsqlBaseValues: (context:
|
|
11
|
+
export declare const createKubernetesCloudsqlBaseValues: (context: ComponentContext) => {
|
|
12
12
|
cloudsql: CloudSqlValues;
|
|
13
13
|
};
|
|
14
14
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ComponentContext } from "../../types/context";
|
|
2
2
|
import type { CatladderJob } from "../../types/jobs";
|
|
3
|
-
export declare const createKubernetesDeployJobs: (context:
|
|
3
|
+
export declare const createKubernetesDeployJobs: (context: ComponentContext) => CatladderJob[];
|