@catladder/cli 0.0.0-fix-add-openssl-dep-5500a6f2 → 0.0.0-fix-octal-fa642ad4
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/apps/cli/cli.js +2 -0
- package/dist/apps/cli/cli.js.map +1 -1
- package/dist/apps/cli/commands/{project/commandCopyDB.d.ts → cloudSQL/commandRestoreDb.d.ts} +0 -0
- package/dist/apps/cli/commands/cloudSQL/commandRestoreDb.js +176 -0
- package/dist/apps/cli/commands/cloudSQL/commandRestoreDb.js.map +1 -0
- package/dist/apps/cli/commands/cloudSQL/index.d.ts +3 -0
- package/dist/apps/cli/commands/{project/commandCopyDB.js → cloudSQL/index.js} +9 -39
- package/dist/apps/cli/commands/cloudSQL/index.js.map +1 -0
- package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.js +1 -1
- package/dist/apps/cli/commands/project/commandGetMyTotalWorktime.js.map +1 -1
- package/dist/apps/cli/commands/project/index.js +0 -2
- package/dist/apps/cli/commands/project/index.js.map +1 -1
- package/dist/apps/cli/commands/theStuffThatReallyMatters/index.js +1 -1
- package/dist/apps/cli/commands/theStuffThatReallyMatters/index.js.map +1 -1
- package/dist/apps/cli/verify/migration/oldGitlabCi.js +1 -1
- package/dist/apps/cli/verify/migration/oldGitlabCi.js.map +1 -1
- package/dist/bundles/catenv/index.js +291 -24
- package/dist/bundles/cli/index.js +536 -116
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/apps/cli/cli.ts +2 -0
- package/src/apps/cli/commands/cloudSQL/commandRestoreDb.ts +154 -0
- package/src/apps/cli/commands/cloudSQL/index.ts +8 -0
- package/src/apps/cli/commands/project/commandGetMyTotalWorktime.ts +1 -1
- package/src/apps/cli/commands/project/index.ts +1 -2
- package/src/apps/cli/commands/theStuffThatReallyMatters/index.ts +1 -1
- package/src/apps/cli/verify/migration/oldGitlabCi.ts +1 -1
- package/dist/apps/cli/commands/project/commandCopyDB.js.map +0 -1
- package/src/apps/cli/commands/project/commandCopyDB.ts +0 -92
|
@@ -38769,7 +38769,7 @@ var yarn_1 = __nccwpck_require__(464);
|
|
|
38769
38769
|
|
|
38770
38770
|
var constants_1 = __nccwpck_require__(1542);
|
|
38771
38771
|
|
|
38772
|
-
var
|
|
38772
|
+
var writeBuildInfo_1 = __nccwpck_require__(1754);
|
|
38773
38773
|
|
|
38774
38774
|
var createBuildJob = function (context, _a) {
|
|
38775
38775
|
var _b, _c, _d, _e;
|
|
@@ -38786,7 +38786,7 @@ var createBuildJob = function (context, _a) {
|
|
|
38786
38786
|
needs: [],
|
|
38787
38787
|
cache: [],
|
|
38788
38788
|
variables: __assign(__assign(__assign(__assign({}, constants_1.RUNNER_BUILD_RESOURCE_VARIABLES), variables !== null && variables !== void 0 ? variables : {}), context.environment.envVars), (_b = context.componentConfig.build.extraVars) !== null && _b !== void 0 ? _b : {}),
|
|
38789
|
-
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0,
|
|
38789
|
+
script: __spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, writeBuildInfo_1.writeBuildInfo)(context)), false), __read((0, yarn_1.ensureNodeVersion)(context)), false), ["cd ".concat(context.componentConfig.dir)], false), __read((_c = (0, utils_1.ensureArray)(script)) !== null && _c !== void 0 ? _c : []), false),
|
|
38790
38790
|
artifacts: {
|
|
38791
38791
|
paths: [(0, path_1.join)(context.componentConfig.dir, "__build_info.json")],
|
|
38792
38792
|
reports: {
|
|
@@ -38802,22 +38802,22 @@ exports.createBuildJob = createBuildJob;
|
|
|
38802
38802
|
|
|
38803
38803
|
/***/ }),
|
|
38804
38804
|
|
|
38805
|
-
/***/
|
|
38805
|
+
/***/ 1754:
|
|
38806
38806
|
/***/ ((__unused_webpack_module, exports) => {
|
|
38807
38807
|
|
|
38808
38808
|
"use strict";
|
|
38809
38809
|
|
|
38810
38810
|
|
|
38811
38811
|
exports.__esModule = true;
|
|
38812
|
-
exports.
|
|
38812
|
+
exports.writeBuildInfo = void 0;
|
|
38813
38813
|
|
|
38814
|
-
var
|
|
38814
|
+
var writeBuildInfo = function (context) {
|
|
38815
38815
|
var _a, _b;
|
|
38816
38816
|
|
|
38817
38817
|
return ["echo '{\"id\":\"".concat((_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.buildId, "\",\"time\":\"").concat((_b = context.commitInfo) === null || _b === void 0 ? void 0 : _b.buildTime, "\"}' > ").concat(context.componentConfig.dir, "/__build_info.json")];
|
|
38818
38818
|
};
|
|
38819
38819
|
|
|
38820
|
-
exports.
|
|
38820
|
+
exports.writeBuildInfo = writeBuildInfo;
|
|
38821
38821
|
|
|
38822
38822
|
/***/ }),
|
|
38823
38823
|
|
|
@@ -39193,6 +39193,8 @@ var custom_1 = __nccwpck_require__(3437);
|
|
|
39193
39193
|
|
|
39194
39194
|
var node_1 = __nccwpck_require__(6994);
|
|
39195
39195
|
|
|
39196
|
+
var rails_1 = __nccwpck_require__(4665);
|
|
39197
|
+
|
|
39196
39198
|
__exportStar(__nccwpck_require__(1197), exports);
|
|
39197
39199
|
|
|
39198
39200
|
__exportStar(__nccwpck_require__(6994), exports);
|
|
@@ -39236,6 +39238,12 @@ exports.BUILD_TYPES = {
|
|
|
39236
39238
|
defaults: function () {
|
|
39237
39239
|
return {};
|
|
39238
39240
|
}
|
|
39241
|
+
},
|
|
39242
|
+
rails: {
|
|
39243
|
+
jobs: rails_1.createRailsJobs,
|
|
39244
|
+
defaults: function () {
|
|
39245
|
+
return {};
|
|
39246
|
+
}
|
|
39239
39247
|
}
|
|
39240
39248
|
};
|
|
39241
39249
|
|
|
@@ -39850,6 +39858,220 @@ exports.getYarnInstall = getYarnInstall;
|
|
|
39850
39858
|
|
|
39851
39859
|
/***/ }),
|
|
39852
39860
|
|
|
39861
|
+
/***/ 8597:
|
|
39862
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
39863
|
+
|
|
39864
|
+
"use strict";
|
|
39865
|
+
|
|
39866
|
+
|
|
39867
|
+
var __assign = this && this.__assign || function () {
|
|
39868
|
+
__assign = Object.assign || function (t) {
|
|
39869
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39870
|
+
s = arguments[i];
|
|
39871
|
+
|
|
39872
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
39873
|
+
}
|
|
39874
|
+
|
|
39875
|
+
return t;
|
|
39876
|
+
};
|
|
39877
|
+
|
|
39878
|
+
return __assign.apply(this, arguments);
|
|
39879
|
+
};
|
|
39880
|
+
|
|
39881
|
+
exports.__esModule = true;
|
|
39882
|
+
exports.createRailsBuildJobs = void 0;
|
|
39883
|
+
|
|
39884
|
+
var docker_1 = __nccwpck_require__(3219);
|
|
39885
|
+
|
|
39886
|
+
var createRailsBuildJobs = function (context) {
|
|
39887
|
+
return [(0, docker_1.createDockerBuildJobBase)(context, {
|
|
39888
|
+
variables: __assign({
|
|
39889
|
+
CNB_BUILDER: "heroku/buildpacks:18",
|
|
39890
|
+
CNB_ENV_VARS: "BUNDLE_GIT__PANTER__CH",
|
|
39891
|
+
CNB_EXTRA_ARGS: "",
|
|
39892
|
+
CNB_PACK_VERSION: "0.20.0"
|
|
39893
|
+
}, context.componentConfig.build.extraVars),
|
|
39894
|
+
// custom script
|
|
39895
|
+
script: [docker_1.gitlabDockerLogin, "docker pull $DOCKER_CACHE_IMAGE || true", "wget --output-document=- https://github.com/buildpacks/pack/releases/download/v$CNB_PACK_VERSION/pack-v$CNB_PACK_VERSION-linux.tgz | tar -zx --directory /usr/local/bin pack", "chmod +x /usr/local/bin/pack", // replace private git ssh gem sources with https to make bundler with credentials via env var work
|
|
39896
|
+
// eslint-disable-next-line no-useless-escape
|
|
39897
|
+
"sed --in-place 's|git@([^:]*):|https://\\1/|g' Gemfile Gemfile.lock", "for v in $CNB_ENV_VARS; do env_args=\"$env_args --env $v\"; done", "pack build $DOCKER_IMAGE:$DOCKER_IMAGE_TAG --builder $CNB_BUILDER --publish --cache-image $DOCKER_CACHE_IMAGE $env_args $CNB_EXTRA_ARGS"]
|
|
39898
|
+
})];
|
|
39899
|
+
};
|
|
39900
|
+
|
|
39901
|
+
exports.createRailsBuildJobs = createRailsBuildJobs;
|
|
39902
|
+
|
|
39903
|
+
/***/ }),
|
|
39904
|
+
|
|
39905
|
+
/***/ 4665:
|
|
39906
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
39907
|
+
|
|
39908
|
+
"use strict";
|
|
39909
|
+
|
|
39910
|
+
|
|
39911
|
+
var __read = this && this.__read || function (o, n) {
|
|
39912
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
39913
|
+
if (!m) return o;
|
|
39914
|
+
var i = m.call(o),
|
|
39915
|
+
r,
|
|
39916
|
+
ar = [],
|
|
39917
|
+
e;
|
|
39918
|
+
|
|
39919
|
+
try {
|
|
39920
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
39921
|
+
} catch (error) {
|
|
39922
|
+
e = {
|
|
39923
|
+
error: error
|
|
39924
|
+
};
|
|
39925
|
+
} finally {
|
|
39926
|
+
try {
|
|
39927
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
39928
|
+
} finally {
|
|
39929
|
+
if (e) throw e.error;
|
|
39930
|
+
}
|
|
39931
|
+
}
|
|
39932
|
+
|
|
39933
|
+
return ar;
|
|
39934
|
+
};
|
|
39935
|
+
|
|
39936
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
39937
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
39938
|
+
if (ar || !(i in from)) {
|
|
39939
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
39940
|
+
ar[i] = from[i];
|
|
39941
|
+
}
|
|
39942
|
+
}
|
|
39943
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
39944
|
+
};
|
|
39945
|
+
|
|
39946
|
+
exports.__esModule = true;
|
|
39947
|
+
exports.createRailsJobs = void 0;
|
|
39948
|
+
|
|
39949
|
+
var build_1 = __nccwpck_require__(8597);
|
|
39950
|
+
|
|
39951
|
+
var test_1 = __nccwpck_require__(5444);
|
|
39952
|
+
|
|
39953
|
+
var createRailsJobs = function (context) {
|
|
39954
|
+
return __spreadArray(__spreadArray([], __read((0, test_1.createRailsTestJobs)(context)), false), __read((0, build_1.createRailsBuildJobs)(context)), false);
|
|
39955
|
+
};
|
|
39956
|
+
|
|
39957
|
+
exports.createRailsJobs = createRailsJobs;
|
|
39958
|
+
|
|
39959
|
+
/***/ }),
|
|
39960
|
+
|
|
39961
|
+
/***/ 5444:
|
|
39962
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
39963
|
+
|
|
39964
|
+
"use strict";
|
|
39965
|
+
|
|
39966
|
+
|
|
39967
|
+
var __assign = this && this.__assign || function () {
|
|
39968
|
+
__assign = Object.assign || function (t) {
|
|
39969
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
39970
|
+
s = arguments[i];
|
|
39971
|
+
|
|
39972
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
39973
|
+
}
|
|
39974
|
+
|
|
39975
|
+
return t;
|
|
39976
|
+
};
|
|
39977
|
+
|
|
39978
|
+
return __assign.apply(this, arguments);
|
|
39979
|
+
};
|
|
39980
|
+
|
|
39981
|
+
var __read = this && this.__read || function (o, n) {
|
|
39982
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
39983
|
+
if (!m) return o;
|
|
39984
|
+
var i = m.call(o),
|
|
39985
|
+
r,
|
|
39986
|
+
ar = [],
|
|
39987
|
+
e;
|
|
39988
|
+
|
|
39989
|
+
try {
|
|
39990
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
39991
|
+
} catch (error) {
|
|
39992
|
+
e = {
|
|
39993
|
+
error: error
|
|
39994
|
+
};
|
|
39995
|
+
} finally {
|
|
39996
|
+
try {
|
|
39997
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
39998
|
+
} finally {
|
|
39999
|
+
if (e) throw e.error;
|
|
40000
|
+
}
|
|
40001
|
+
}
|
|
40002
|
+
|
|
40003
|
+
return ar;
|
|
40004
|
+
};
|
|
40005
|
+
|
|
40006
|
+
var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
40007
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40008
|
+
if (ar || !(i in from)) {
|
|
40009
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
40010
|
+
ar[i] = from[i];
|
|
40011
|
+
}
|
|
40012
|
+
}
|
|
40013
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
40014
|
+
};
|
|
40015
|
+
|
|
40016
|
+
exports.__esModule = true;
|
|
40017
|
+
exports.createRailsTestJobs = void 0;
|
|
40018
|
+
|
|
40019
|
+
var utils_1 = __nccwpck_require__(7461);
|
|
40020
|
+
|
|
40021
|
+
var createRailsTestJobs = function (context) {
|
|
40022
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p; // don't run tests after release
|
|
40023
|
+
|
|
40024
|
+
|
|
40025
|
+
if (((_a = context.commitInfo) === null || _a === void 0 ? void 0 : _a.trigger) === "taggedRelease") {
|
|
40026
|
+
return [];
|
|
40027
|
+
}
|
|
40028
|
+
|
|
40029
|
+
var buildConfig = context.componentConfig.build;
|
|
40030
|
+
var base = {
|
|
40031
|
+
variables: (_b = buildConfig.extraVars) !== null && _b !== void 0 ? _b : {},
|
|
40032
|
+
stage: "test",
|
|
40033
|
+
needs: [],
|
|
40034
|
+
envMode: "none"
|
|
40035
|
+
};
|
|
40036
|
+
var defaultImage = "docker.io/ruby";
|
|
40037
|
+
var bundlerCacheDir = "tmp/cache";
|
|
40038
|
+
var bundlerInstall = ["bundle config set path '".concat(bundlerCacheDir, "'"), "bundle install -j $(nproc)"];
|
|
40039
|
+
var bundlerCache = {
|
|
40040
|
+
key: {
|
|
40041
|
+
files: ["Gemfile.lock"],
|
|
40042
|
+
prefix: "$CI_JOB_IMAGE"
|
|
40043
|
+
},
|
|
40044
|
+
paths: [bundlerCacheDir]
|
|
40045
|
+
};
|
|
40046
|
+
var auditJob = buildConfig.audit !== false ? __assign(__assign({
|
|
40047
|
+
name: "🛡 audit"
|
|
40048
|
+
}, base), {
|
|
40049
|
+
cache: undefined,
|
|
40050
|
+
image: (_d = (_c = buildConfig.audit) === null || _c === void 0 ? void 0 : _c.jobImage) !== null && _d !== void 0 ? _d : defaultImage,
|
|
40051
|
+
script: __spreadArray(["cd ".concat(context.componentConfig.dir)], __read((_f = (0, utils_1.ensureArray)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : ["gem install bundler-audit", "bundle audit check"]), false),
|
|
40052
|
+
allow_failure: true
|
|
40053
|
+
}) : null;
|
|
40054
|
+
var lintJob = buildConfig.lint !== false ? __assign(__assign({
|
|
40055
|
+
name: "👮 lint"
|
|
40056
|
+
}, base), {
|
|
40057
|
+
cache: bundlerCache,
|
|
40058
|
+
image: (_h = (_g = buildConfig.lint) === null || _g === void 0 ? void 0 : _g.jobImage) !== null && _h !== void 0 ? _h : defaultImage,
|
|
40059
|
+
script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(bundlerInstall), false), __read((_k = (0, utils_1.ensureArray)((_j = buildConfig.lint) === null || _j === void 0 ? void 0 : _j.command)) !== null && _k !== void 0 ? _k : ["bundle exec rubocop"]), false)
|
|
40060
|
+
}) : null;
|
|
40061
|
+
var testJob = buildConfig.test !== false ? __assign(__assign({
|
|
40062
|
+
name: "🧪 test"
|
|
40063
|
+
}, base), {
|
|
40064
|
+
cache: bundlerCache,
|
|
40065
|
+
image: (_m = (_l = buildConfig.test) === null || _l === void 0 ? void 0 : _l.jobImage) !== null && _m !== void 0 ? _m : defaultImage,
|
|
40066
|
+
script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(bundlerInstall), false), __read((_p = (0, utils_1.ensureArray)((_o = buildConfig.test) === null || _o === void 0 ? void 0 : _o.command)) !== null && _p !== void 0 ? _p : ["bundle exec rspec"]), false)
|
|
40067
|
+
}) : null;
|
|
40068
|
+
return [auditJob, lintJob, testJob].filter(utils_1.notNil);
|
|
40069
|
+
};
|
|
40070
|
+
|
|
40071
|
+
exports.createRailsTestJobs = createRailsTestJobs;
|
|
40072
|
+
|
|
40073
|
+
/***/ }),
|
|
40074
|
+
|
|
39853
40075
|
/***/ 1197:
|
|
39854
40076
|
/***/ ((__unused_webpack_module, exports) => {
|
|
39855
40077
|
|
|
@@ -40074,7 +40296,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
40074
40296
|
|
|
40075
40297
|
exports.__esModule = true;
|
|
40076
40298
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
40077
|
-
exports.PIPELINE_IMAGE_TAG = "fix-
|
|
40299
|
+
exports.PIPELINE_IMAGE_TAG = "fix-octal-fa642ad4" || 0;
|
|
40078
40300
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
40079
40301
|
|
|
40080
40302
|
/***/ }),
|
|
@@ -40617,8 +40839,9 @@ var getEnvironmentVariables = function (config, componentName, env, commitInfo,
|
|
|
40617
40839
|
additionalEnvVars = deployConfigRaw ? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].getAdditionalEnvVars(environmentContext) : {};
|
|
40618
40840
|
host = (_c = (_b = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _b !== void 0 ? _b : additionalEnvVars.HOST_CANONICAL) !== null && _c !== void 0 ? _c : "unknown-host.example.com";
|
|
40619
40841
|
url = "https://".concat(host);
|
|
40620
|
-
predefinedVariables = __assign(__assign(__assign({}, basePredefinedVariables), {
|
|
40621
|
-
HOST: host
|
|
40842
|
+
predefinedVariables = __assign(__assign(__assign(__assign({}, basePredefinedVariables), config.components[componentName].build.type === "rails" ? {} : {
|
|
40843
|
+
HOST: host
|
|
40844
|
+
}), {
|
|
40622
40845
|
ROOT_URL: url
|
|
40623
40846
|
}), additionalEnvVars);
|
|
40624
40847
|
}
|
|
@@ -41556,7 +41779,7 @@ var setExtraVarsScripts = function (deployConfig) {
|
|
|
41556
41779
|
};
|
|
41557
41780
|
|
|
41558
41781
|
var createGoogleCloudRunDeployJobs = function (context) {
|
|
41559
|
-
var _a;
|
|
41782
|
+
var _a, _b, _c;
|
|
41560
41783
|
|
|
41561
41784
|
var deployConfig = context.componentConfig.deploy;
|
|
41562
41785
|
|
|
@@ -41616,12 +41839,31 @@ var createGoogleCloudRunDeployJobs = function (context) {
|
|
|
41616
41839
|
};
|
|
41617
41840
|
});
|
|
41618
41841
|
|
|
41619
|
-
var getServiceDeployScript = function (service) {
|
|
41842
|
+
var getServiceDeployScript = function (service, nameSuffix) {
|
|
41620
41843
|
var _a;
|
|
41621
41844
|
|
|
41845
|
+
var customConfig = service !== true ? service : undefined;
|
|
41622
41846
|
var command = service !== true ? (_a = service === null || service === void 0 ? void 0 : service.command) !== null && _a !== void 0 ? _a : context.componentConfig.build.startCommand : undefined;
|
|
41623
41847
|
var commandArg = command ? "--command=\"".concat(command.split(" ").join(","), "\"") : "";
|
|
41624
|
-
|
|
41848
|
+
var args = {
|
|
41849
|
+
"allow-unauthenticated": true,
|
|
41850
|
+
"min-instances": customConfig === null || customConfig === void 0 ? void 0 : customConfig.minInstances,
|
|
41851
|
+
"max-instances": customConfig === null || customConfig === void 0 ? void 0 : customConfig.maxInstances,
|
|
41852
|
+
"no-cpu-throttling": customConfig === null || customConfig === void 0 ? void 0 : customConfig.noCpuThrottling
|
|
41853
|
+
};
|
|
41854
|
+
var argsString = Object.entries(args).filter(function (_a) {
|
|
41855
|
+
var _b = __read(_a, 2),
|
|
41856
|
+
value = _b[1];
|
|
41857
|
+
|
|
41858
|
+
return !(0, lodash_1.isNil)(value);
|
|
41859
|
+
}).map(function (_a) {
|
|
41860
|
+
var _b = __read(_a, 2),
|
|
41861
|
+
key = _b[0],
|
|
41862
|
+
value = _b[1];
|
|
41863
|
+
|
|
41864
|
+
return "--".concat(key).concat(value !== true ? "=".concat(value) : "");
|
|
41865
|
+
}).join(" ");
|
|
41866
|
+
return "gcloud run deploy ".concat(serviceName).concat(nameSuffix !== null && nameSuffix !== void 0 ? nameSuffix : "", " ").concat(commandArg, " ").concat(commonDeployArgs, " --env-vars-file=____envvars.yaml ").concat(argsString);
|
|
41625
41867
|
};
|
|
41626
41868
|
|
|
41627
41869
|
var getJobCreateScriptsForJob = function (jobName, job) {
|
|
@@ -41678,10 +41920,21 @@ var createGoogleCloudRunDeployJobs = function (context) {
|
|
|
41678
41920
|
});
|
|
41679
41921
|
};
|
|
41680
41922
|
|
|
41681
|
-
var deployScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), __read(setExtraVarsScripts(deployConfig)), false), __read(pushImageToArtifactsRegistry), false), ["echo \"$ENV_VARS\" > ____envvars.yaml"], false), __read(deployConfig.cloudSql ? (0, database_1.getDatabaseCreateScript)(context, deployConfig) // we create the db, so that we can also delete it afterwards
|
|
41682
|
-
: []), false), __read(getCreateScheduleScripts()), false), __read(getJobCreateScripts()), false), __read(getJobRunScripts("preDeploy")), false), __read(deployConfig.service !== false ? [getServiceDeployScript(deployConfig.service)] : []), false), __read(
|
|
41923
|
+
var deployScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), __read(setExtraVarsScripts(deployConfig)), false), __read(pushImageToArtifactsRegistry), false), ["echo \"$ENV_VARS\" > ____envvars.yaml"], false), __read(deployConfig.cloudSql ? (0, database_1.getDatabaseCreateScript)(context, deployConfig) // we create the db, so that we can also delete it afterwards
|
|
41924
|
+
: []), 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) {
|
|
41925
|
+
var _b = __read(_a, 2),
|
|
41926
|
+
name = _b[0],
|
|
41927
|
+
service = _b[1];
|
|
41928
|
+
|
|
41929
|
+
return getServiceDeployScript(service, "-" + name);
|
|
41930
|
+
})), false), __read(getJobRunScripts("postDeploy")), false), ["docker image rm ".concat(gcloudImageName)], false);
|
|
41931
|
+
|
|
41932
|
+
var stopScripts = __spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], __read((0, gcloudServiceAccountLoginCommands_1.gcloudServiceAccountLoginCommands)(context)), false), __read(deployConfig.service !== false ? ["gcloud run services delete ".concat(serviceName, " ").concat(commonArgs)] : []), false), __read(Object.entries((_c = deployConfig.additionalServices) !== null && _c !== void 0 ? _c : {}).map(function (_a) {
|
|
41933
|
+
var _b = __read(_a, 1),
|
|
41934
|
+
name = _b[0];
|
|
41683
41935
|
|
|
41684
|
-
|
|
41936
|
+
return "gcloud run services delete ".concat(serviceName, "-").concat(name, " ").concat(commonArgs);
|
|
41937
|
+
})), false), __read(getDeleteSchedulesScripts()), false), __read(getDeleteJobsScripts()), false), __read(deployConfig.cloudSql && deployConfig.cloudSql.deleteDatabaseOnStop ? (0, database_1.getDatabaseDeleteScript)(context, deployConfig) : []), false);
|
|
41685
41938
|
|
|
41686
41939
|
return [(0, lodash_1.merge)({}, baseDeploymentJob, (0, docker_1.getDockerJobBaseProps)(context), {
|
|
41687
41940
|
artifacts: {
|
|
@@ -41780,7 +42033,7 @@ exports.GCLOUD_DEPLOY_CREDENTIALS_KEY = "GCLOUD_DEPLOY_credentialsKey";
|
|
|
41780
42033
|
exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX = "GCLOUD_RUN_canonicalHostSuffix";
|
|
41781
42034
|
|
|
41782
42035
|
var getCloudSqlVariables = function (_a) {
|
|
41783
|
-
var _b;
|
|
42036
|
+
var _b, _c;
|
|
41784
42037
|
|
|
41785
42038
|
var deployConfigRaw = _a.deployConfigRaw,
|
|
41786
42039
|
environmentSlug = _a.environmentSlug,
|
|
@@ -41790,13 +42043,20 @@ var getCloudSqlVariables = function (_a) {
|
|
|
41790
42043
|
|
|
41791
42044
|
if (deployConfigRaw && deployConfigRaw.cloudSql) {
|
|
41792
42045
|
var DB_NAME = [(_b = deployConfigRaw.cloudSql.dbNamePrefix) !== null && _b !== void 0 ? _b : "".concat(fullConfig.customerName, "-").concat(fullConfig.appName), environmentSlug].filter(Boolean).join("-");
|
|
42046
|
+
var additionalQueryParamsString = Object.entries((_c = deployConfigRaw.cloudSql.dbAdditionalQueryParams) !== null && _c !== void 0 ? _c : {}).map(function (_a) {
|
|
42047
|
+
var _b = __read(_a, 2),
|
|
42048
|
+
key = _b[0],
|
|
42049
|
+
value = _b[1];
|
|
42050
|
+
|
|
42051
|
+
return "&".concat(key, "=").concat(value);
|
|
42052
|
+
}).join("");
|
|
41793
42053
|
return {
|
|
41794
42054
|
CLOUD_SQL_INSTANCE_CONNECTION_NAME: deployConfigRaw.cloudSql.instanceConnectionName,
|
|
41795
42055
|
DB_NAME: DB_NAME,
|
|
41796
42056
|
DB_USER: "postgres",
|
|
41797
42057
|
DB_PASSWORD: "$" + (0, context_1.getSecretVarName)(env, componentName, "DB_PASSWORD"),
|
|
41798
|
-
DATABASE_URL: "postgresql://$DB_USER:$DB_PASSWORD@localhost/$DB_NAME?host=/cloudsql/$CLOUD_SQL_INSTANCE_CONNECTION_NAME",
|
|
41799
|
-
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"
|
|
42058
|
+
DATABASE_URL: "postgresql://$DB_USER:$DB_PASSWORD@localhost/$DB_NAME?host=/cloudsql/$CLOUD_SQL_INSTANCE_CONNECTION_NAME".concat(additionalQueryParamsString),
|
|
42059
|
+
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".concat(additionalQueryParamsString)
|
|
41800
42060
|
};
|
|
41801
42061
|
}
|
|
41802
42062
|
|
|
@@ -42018,11 +42278,15 @@ var lodash_1 = __nccwpck_require__(3255);
|
|
|
42018
42278
|
|
|
42019
42279
|
var yarn_1 = __nccwpck_require__(464);
|
|
42020
42280
|
|
|
42281
|
+
var runner_1 = __nccwpck_require__(5071);
|
|
42282
|
+
|
|
42021
42283
|
var base_1 = __nccwpck_require__(9177);
|
|
42022
42284
|
|
|
42023
42285
|
var types_1 = __nccwpck_require__(3109);
|
|
42024
42286
|
|
|
42025
42287
|
var createCustomDeployJobs = function (context) {
|
|
42288
|
+
var _a, _b;
|
|
42289
|
+
|
|
42026
42290
|
var deployConfig = context.componentConfig.deploy;
|
|
42027
42291
|
|
|
42028
42292
|
if (deployConfig === false) {
|
|
@@ -42037,6 +42301,8 @@ var createCustomDeployJobs = function (context) {
|
|
|
42037
42301
|
var baseDeploymentJob = (0, base_1.getBaseDeploymentJob)(context);
|
|
42038
42302
|
var yarnInstall = (0, yarn_1.getYarnInstall)(context);
|
|
42039
42303
|
return [(0, lodash_1.merge)({}, baseDeploymentJob, {
|
|
42304
|
+
image: (_a = deployConfig.jobImage) !== null && _a !== void 0 ? _a : (0, runner_1.getRunnerImage)("jobs-default"),
|
|
42305
|
+
cache: (_b = deployConfig.jobCache) !== null && _b !== void 0 ? _b : [],
|
|
42040
42306
|
script: __spreadArray(__spreadArray(["cd ".concat(context.componentConfig.dir)], __read(deployConfig.requiresYarnInstall ? yarnInstall : []), false), __read(deployConfig.script), false)
|
|
42041
42307
|
})];
|
|
42042
42308
|
};
|
|
@@ -44215,25 +44481,26 @@ exports.getPackageManagerInfo = getPackageManagerInfo;
|
|
|
44215
44481
|
|
|
44216
44482
|
|
|
44217
44483
|
exports.__esModule = true;
|
|
44218
|
-
exports.RULES_RELEASE = exports.RULES_ALWAYS = void 0;
|
|
44219
|
-
|
|
44484
|
+
exports.RULES_RELEASE = exports.RULE_CONDITION_MAIN_BRANCH = exports.RULES_ALWAYS = exports.RULE_NEVER_ON_RELEASE_COMMIT = void 0;
|
|
44485
|
+
exports.RULE_NEVER_ON_RELEASE_COMMIT = {
|
|
44220
44486
|
"if": "$CI_COMMIT_MESSAGE =~ /^chore\\(release\\).*/",
|
|
44221
44487
|
when: "never"
|
|
44222
44488
|
};
|
|
44223
44489
|
exports.RULES_ALWAYS = [{
|
|
44224
44490
|
"if": "$CI_COMMIT_TAG"
|
|
44225
|
-
},
|
|
44491
|
+
}, exports.RULE_NEVER_ON_RELEASE_COMMIT, {
|
|
44226
44492
|
"if": "$CI_COMMIT_BRANCH =~ /^[0-9]+.([0-9]+|x).x$/"
|
|
44227
44493
|
}, {
|
|
44228
44494
|
"if": "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
|
|
44229
44495
|
}, {
|
|
44230
44496
|
"if": "$CI_MERGE_REQUEST_ID"
|
|
44231
44497
|
}];
|
|
44232
|
-
exports.
|
|
44233
|
-
|
|
44498
|
+
exports.RULE_CONDITION_MAIN_BRANCH = "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH";
|
|
44499
|
+
exports.RULES_RELEASE = [exports.RULE_NEVER_ON_RELEASE_COMMIT, {
|
|
44500
|
+
"if": exports.RULE_CONDITION_MAIN_BRANCH + ' && $AUTO_RELEASE == "true"',
|
|
44234
44501
|
when: "on_success"
|
|
44235
44502
|
}, {
|
|
44236
|
-
"if":
|
|
44503
|
+
"if": exports.RULE_CONDITION_MAIN_BRANCH,
|
|
44237
44504
|
when: "manual"
|
|
44238
44505
|
}, {
|
|
44239
44506
|
"if": "$CI_COMMIT_BRANCH =~ /^[0-9]+.([0-9]+|x).x$/",
|