@catladder/cli 0.0.0-main-4dffbaad → 0.0.0-main-67111f50
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 +99 -40
- package/dist/bundles/cli/index.js +99 -40
- package/package.json +2 -2
|
@@ -39512,7 +39512,7 @@ var createCustomBuildJobs = function (context) {
|
|
|
39512
39512
|
}
|
|
39513
39513
|
} : undefined,
|
|
39514
39514
|
dockerBuild: {
|
|
39515
|
-
script: (0, docker_1.getDockerBuildDefaultScript)(((_d = buildConfig.docker) === null || _d === void 0 ? void 0 : _d.type) === "nginx" ? "ensureNginxDockerfile" : ""),
|
|
39515
|
+
script: (0, docker_1.getDockerBuildDefaultScript)(context, ((_d = buildConfig.docker) === null || _d === void 0 ? void 0 : _d.type) === "nginx" ? "ensureNginxDockerfile" : ""),
|
|
39516
39516
|
variables: {}
|
|
39517
39517
|
}
|
|
39518
39518
|
});
|
|
@@ -39741,6 +39741,8 @@ var runner_1 = __nccwpck_require__(5071);
|
|
|
39741
39741
|
var fs_1 = __nccwpck_require__(7147);
|
|
39742
39742
|
var path_1 = __importDefault(__nccwpck_require__(1017));
|
|
39743
39743
|
var gitlab_1 = __nccwpck_require__(4997);
|
|
39744
|
+
var artifactsRegistry_1 = __nccwpck_require__(8159);
|
|
39745
|
+
var gcloudServiceAccountLoginCommands_1 = __nccwpck_require__(2607);
|
|
39744
39746
|
var DOCKER_RUNNER_BUILD_VARIABLES = {
|
|
39745
39747
|
KUBERNETES_CPU_REQUEST: "0.5",
|
|
39746
39748
|
KUBERNETES_CPU_LIMIT: "1",
|
|
@@ -39748,14 +39750,21 @@ var DOCKER_RUNNER_BUILD_VARIABLES = {
|
|
|
39748
39750
|
KUBERNETES_MEMORY_LIMIT: "2Gi"
|
|
39749
39751
|
};
|
|
39750
39752
|
var getDockerImageVariables = function (context) {
|
|
39751
|
-
return {
|
|
39753
|
+
return __assign(__assign({}, (0, deploy_1.isOfDeployType)(context.componentConfig.deploy, "google-cloudrun") ? {
|
|
39754
|
+
DOCKER_REGISTRY: (0, artifactsRegistry_1.getArtifactsRegistryHost)(context),
|
|
39755
|
+
DOCKER_IMAGE: (0, artifactsRegistry_1.getArtifactsRegistryImageName)(context),
|
|
39756
|
+
DOCKER_CACHE_IMAGE: (0, artifactsRegistry_1.getArtifactsRegistryBuildCacheImage)(context)
|
|
39757
|
+
} :
|
|
39758
|
+
// gitlab registry:
|
|
39759
|
+
{
|
|
39752
39760
|
DOCKER_REGISTRY: "$CI_REGISTRY",
|
|
39753
|
-
|
|
39754
|
-
|
|
39761
|
+
DOCKER_CACHE_IMAGE: "$CI_REGISTRY_IMAGE/caches/" + context.componentName,
|
|
39762
|
+
// ONLY USED IN KUBERNETES
|
|
39755
39763
|
DOCKER_IMAGE_NAME: context.environment.shortName + "/" + context.componentName,
|
|
39756
|
-
DOCKER_IMAGE: "$
|
|
39764
|
+
DOCKER_IMAGE: "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
39765
|
+
}), {
|
|
39757
39766
|
DOCKER_IMAGE_TAG: "$CI_COMMIT_SHA"
|
|
39758
|
-
};
|
|
39767
|
+
});
|
|
39759
39768
|
};
|
|
39760
39769
|
exports.getDockerImageVariables = getDockerImageVariables;
|
|
39761
39770
|
/**
|
|
@@ -39810,9 +39819,12 @@ var createDockerBuildJobBase = function (context, _a) {
|
|
|
39810
39819
|
}, def);
|
|
39811
39820
|
};
|
|
39812
39821
|
exports.createDockerBuildJobBase = createDockerBuildJobBase;
|
|
39813
|
-
|
|
39814
|
-
|
|
39815
|
-
|
|
39822
|
+
var gitlabDockerLogin = function (context) {
|
|
39823
|
+
return (0, deploy_1.isOfDeployType)(context.componentConfig.deploy, "google-cloudrun") ? __spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), ["gcloud auth configure-docker ".concat((0, artifactsRegistry_1.getArtifactsRegistryHost)(context))], false) : ["docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY"];
|
|
39824
|
+
};
|
|
39825
|
+
exports.gitlabDockerLogin = gitlabDockerLogin;
|
|
39826
|
+
var getDockerBuildDefaultScript = function (context, ensureDockerFileScript) {
|
|
39827
|
+
return __spreadArray(__spreadArray(__spreadArray([ensureDockerFileScript], __read((0, gitlab_1.collapseableSection)("docker-login", "Docker Login")((0, exports.gitlabDockerLogin)(context))), false), __read((0, gitlab_1.collapseableSection)("docker-build", "Docker build")(["docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile . --build-arg BUILDKIT_INLINE_CACHE=1" //BUILDKIT_INLINE_CACHE, see https://testdriven.io/blog/faster-ci-builds-with-docker-cache/
|
|
39816
39828
|
])), false), __read((0, gitlab_1.collapseableSection)("docker-push", "Docker push and tag")(["docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG", "docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE", "docker push $DOCKER_CACHE_IMAGE"])), false).filter(Boolean);
|
|
39817
39829
|
};
|
|
39818
39830
|
exports.getDockerBuildDefaultScript = getDockerBuildDefaultScript;
|
|
@@ -39992,7 +40004,7 @@ var createNodeBuildJobs = function (context) {
|
|
|
39992
40004
|
jobTags: buildConfig.jobTags
|
|
39993
40005
|
} : undefined,
|
|
39994
40006
|
dockerBuild: {
|
|
39995
|
-
script: (0, docker_1.getDockerBuildDefaultScript)(buildConfig.type === "node-static" || buildConfig.type === "storybook" ? "ensureNginxDockerfile" : "ensureNodeDockerfile"),
|
|
40007
|
+
script: (0, docker_1.getDockerBuildDefaultScript)(context, buildConfig.type === "node-static" || buildConfig.type === "storybook" ? "ensureNginxDockerfile" : "ensureNodeDockerfile"),
|
|
39996
40008
|
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
|
|
39997
40009
|
variables: {
|
|
39998
40010
|
// only required for non static
|
|
@@ -40254,7 +40266,7 @@ var createMeteorBuildJobs = function (context) {
|
|
|
40254
40266
|
}
|
|
40255
40267
|
} : undefined,
|
|
40256
40268
|
dockerBuild: {
|
|
40257
|
-
script: (0, docker_1.getDockerBuildDefaultScript)("ensureMeteorDockerfile"),
|
|
40269
|
+
script: (0, docker_1.getDockerBuildDefaultScript)(context, "ensureMeteorDockerfile"),
|
|
40258
40270
|
variables: {
|
|
40259
40271
|
METEOR_INSTALL_SCRIPTS: buildConfig.installScripts ? "true" : ""
|
|
40260
40272
|
}
|
|
@@ -40486,6 +40498,15 @@ var __read = this && this.__read || function (o, n) {
|
|
|
40486
40498
|
}
|
|
40487
40499
|
return ar;
|
|
40488
40500
|
};
|
|
40501
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
40502
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40503
|
+
if (ar || !(i in from)) {
|
|
40504
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
40505
|
+
ar[i] = from[i];
|
|
40506
|
+
}
|
|
40507
|
+
}
|
|
40508
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
40509
|
+
};
|
|
40489
40510
|
exports.__esModule = true;
|
|
40490
40511
|
exports.createRailsBuildJobs = void 0;
|
|
40491
40512
|
var base_1 = __nccwpck_require__(8035);
|
|
@@ -40502,7 +40523,7 @@ var createRailsBuildJobs = function (context) {
|
|
|
40502
40523
|
return (0, base_1.createBuildJobs)(context, {
|
|
40503
40524
|
appBuild: undefined,
|
|
40504
40525
|
dockerBuild: {
|
|
40505
|
-
script: (0, docker_1.getDockerBuildDefaultScript)(),
|
|
40526
|
+
script: (0, docker_1.getDockerBuildDefaultScript)(context),
|
|
40506
40527
|
variables: {}
|
|
40507
40528
|
}
|
|
40508
40529
|
});
|
|
@@ -40519,9 +40540,9 @@ var createRailsBuildJobs = function (context) {
|
|
|
40519
40540
|
dockerBuild: {
|
|
40520
40541
|
variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), context.componentConfig.build.extraVars),
|
|
40521
40542
|
// custom script
|
|
40522
|
-
script: [docker_1.gitlabDockerLogin, "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
|
|
40543
|
+
script: __spreadArray(__spreadArray([], __read((0, docker_1.gitlabDockerLogin)(context)), false), ["docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
|
|
40523
40544
|
// replace private git ssh gem sources with https to make bundler with credentials via env var work
|
|
40524
|
-
"sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs, " ").concat((_c = (_b = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packExtraArgs) === null || _b === void 0 ? void 0 : _b.join(" ")) !== null && _c !== void 0 ? _c : "")]
|
|
40545
|
+
"sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs, " ").concat((_c = (_b = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packExtraArgs) === null || _b === void 0 ? void 0 : _b.join(" ")) !== null && _c !== void 0 ? _c : "")], false)
|
|
40525
40546
|
}
|
|
40526
40547
|
});
|
|
40527
40548
|
};
|
|
@@ -40904,7 +40925,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
40904
40925
|
|
|
40905
40926
|
exports.__esModule = true;
|
|
40906
40927
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
40907
|
-
exports.PIPELINE_IMAGE_TAG = "main-
|
|
40928
|
+
exports.PIPELINE_IMAGE_TAG = "main-67111f50" || 0;
|
|
40908
40929
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
40909
40930
|
|
|
40910
40931
|
/***/ }),
|
|
@@ -42468,11 +42489,29 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
42468
42489
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
42469
42490
|
};
|
|
42470
42491
|
exports.__esModule = true;
|
|
42471
|
-
exports.getDeleteUnusedImagesCommands = exports.
|
|
42472
|
-
var docker_1 = __nccwpck_require__(3219);
|
|
42492
|
+
exports.getDeleteUnusedImagesCommands = exports.getArtifactsRegistryImage = exports.getArtifactsRegistryBuildCacheImage = exports.getArtifactsRegistryImageName = exports.getArtifactsRegistryDockerUrl = exports.getArtifactsRegistryHost = void 0;
|
|
42473
42493
|
var gitlab_1 = __nccwpck_require__(4997);
|
|
42474
42494
|
var types_1 = __nccwpck_require__(3109);
|
|
42475
42495
|
var removeFirstLinesFromCommandOutput_1 = __nccwpck_require__(7547);
|
|
42496
|
+
var getArtifactsRegistryHost = function (_a) {
|
|
42497
|
+
var deploy = _a.componentConfig.deploy;
|
|
42498
|
+
if (!(0, types_1.isOfDeployType)(deploy, "google-cloudrun")) {
|
|
42499
|
+
// should not happen
|
|
42500
|
+
throw new Error("deploy config is wrong");
|
|
42501
|
+
}
|
|
42502
|
+
return "".concat(deploy.region, "-docker.pkg.dev");
|
|
42503
|
+
};
|
|
42504
|
+
exports.getArtifactsRegistryHost = getArtifactsRegistryHost;
|
|
42505
|
+
var getArtifactsRegistryDockerUrl = function (context) {
|
|
42506
|
+
var deployConfig = context.componentConfig.deploy;
|
|
42507
|
+
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
42508
|
+
// should not happen
|
|
42509
|
+
throw new Error("deploy config is wrong");
|
|
42510
|
+
}
|
|
42511
|
+
var fullAppName = "".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName);
|
|
42512
|
+
return "".concat((0, exports.getArtifactsRegistryHost)(context), "/").concat(deployConfig.projectId, "/catladder-deploy/").concat(fullAppName);
|
|
42513
|
+
};
|
|
42514
|
+
exports.getArtifactsRegistryDockerUrl = getArtifactsRegistryDockerUrl;
|
|
42476
42515
|
/**
|
|
42477
42516
|
*
|
|
42478
42517
|
* 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
|
|
@@ -42482,37 +42521,25 @@ var getArtifactsRegistryImageName = function (context, lecacyReviewImageName) {
|
|
|
42482
42521
|
if (lecacyReviewImageName === void 0) {
|
|
42483
42522
|
lecacyReviewImageName = false;
|
|
42484
42523
|
}
|
|
42485
|
-
var deployConfig = context.componentConfig.deploy;
|
|
42486
|
-
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
42487
|
-
// should not happen
|
|
42488
|
-
throw new Error("deploy config is wrong");
|
|
42489
|
-
}
|
|
42490
42524
|
if (lecacyReviewImageName && context.environment.envType !== "review") {
|
|
42491
42525
|
throw new Error("lecacyReviewImageName is only allowed for review app");
|
|
42492
42526
|
}
|
|
42493
|
-
var
|
|
42494
|
-
var dockerUrl = "".concat(deployConfig.region, "-docker.pkg.dev/").concat(deployConfig.projectId, "/catladder-deploy/").concat(fullAppName);
|
|
42527
|
+
var dockerUrl = (0, exports.getArtifactsRegistryDockerUrl)(context);
|
|
42495
42528
|
var gcloudImagePath = __spreadArray([dockerUrl, context.environment.shortName, context.componentName], __read(context.environment.envType === "review" && !lecacyReviewImageName ? [(_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.reviewSlug] : []), false);
|
|
42496
42529
|
return gcloudImagePath.join("/");
|
|
42497
42530
|
};
|
|
42498
42531
|
exports.getArtifactsRegistryImageName = getArtifactsRegistryImageName;
|
|
42532
|
+
var getArtifactsRegistryBuildCacheImage = function (context) {
|
|
42533
|
+
var dockerUrl = (0, exports.getArtifactsRegistryDockerUrl)(context);
|
|
42534
|
+
// does not include env, so that after merge, you might get more cache hits (review-->dev)
|
|
42535
|
+
var gcloudImagePath = [dockerUrl, "caches", context.componentName];
|
|
42536
|
+
return gcloudImagePath.join("/");
|
|
42537
|
+
};
|
|
42538
|
+
exports.getArtifactsRegistryBuildCacheImage = getArtifactsRegistryBuildCacheImage;
|
|
42499
42539
|
var getArtifactsRegistryImage = function (context) {
|
|
42500
42540
|
return "".concat((0, exports.getArtifactsRegistryImageName)(context), ":$DOCKER_IMAGE_TAG");
|
|
42501
42541
|
};
|
|
42502
42542
|
exports.getArtifactsRegistryImage = getArtifactsRegistryImage;
|
|
42503
|
-
/**
|
|
42504
|
-
* commands to pull the image from the default registry and pushes it to google artifact registry. We might build and push directly to google artifact registry in the future
|
|
42505
|
-
*/
|
|
42506
|
-
var getPushToArtifactsRegistryCommands = function (context) {
|
|
42507
|
-
var deployConfig = context.componentConfig.deploy;
|
|
42508
|
-
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
42509
|
-
// should not happen
|
|
42510
|
-
throw new Error("deploy config is wrong");
|
|
42511
|
-
}
|
|
42512
|
-
var fullImageName = (0, exports.getArtifactsRegistryImageName)(context);
|
|
42513
|
-
return [docker_1.gitlabDockerLogin, "gcloud auth configure-docker ".concat(deployConfig.region, "-docker.pkg.dev"), "docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_TAG", "docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG ".concat(fullImageName, ":$DOCKER_IMAGE_TAG"), "docker push ".concat(fullImageName, ":$DOCKER_IMAGE_TAG")];
|
|
42514
|
-
};
|
|
42515
|
-
exports.getPushToArtifactsRegistryCommands = getPushToArtifactsRegistryCommands;
|
|
42516
42543
|
var getDeleteImageCommands = function (fullImageName, keepNewest) {
|
|
42517
42544
|
if (keepNewest === void 0) {
|
|
42518
42545
|
keepNewest = 0;
|
|
@@ -42548,7 +42575,8 @@ var getDeleteUnusedImagesCommands = function (context, keep) {
|
|
|
42548
42575
|
throw new Error("deploy config is wrong");
|
|
42549
42576
|
}
|
|
42550
42577
|
var fullImageName = (0, exports.getArtifactsRegistryImageName)(context);
|
|
42551
|
-
|
|
42578
|
+
var buildCacheImageName = (0, exports.getArtifactsRegistryBuildCacheImage)(context);
|
|
42579
|
+
return __spreadArray(__spreadArray(__spreadArray([], __read(getDeleteImageCommands(fullImageName, keep)), false), __read(getDeleteImageCommands(buildCacheImageName, 1)), false), __read(context.environment.envType === "review" ? (0, gitlab_1.allowFailureInScripts)(getDeleteImageCommands((0, exports.getArtifactsRegistryImageName)(context, true), 0)) : []), false);
|
|
42552
42580
|
};
|
|
42553
42581
|
exports.getDeleteUnusedImagesCommands = getDeleteUnusedImagesCommands;
|
|
42554
42582
|
|
|
@@ -42893,7 +42921,7 @@ var createGoogleCloudRunDeployJobs = function (context) {
|
|
|
42893
42921
|
"gcloud beta run jobs executions list ".concat(commonArgsString, " --job ").concat(jobName, " --format=\"value(name)\" | xargs -I {} gcloud beta run jobs executions delete {} --quiet ").concat(commonArgsString), "gcloud beta run jobs delete ".concat(jobName, " ").concat(commonArgsString)];
|
|
42894
42922
|
});
|
|
42895
42923
|
};
|
|
42896
|
-
var deployScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray(
|
|
42924
|
+
var deployScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, gitlab_1.collapseableSection)("prepare", "Prepare...")(__spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), __read(setExtraVarsScripts(deployConfig)), false))), false), __read((0, gitlab_1.collapseableSection)("deploy", "Deploy to cloud run")(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(["echo \"$ENV_VARS\" > ____envvars.yaml"], __read(deployConfig.cloudSql ? (0, database_1.getDatabaseCreateScript)(context, deployConfig) // we create the db, so that we can also delete it afterwards
|
|
42897
42925
|
: []), false), __read(getCreateScheduleScripts()), false), __read(getJobCreateScripts()), false), __read(getJobRunScripts("preDeploy")), false), __read(deployConfig.service !== false ? [getServiceDeployScript(deployConfig.service)] : []), false), __read(Object.entries((_b = deployConfig.additionalServices) !== null && _b !== void 0 ? _b : {}).map(function (_a) {
|
|
42898
42926
|
var _b = __read(_a, 2),
|
|
42899
42927
|
name = _b[0],
|
|
@@ -43398,6 +43426,37 @@ var __assign = this && this.__assign || function () {
|
|
|
43398
43426
|
};
|
|
43399
43427
|
return __assign.apply(this, arguments);
|
|
43400
43428
|
};
|
|
43429
|
+
var __read = this && this.__read || function (o, n) {
|
|
43430
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
43431
|
+
if (!m) return o;
|
|
43432
|
+
var i = m.call(o),
|
|
43433
|
+
r,
|
|
43434
|
+
ar = [],
|
|
43435
|
+
e;
|
|
43436
|
+
try {
|
|
43437
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
43438
|
+
} catch (error) {
|
|
43439
|
+
e = {
|
|
43440
|
+
error: error
|
|
43441
|
+
};
|
|
43442
|
+
} finally {
|
|
43443
|
+
try {
|
|
43444
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
43445
|
+
} finally {
|
|
43446
|
+
if (e) throw e.error;
|
|
43447
|
+
}
|
|
43448
|
+
}
|
|
43449
|
+
return ar;
|
|
43450
|
+
};
|
|
43451
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
43452
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
43453
|
+
if (ar || !(i in from)) {
|
|
43454
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
43455
|
+
ar[i] = from[i];
|
|
43456
|
+
}
|
|
43457
|
+
}
|
|
43458
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
43459
|
+
};
|
|
43401
43460
|
exports.__esModule = true;
|
|
43402
43461
|
exports.createDockerTagDeployJobs = void 0;
|
|
43403
43462
|
var docker_1 = __nccwpck_require__(3219);
|
|
@@ -43415,7 +43474,7 @@ var createDockerTagDeployJobs = function (context) {
|
|
|
43415
43474
|
var tag = deployConfig.tag;
|
|
43416
43475
|
return (0, base_1.createDeployementJobs)(context, {
|
|
43417
43476
|
deploy: __assign(__assign({}, (0, docker_1.getDockerJobBaseProps)(context)), {
|
|
43418
|
-
script: [docker_1.gitlabDockerLogin, "docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_TAG", "docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_IMAGE:".concat(tag), "docker push $DOCKER_IMAGE:".concat(tag), "echo \"pushed as $DOCKER_IMAGE:".concat(tag, "\"")]
|
|
43477
|
+
script: __spreadArray(__spreadArray([], __read((0, docker_1.gitlabDockerLogin)(context)), false), ["docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_TAG", "docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_IMAGE:".concat(tag), "docker push $DOCKER_IMAGE:".concat(tag), "echo \"pushed as $DOCKER_IMAGE:".concat(tag, "\"")], false)
|
|
43419
43478
|
})
|
|
43420
43479
|
});
|
|
43421
43480
|
};
|
|
@@ -354051,7 +354051,7 @@ var createCustomBuildJobs = function (context) {
|
|
|
354051
354051
|
}
|
|
354052
354052
|
} : undefined,
|
|
354053
354053
|
dockerBuild: {
|
|
354054
|
-
script: (0, docker_1.getDockerBuildDefaultScript)(((_d = buildConfig.docker) === null || _d === void 0 ? void 0 : _d.type) === "nginx" ? "ensureNginxDockerfile" : ""),
|
|
354054
|
+
script: (0, docker_1.getDockerBuildDefaultScript)(context, ((_d = buildConfig.docker) === null || _d === void 0 ? void 0 : _d.type) === "nginx" ? "ensureNginxDockerfile" : ""),
|
|
354055
354055
|
variables: {}
|
|
354056
354056
|
}
|
|
354057
354057
|
});
|
|
@@ -354280,6 +354280,8 @@ var runner_1 = __nccwpck_require__(55071);
|
|
|
354280
354280
|
var fs_1 = __nccwpck_require__(57147);
|
|
354281
354281
|
var path_1 = __importDefault(__nccwpck_require__(71017));
|
|
354282
354282
|
var gitlab_1 = __nccwpck_require__(84997);
|
|
354283
|
+
var artifactsRegistry_1 = __nccwpck_require__(28159);
|
|
354284
|
+
var gcloudServiceAccountLoginCommands_1 = __nccwpck_require__(22607);
|
|
354283
354285
|
var DOCKER_RUNNER_BUILD_VARIABLES = {
|
|
354284
354286
|
KUBERNETES_CPU_REQUEST: "0.5",
|
|
354285
354287
|
KUBERNETES_CPU_LIMIT: "1",
|
|
@@ -354287,14 +354289,21 @@ var DOCKER_RUNNER_BUILD_VARIABLES = {
|
|
|
354287
354289
|
KUBERNETES_MEMORY_LIMIT: "2Gi"
|
|
354288
354290
|
};
|
|
354289
354291
|
var getDockerImageVariables = function (context) {
|
|
354290
|
-
return {
|
|
354292
|
+
return __assign(__assign({}, (0, deploy_1.isOfDeployType)(context.componentConfig.deploy, "google-cloudrun") ? {
|
|
354293
|
+
DOCKER_REGISTRY: (0, artifactsRegistry_1.getArtifactsRegistryHost)(context),
|
|
354294
|
+
DOCKER_IMAGE: (0, artifactsRegistry_1.getArtifactsRegistryImageName)(context),
|
|
354295
|
+
DOCKER_CACHE_IMAGE: (0, artifactsRegistry_1.getArtifactsRegistryBuildCacheImage)(context)
|
|
354296
|
+
} :
|
|
354297
|
+
// gitlab registry:
|
|
354298
|
+
{
|
|
354291
354299
|
DOCKER_REGISTRY: "$CI_REGISTRY",
|
|
354292
|
-
|
|
354293
|
-
|
|
354300
|
+
DOCKER_CACHE_IMAGE: "$CI_REGISTRY_IMAGE/caches/" + context.componentName,
|
|
354301
|
+
// ONLY USED IN KUBERNETES
|
|
354294
354302
|
DOCKER_IMAGE_NAME: context.environment.shortName + "/" + context.componentName,
|
|
354295
|
-
DOCKER_IMAGE: "$
|
|
354303
|
+
DOCKER_IMAGE: "$CI_REGISTRY_IMAGE/$DOCKER_IMAGE_NAME"
|
|
354304
|
+
}), {
|
|
354296
354305
|
DOCKER_IMAGE_TAG: "$CI_COMMIT_SHA"
|
|
354297
|
-
};
|
|
354306
|
+
});
|
|
354298
354307
|
};
|
|
354299
354308
|
exports.getDockerImageVariables = getDockerImageVariables;
|
|
354300
354309
|
/**
|
|
@@ -354349,9 +354358,12 @@ var createDockerBuildJobBase = function (context, _a) {
|
|
|
354349
354358
|
}, def);
|
|
354350
354359
|
};
|
|
354351
354360
|
exports.createDockerBuildJobBase = createDockerBuildJobBase;
|
|
354352
|
-
|
|
354353
|
-
|
|
354354
|
-
|
|
354361
|
+
var gitlabDockerLogin = function (context) {
|
|
354362
|
+
return (0, deploy_1.isOfDeployType)(context.componentConfig.deploy, "google-cloudrun") ? __spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), ["gcloud auth configure-docker ".concat((0, artifactsRegistry_1.getArtifactsRegistryHost)(context))], false) : ["docker login --username gitlab-ci-token --password $CI_JOB_TOKEN $CI_REGISTRY"];
|
|
354363
|
+
};
|
|
354364
|
+
exports.gitlabDockerLogin = gitlabDockerLogin;
|
|
354365
|
+
var getDockerBuildDefaultScript = function (context, ensureDockerFileScript) {
|
|
354366
|
+
return __spreadArray(__spreadArray(__spreadArray([ensureDockerFileScript], __read((0, gitlab_1.collapseableSection)("docker-login", "Docker Login")((0, exports.gitlabDockerLogin)(context))), false), __read((0, gitlab_1.collapseableSection)("docker-build", "Docker build")(["docker build --network host --cache-from $DOCKER_CACHE_IMAGE --tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG -f $APP_DIR/Dockerfile . --build-arg BUILDKIT_INLINE_CACHE=1" //BUILDKIT_INLINE_CACHE, see https://testdriven.io/blog/faster-ci-builds-with-docker-cache/
|
|
354355
354367
|
])), false), __read((0, gitlab_1.collapseableSection)("docker-push", "Docker push and tag")(["docker push $DOCKER_IMAGE:$DOCKER_IMAGE_TAG", "docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_CACHE_IMAGE", "docker push $DOCKER_CACHE_IMAGE"])), false).filter(Boolean);
|
|
354356
354368
|
};
|
|
354357
354369
|
exports.getDockerBuildDefaultScript = getDockerBuildDefaultScript;
|
|
@@ -354531,7 +354543,7 @@ var createNodeBuildJobs = function (context) {
|
|
|
354531
354543
|
jobTags: buildConfig.jobTags
|
|
354532
354544
|
} : undefined,
|
|
354533
354545
|
dockerBuild: {
|
|
354534
|
-
script: (0, docker_1.getDockerBuildDefaultScript)(buildConfig.type === "node-static" || buildConfig.type === "storybook" ? "ensureNginxDockerfile" : "ensureNodeDockerfile"),
|
|
354546
|
+
script: (0, docker_1.getDockerBuildDefaultScript)(context, buildConfig.type === "node-static" || buildConfig.type === "storybook" ? "ensureNginxDockerfile" : "ensureNodeDockerfile"),
|
|
354535
354547
|
cache: __spreadArray([], __read((0, cache_1.getYarnCache)(context, "pull")), false),
|
|
354536
354548
|
variables: {
|
|
354537
354549
|
// only required for non static
|
|
@@ -354793,7 +354805,7 @@ var createMeteorBuildJobs = function (context) {
|
|
|
354793
354805
|
}
|
|
354794
354806
|
} : undefined,
|
|
354795
354807
|
dockerBuild: {
|
|
354796
|
-
script: (0, docker_1.getDockerBuildDefaultScript)("ensureMeteorDockerfile"),
|
|
354808
|
+
script: (0, docker_1.getDockerBuildDefaultScript)(context, "ensureMeteorDockerfile"),
|
|
354797
354809
|
variables: {
|
|
354798
354810
|
METEOR_INSTALL_SCRIPTS: buildConfig.installScripts ? "true" : ""
|
|
354799
354811
|
}
|
|
@@ -355025,6 +355037,15 @@ var __read = this && this.__read || function (o, n) {
|
|
|
355025
355037
|
}
|
|
355026
355038
|
return ar;
|
|
355027
355039
|
};
|
|
355040
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
355041
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
355042
|
+
if (ar || !(i in from)) {
|
|
355043
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
355044
|
+
ar[i] = from[i];
|
|
355045
|
+
}
|
|
355046
|
+
}
|
|
355047
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
355048
|
+
};
|
|
355028
355049
|
exports.__esModule = true;
|
|
355029
355050
|
exports.createRailsBuildJobs = void 0;
|
|
355030
355051
|
var base_1 = __nccwpck_require__(18035);
|
|
@@ -355041,7 +355062,7 @@ var createRailsBuildJobs = function (context) {
|
|
|
355041
355062
|
return (0, base_1.createBuildJobs)(context, {
|
|
355042
355063
|
appBuild: undefined,
|
|
355043
355064
|
dockerBuild: {
|
|
355044
|
-
script: (0, docker_1.getDockerBuildDefaultScript)(),
|
|
355065
|
+
script: (0, docker_1.getDockerBuildDefaultScript)(context),
|
|
355045
355066
|
variables: {}
|
|
355046
355067
|
}
|
|
355047
355068
|
});
|
|
@@ -355058,9 +355079,9 @@ var createRailsBuildJobs = function (context) {
|
|
|
355058
355079
|
dockerBuild: {
|
|
355059
355080
|
variables: __assign(__assign({}, context.environment.jobOnlyVars.build.envVars), context.componentConfig.build.extraVars),
|
|
355060
355081
|
// custom script
|
|
355061
|
-
script: [docker_1.gitlabDockerLogin, "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
|
|
355082
|
+
script: __spreadArray(__spreadArray([], __read((0, docker_1.gitlabDockerLogin)(context)), false), ["docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "/pack-v").concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packVersion, "-linux.tgz | tar -zx --directory /usr/local/bin pack"), "chmod +x /usr/local/bin/pack",
|
|
355062
355083
|
// replace private git ssh gem sources with https to make bundler with credentials via env var work
|
|
355063
|
-
"sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs, " ").concat((_c = (_b = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packExtraArgs) === null || _b === void 0 ? void 0 : _b.join(" ")) !== null && _c !== void 0 ? _c : "")]
|
|
355084
|
+
"sed --in-place 's|git@\\([^:]*\\):|https://\\1/|g' Gemfile Gemfile.lock", "pack build \"$DOCKER_IMAGE:$DOCKER_IMAGE_TAG\" --builder '".concat(cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.image, "' --publish --cache-image \"$DOCKER_CACHE_IMAGE\" ").concat(packEnvArgs, " ").concat((_c = (_b = cnbConf === null || cnbConf === void 0 ? void 0 : cnbConf.packExtraArgs) === null || _b === void 0 ? void 0 : _b.join(" ")) !== null && _c !== void 0 ? _c : "")], false)
|
|
355064
355085
|
}
|
|
355065
355086
|
});
|
|
355066
355087
|
};
|
|
@@ -355443,7 +355464,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
355443
355464
|
|
|
355444
355465
|
exports.__esModule = true;
|
|
355445
355466
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
355446
|
-
exports.PIPELINE_IMAGE_TAG = "main-
|
|
355467
|
+
exports.PIPELINE_IMAGE_TAG = "main-67111f50" || 0;
|
|
355447
355468
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
355448
355469
|
|
|
355449
355470
|
/***/ }),
|
|
@@ -357007,11 +357028,29 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
357007
357028
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
357008
357029
|
};
|
|
357009
357030
|
exports.__esModule = true;
|
|
357010
|
-
exports.getDeleteUnusedImagesCommands = exports.
|
|
357011
|
-
var docker_1 = __nccwpck_require__(33219);
|
|
357031
|
+
exports.getDeleteUnusedImagesCommands = exports.getArtifactsRegistryImage = exports.getArtifactsRegistryBuildCacheImage = exports.getArtifactsRegistryImageName = exports.getArtifactsRegistryDockerUrl = exports.getArtifactsRegistryHost = void 0;
|
|
357012
357032
|
var gitlab_1 = __nccwpck_require__(84997);
|
|
357013
357033
|
var types_1 = __nccwpck_require__(63109);
|
|
357014
357034
|
var removeFirstLinesFromCommandOutput_1 = __nccwpck_require__(77547);
|
|
357035
|
+
var getArtifactsRegistryHost = function (_a) {
|
|
357036
|
+
var deploy = _a.componentConfig.deploy;
|
|
357037
|
+
if (!(0, types_1.isOfDeployType)(deploy, "google-cloudrun")) {
|
|
357038
|
+
// should not happen
|
|
357039
|
+
throw new Error("deploy config is wrong");
|
|
357040
|
+
}
|
|
357041
|
+
return "".concat(deploy.region, "-docker.pkg.dev");
|
|
357042
|
+
};
|
|
357043
|
+
exports.getArtifactsRegistryHost = getArtifactsRegistryHost;
|
|
357044
|
+
var getArtifactsRegistryDockerUrl = function (context) {
|
|
357045
|
+
var deployConfig = context.componentConfig.deploy;
|
|
357046
|
+
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
357047
|
+
// should not happen
|
|
357048
|
+
throw new Error("deploy config is wrong");
|
|
357049
|
+
}
|
|
357050
|
+
var fullAppName = "".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName);
|
|
357051
|
+
return "".concat((0, exports.getArtifactsRegistryHost)(context), "/").concat(deployConfig.projectId, "/catladder-deploy/").concat(fullAppName);
|
|
357052
|
+
};
|
|
357053
|
+
exports.getArtifactsRegistryDockerUrl = getArtifactsRegistryDockerUrl;
|
|
357015
357054
|
/**
|
|
357016
357055
|
*
|
|
357017
357056
|
* 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
|
|
@@ -357021,37 +357060,25 @@ var getArtifactsRegistryImageName = function (context, lecacyReviewImageName) {
|
|
|
357021
357060
|
if (lecacyReviewImageName === void 0) {
|
|
357022
357061
|
lecacyReviewImageName = false;
|
|
357023
357062
|
}
|
|
357024
|
-
var deployConfig = context.componentConfig.deploy;
|
|
357025
|
-
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
357026
|
-
// should not happen
|
|
357027
|
-
throw new Error("deploy config is wrong");
|
|
357028
|
-
}
|
|
357029
357063
|
if (lecacyReviewImageName && context.environment.envType !== "review") {
|
|
357030
357064
|
throw new Error("lecacyReviewImageName is only allowed for review app");
|
|
357031
357065
|
}
|
|
357032
|
-
var
|
|
357033
|
-
var dockerUrl = "".concat(deployConfig.region, "-docker.pkg.dev/").concat(deployConfig.projectId, "/catladder-deploy/").concat(fullAppName);
|
|
357066
|
+
var dockerUrl = (0, exports.getArtifactsRegistryDockerUrl)(context);
|
|
357034
357067
|
var gcloudImagePath = __spreadArray([dockerUrl, context.environment.shortName, context.componentName], __read(context.environment.envType === "review" && !lecacyReviewImageName ? [(_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.reviewSlug] : []), false);
|
|
357035
357068
|
return gcloudImagePath.join("/");
|
|
357036
357069
|
};
|
|
357037
357070
|
exports.getArtifactsRegistryImageName = getArtifactsRegistryImageName;
|
|
357071
|
+
var getArtifactsRegistryBuildCacheImage = function (context) {
|
|
357072
|
+
var dockerUrl = (0, exports.getArtifactsRegistryDockerUrl)(context);
|
|
357073
|
+
// does not include env, so that after merge, you might get more cache hits (review-->dev)
|
|
357074
|
+
var gcloudImagePath = [dockerUrl, "caches", context.componentName];
|
|
357075
|
+
return gcloudImagePath.join("/");
|
|
357076
|
+
};
|
|
357077
|
+
exports.getArtifactsRegistryBuildCacheImage = getArtifactsRegistryBuildCacheImage;
|
|
357038
357078
|
var getArtifactsRegistryImage = function (context) {
|
|
357039
357079
|
return "".concat((0, exports.getArtifactsRegistryImageName)(context), ":$DOCKER_IMAGE_TAG");
|
|
357040
357080
|
};
|
|
357041
357081
|
exports.getArtifactsRegistryImage = getArtifactsRegistryImage;
|
|
357042
|
-
/**
|
|
357043
|
-
* commands to pull the image from the default registry and pushes it to google artifact registry. We might build and push directly to google artifact registry in the future
|
|
357044
|
-
*/
|
|
357045
|
-
var getPushToArtifactsRegistryCommands = function (context) {
|
|
357046
|
-
var deployConfig = context.componentConfig.deploy;
|
|
357047
|
-
if (!(0, types_1.isOfDeployType)(deployConfig, "google-cloudrun")) {
|
|
357048
|
-
// should not happen
|
|
357049
|
-
throw new Error("deploy config is wrong");
|
|
357050
|
-
}
|
|
357051
|
-
var fullImageName = (0, exports.getArtifactsRegistryImageName)(context);
|
|
357052
|
-
return [docker_1.gitlabDockerLogin, "gcloud auth configure-docker ".concat(deployConfig.region, "-docker.pkg.dev"), "docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_TAG", "docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG ".concat(fullImageName, ":$DOCKER_IMAGE_TAG"), "docker push ".concat(fullImageName, ":$DOCKER_IMAGE_TAG")];
|
|
357053
|
-
};
|
|
357054
|
-
exports.getPushToArtifactsRegistryCommands = getPushToArtifactsRegistryCommands;
|
|
357055
357082
|
var getDeleteImageCommands = function (fullImageName, keepNewest) {
|
|
357056
357083
|
if (keepNewest === void 0) {
|
|
357057
357084
|
keepNewest = 0;
|
|
@@ -357087,7 +357114,8 @@ var getDeleteUnusedImagesCommands = function (context, keep) {
|
|
|
357087
357114
|
throw new Error("deploy config is wrong");
|
|
357088
357115
|
}
|
|
357089
357116
|
var fullImageName = (0, exports.getArtifactsRegistryImageName)(context);
|
|
357090
|
-
|
|
357117
|
+
var buildCacheImageName = (0, exports.getArtifactsRegistryBuildCacheImage)(context);
|
|
357118
|
+
return __spreadArray(__spreadArray(__spreadArray([], __read(getDeleteImageCommands(fullImageName, keep)), false), __read(getDeleteImageCommands(buildCacheImageName, 1)), false), __read(context.environment.envType === "review" ? (0, gitlab_1.allowFailureInScripts)(getDeleteImageCommands((0, exports.getArtifactsRegistryImageName)(context, true), 0)) : []), false);
|
|
357091
357119
|
};
|
|
357092
357120
|
exports.getDeleteUnusedImagesCommands = getDeleteUnusedImagesCommands;
|
|
357093
357121
|
|
|
@@ -357432,7 +357460,7 @@ var createGoogleCloudRunDeployJobs = function (context) {
|
|
|
357432
357460
|
"gcloud beta run jobs executions list ".concat(commonArgsString, " --job ").concat(jobName, " --format=\"value(name)\" | xargs -I {} gcloud beta run jobs executions delete {} --quiet ").concat(commonArgsString), "gcloud beta run jobs delete ".concat(jobName, " ").concat(commonArgsString)];
|
|
357433
357461
|
});
|
|
357434
357462
|
};
|
|
357435
|
-
var deployScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray(
|
|
357463
|
+
var deployScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, gitlab_1.collapseableSection)("prepare", "Prepare...")(__spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), __read(setExtraVarsScripts(deployConfig)), false))), false), __read((0, gitlab_1.collapseableSection)("deploy", "Deploy to cloud run")(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(["echo \"$ENV_VARS\" > ____envvars.yaml"], __read(deployConfig.cloudSql ? (0, database_1.getDatabaseCreateScript)(context, deployConfig) // we create the db, so that we can also delete it afterwards
|
|
357436
357464
|
: []), false), __read(getCreateScheduleScripts()), false), __read(getJobCreateScripts()), false), __read(getJobRunScripts("preDeploy")), false), __read(deployConfig.service !== false ? [getServiceDeployScript(deployConfig.service)] : []), false), __read(Object.entries((_b = deployConfig.additionalServices) !== null && _b !== void 0 ? _b : {}).map(function (_a) {
|
|
357437
357465
|
var _b = __read(_a, 2),
|
|
357438
357466
|
name = _b[0],
|
|
@@ -357937,6 +357965,37 @@ var __assign = this && this.__assign || function () {
|
|
|
357937
357965
|
};
|
|
357938
357966
|
return __assign.apply(this, arguments);
|
|
357939
357967
|
};
|
|
357968
|
+
var __read = this && this.__read || function (o, n) {
|
|
357969
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
357970
|
+
if (!m) return o;
|
|
357971
|
+
var i = m.call(o),
|
|
357972
|
+
r,
|
|
357973
|
+
ar = [],
|
|
357974
|
+
e;
|
|
357975
|
+
try {
|
|
357976
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
357977
|
+
} catch (error) {
|
|
357978
|
+
e = {
|
|
357979
|
+
error: error
|
|
357980
|
+
};
|
|
357981
|
+
} finally {
|
|
357982
|
+
try {
|
|
357983
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
357984
|
+
} finally {
|
|
357985
|
+
if (e) throw e.error;
|
|
357986
|
+
}
|
|
357987
|
+
}
|
|
357988
|
+
return ar;
|
|
357989
|
+
};
|
|
357990
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
357991
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
357992
|
+
if (ar || !(i in from)) {
|
|
357993
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
357994
|
+
ar[i] = from[i];
|
|
357995
|
+
}
|
|
357996
|
+
}
|
|
357997
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
357998
|
+
};
|
|
357940
357999
|
exports.__esModule = true;
|
|
357941
358000
|
exports.createDockerTagDeployJobs = void 0;
|
|
357942
358001
|
var docker_1 = __nccwpck_require__(33219);
|
|
@@ -357954,7 +358013,7 @@ var createDockerTagDeployJobs = function (context) {
|
|
|
357954
358013
|
var tag = deployConfig.tag;
|
|
357955
358014
|
return (0, base_1.createDeployementJobs)(context, {
|
|
357956
358015
|
deploy: __assign(__assign({}, (0, docker_1.getDockerJobBaseProps)(context)), {
|
|
357957
|
-
script: [docker_1.gitlabDockerLogin, "docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_TAG", "docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_IMAGE:".concat(tag), "docker push $DOCKER_IMAGE:".concat(tag), "echo \"pushed as $DOCKER_IMAGE:".concat(tag, "\"")]
|
|
358016
|
+
script: __spreadArray(__spreadArray([], __read((0, docker_1.gitlabDockerLogin)(context)), false), ["docker pull $DOCKER_IMAGE:$DOCKER_IMAGE_TAG", "docker tag $DOCKER_IMAGE:$DOCKER_IMAGE_TAG $DOCKER_IMAGE:".concat(tag), "docker push $DOCKER_IMAGE:".concat(tag), "echo \"pushed as $DOCKER_IMAGE:".concat(tag, "\"")], false)
|
|
357958
358017
|
})
|
|
357959
358018
|
});
|
|
357960
358019
|
};
|
package/package.json
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
"license": "MIT",
|
|
55
|
-
"version": "0.0.0-main-
|
|
55
|
+
"version": "0.0.0-main-67111f50",
|
|
56
56
|
"scripts": {
|
|
57
57
|
"lint": "eslint \"src/**/*.ts\"",
|
|
58
58
|
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"node": ">=12.0.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@catladder/pipeline": "0.0.0-main-
|
|
76
|
+
"@catladder/pipeline": "0.0.0-main-67111f50",
|
|
77
77
|
"@kubernetes/client-node": "^0.16.2",
|
|
78
78
|
"@tsconfig/node14": "^1.0.1",
|
|
79
79
|
"@types/common-tags": "^1.8.0",
|