UNPKG

@catladder/pipeline

Version:

Panter workflow for cloud CI/CD and DevOps

77 lines (76 loc) 2.85 kB
"use strict"; var __assign = this && this.__assign || function () { __assign = Object.assign || function (t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __rest = this && this.__rest || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; var __read = this && this.__read || function (o, n) { var m = typeof Symbol === "function" && o[Symbol.iterator]; if (!m) return o; var i = m.call(o), r, ar = [], e; try { while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); } catch (error) { e = { error: error }; } finally { try { if (r && !r.done && (m = i["return"])) m.call(i); } finally { if (e) throw e.error; } } return ar; }; var __spreadArray = this && this.__spreadArray || function (to, from, pack) { if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } } return to.concat(ar || Array.prototype.slice.call(from)); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.createGitlabPipelineWithDefaults = void 0; var runner_1 = require("../../runner"); var globalScriptFunctions_1 = require("../../globalScriptFunctions"); var createGitlabPipelineWithDefaults = function (_a) { var image = _a.image, variables = _a.variables, before_script = _a.before_script, config = __rest(_a, ["image", "variables", "before_script"]); return __assign({ image: image !== null && image !== void 0 ? image : (0, runner_1.getRunnerImage)("jobs-default"), variables: __assign({ FF_USE_FASTZIP: "true", ARTIFACT_COMPRESSION_LEVEL: "fast", CACHE_COMPRESSION_LEVEL: "fast", TRANSFER_METER_FREQUENCY: "5s", GIT_DEPTH: "1" }, variables !== null && variables !== void 0 ? variables : {}), before_script: __spreadArray(__spreadArray([], __read(__spreadArray([], __read(globalScriptFunctions_1.globalScriptFunctions.values()), false).map(function (script) { return script.toBashFunction(); })), false), __read(before_script !== null && before_script !== void 0 ? before_script : []), false) }, config); }; exports.createGitlabPipelineWithDefaults = createGitlabPipelineWithDefaults;