@catladder/cli 0.0.0-main-fb79641d → 0.0.0-main-5bdbbbe0
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 +34 -0
- package/dist/bundles/cli/index.js +34 -0
- package/dist/pipeline/src/pipeline/gitlab/createGitlabPipeline.js +34 -0
- package/dist/pipeline/src/pipeline/gitlab/createGitlabPipeline.js.map +1 -1
- package/dist/pipeline/src/types/gitlab-types.d.ts +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -6477,6 +6477,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
6477
6477
|
exports.createGitlabPipelineWithDefaults = void 0;
|
|
6478
6478
|
const runner_1 = __nccwpck_require__(4058);
|
|
6479
6479
|
const globalScriptFunctions_1 = __nccwpck_require__(2912);
|
|
6480
|
+
const rules_1 = __nccwpck_require__(7551);
|
|
6480
6481
|
const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...config }) => {
|
|
6481
6482
|
return {
|
|
6482
6483
|
image: image !== null && image !== void 0 ? image : (0, runner_1.getRunnerImage)("jobs-default"), // default image
|
|
@@ -6492,6 +6493,39 @@ const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...
|
|
|
6492
6493
|
...[...globalScriptFunctions_1.globalScriptFunctions.values()].map((script) => script.toBashFunction()),
|
|
6493
6494
|
...(before_script !== null && before_script !== void 0 ? before_script : []),
|
|
6494
6495
|
],
|
|
6496
|
+
workflow: {
|
|
6497
|
+
name: "$PIPELINE_ICON $PIPELINE_NAME",
|
|
6498
|
+
rules: [
|
|
6499
|
+
{
|
|
6500
|
+
if: rules_1.RULE_IS_MERGE_REQUEST.if,
|
|
6501
|
+
variables: {
|
|
6502
|
+
PIPELINE_ICON: "🐱🔨",
|
|
6503
|
+
PIPELINE_NAME: "Merge Request $CI_MERGE_REQUEST_IID",
|
|
6504
|
+
},
|
|
6505
|
+
},
|
|
6506
|
+
{
|
|
6507
|
+
if: rules_1.RULE_IS_TAGGED_RELEASE.if,
|
|
6508
|
+
variables: {
|
|
6509
|
+
PIPELINE_ICON: "🐱📦",
|
|
6510
|
+
PIPELINE_NAME: "Release $CI_COMMIT_TAG",
|
|
6511
|
+
},
|
|
6512
|
+
},
|
|
6513
|
+
{
|
|
6514
|
+
if: rules_1.RULE_IS_MAIN_BRANCH_AND_NOT_RELEASE_COMMIT.if,
|
|
6515
|
+
variables: {
|
|
6516
|
+
PIPELINE_ICON: "🐱🔨",
|
|
6517
|
+
PIPELINE_NAME: "Main $CI_COMMIT_REF_NAME",
|
|
6518
|
+
},
|
|
6519
|
+
},
|
|
6520
|
+
{
|
|
6521
|
+
when: "always", // fallback
|
|
6522
|
+
variables: {
|
|
6523
|
+
PIPELINE_ICON: "🐱❓",
|
|
6524
|
+
PIPELINE_NAME: "Default",
|
|
6525
|
+
},
|
|
6526
|
+
},
|
|
6527
|
+
],
|
|
6528
|
+
},
|
|
6495
6529
|
...config,
|
|
6496
6530
|
};
|
|
6497
6531
|
};
|
|
@@ -9495,6 +9495,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
9495
9495
|
exports.createGitlabPipelineWithDefaults = void 0;
|
|
9496
9496
|
const runner_1 = __nccwpck_require__(4058);
|
|
9497
9497
|
const globalScriptFunctions_1 = __nccwpck_require__(12912);
|
|
9498
|
+
const rules_1 = __nccwpck_require__(47551);
|
|
9498
9499
|
const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...config }) => {
|
|
9499
9500
|
return {
|
|
9500
9501
|
image: image !== null && image !== void 0 ? image : (0, runner_1.getRunnerImage)("jobs-default"), // default image
|
|
@@ -9510,6 +9511,39 @@ const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...
|
|
|
9510
9511
|
...[...globalScriptFunctions_1.globalScriptFunctions.values()].map((script) => script.toBashFunction()),
|
|
9511
9512
|
...(before_script !== null && before_script !== void 0 ? before_script : []),
|
|
9512
9513
|
],
|
|
9514
|
+
workflow: {
|
|
9515
|
+
name: "$PIPELINE_ICON $PIPELINE_NAME",
|
|
9516
|
+
rules: [
|
|
9517
|
+
{
|
|
9518
|
+
if: rules_1.RULE_IS_MERGE_REQUEST.if,
|
|
9519
|
+
variables: {
|
|
9520
|
+
PIPELINE_ICON: "🐱🔨",
|
|
9521
|
+
PIPELINE_NAME: "Merge Request $CI_MERGE_REQUEST_IID",
|
|
9522
|
+
},
|
|
9523
|
+
},
|
|
9524
|
+
{
|
|
9525
|
+
if: rules_1.RULE_IS_TAGGED_RELEASE.if,
|
|
9526
|
+
variables: {
|
|
9527
|
+
PIPELINE_ICON: "🐱📦",
|
|
9528
|
+
PIPELINE_NAME: "Release $CI_COMMIT_TAG",
|
|
9529
|
+
},
|
|
9530
|
+
},
|
|
9531
|
+
{
|
|
9532
|
+
if: rules_1.RULE_IS_MAIN_BRANCH_AND_NOT_RELEASE_COMMIT.if,
|
|
9533
|
+
variables: {
|
|
9534
|
+
PIPELINE_ICON: "🐱🔨",
|
|
9535
|
+
PIPELINE_NAME: "Main $CI_COMMIT_REF_NAME",
|
|
9536
|
+
},
|
|
9537
|
+
},
|
|
9538
|
+
{
|
|
9539
|
+
when: "always", // fallback
|
|
9540
|
+
variables: {
|
|
9541
|
+
PIPELINE_ICON: "🐱❓",
|
|
9542
|
+
PIPELINE_NAME: "Default",
|
|
9543
|
+
},
|
|
9544
|
+
},
|
|
9545
|
+
],
|
|
9546
|
+
},
|
|
9513
9547
|
...config,
|
|
9514
9548
|
};
|
|
9515
9549
|
};
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createGitlabPipelineWithDefaults = void 0;
|
|
4
4
|
const runner_1 = require("../../runner");
|
|
5
5
|
const globalScriptFunctions_1 = require("../../globalScriptFunctions");
|
|
6
|
+
const rules_1 = require("../../rules");
|
|
6
7
|
const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...config }) => {
|
|
7
8
|
return {
|
|
8
9
|
image: image !== null && image !== void 0 ? image : (0, runner_1.getRunnerImage)("jobs-default"), // default image
|
|
@@ -18,6 +19,39 @@ const createGitlabPipelineWithDefaults = ({ image, variables, before_script, ...
|
|
|
18
19
|
...[...globalScriptFunctions_1.globalScriptFunctions.values()].map((script) => script.toBashFunction()),
|
|
19
20
|
...(before_script !== null && before_script !== void 0 ? before_script : []),
|
|
20
21
|
],
|
|
22
|
+
workflow: {
|
|
23
|
+
name: "$PIPELINE_ICON $PIPELINE_NAME",
|
|
24
|
+
rules: [
|
|
25
|
+
{
|
|
26
|
+
if: rules_1.RULE_IS_MERGE_REQUEST.if,
|
|
27
|
+
variables: {
|
|
28
|
+
PIPELINE_ICON: "🐱🔨",
|
|
29
|
+
PIPELINE_NAME: "Merge Request $CI_MERGE_REQUEST_IID",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
if: rules_1.RULE_IS_TAGGED_RELEASE.if,
|
|
34
|
+
variables: {
|
|
35
|
+
PIPELINE_ICON: "🐱📦",
|
|
36
|
+
PIPELINE_NAME: "Release $CI_COMMIT_TAG",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
if: rules_1.RULE_IS_MAIN_BRANCH_AND_NOT_RELEASE_COMMIT.if,
|
|
41
|
+
variables: {
|
|
42
|
+
PIPELINE_ICON: "🐱🔨",
|
|
43
|
+
PIPELINE_NAME: "Main $CI_COMMIT_REF_NAME",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
when: "always", // fallback
|
|
48
|
+
variables: {
|
|
49
|
+
PIPELINE_ICON: "🐱❓",
|
|
50
|
+
PIPELINE_NAME: "Default",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
21
55
|
...config,
|
|
22
56
|
};
|
|
23
57
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGitlabPipeline.js","sourceRoot":"","sources":["../../../../../../pipeline/src/pipeline/gitlab/createGitlabPipeline.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAE9C,uEAAoE;
|
|
1
|
+
{"version":3,"file":"createGitlabPipeline.js","sourceRoot":"","sources":["../../../../../../pipeline/src/pipeline/gitlab/createGitlabPipeline.ts"],"names":[],"mappings":";;;AAAA,yCAA8C;AAE9C,uEAAoE;AACpE,uCAIqB;AAGd,MAAM,gCAAgC,GAAG,CAAC,EAC/C,KAAK,EACL,SAAS,EACT,aAAa,EACb,GAAG,MAAM,EAIV,EAAsB,EAAE;IACvB,OAAO;QACL,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAA,uBAAc,EAAC,cAAc,CAAC,EAAE,gBAAgB;QAChE,SAAS,EAAE;YACT,cAAc,EAAE,MAAM,EAAE,uFAAuF;YAC/G,0BAA0B,EAAE,MAAM,EAAE,kCAAkC;YACtE,uBAAuB,EAAE,MAAM,EAAE,gCAAgC;YACjE,wBAAwB,EAAE,IAAI,EAAE,0EAA0E;YAE1G,SAAS,EAAE,GAAG,EAAE,yBAAyB;YACzC,GAAG,CAAC,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,EAAE,CAAC;SACrB;QACD,aAAa,EAAE;YACb,GAAG,CAAC,GAAG,6CAAqB,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CACpD,MAAM,CAAC,cAAc,EAAE,CACxB;YACD,GAAG,CAAC,aAAa,aAAb,aAAa,cAAb,aAAa,GAAI,EAAE,CAAC;SACzB;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,+BAA+B;YACrC,KAAK,EAAE;gBACL;oBACE,EAAE,EAAE,6BAAqB,CAAC,EAAE;oBAC5B,SAAS,EAAE;wBACT,aAAa,EAAE,MAAM;wBACrB,aAAa,EAAE,qCAAqC;qBACrD;iBACF;gBACD;oBACE,EAAE,EAAE,8BAAsB,CAAC,EAAE;oBAC7B,SAAS,EAAE;wBACT,aAAa,EAAE,MAAM;wBACrB,aAAa,EAAE,wBAAwB;qBACxC;iBACF;gBACD;oBACE,EAAE,EAAE,kDAA0C,CAAC,EAAE;oBACjD,SAAS,EAAE;wBACT,aAAa,EAAE,MAAM;wBACrB,aAAa,EAAE,0BAA0B;qBAC1C;iBACF;gBACD;oBACE,IAAI,EAAE,QAAQ,EAAE,WAAW;oBAC3B,SAAS,EAAE;wBACT,aAAa,EAAE,KAAK;wBACpB,aAAa,EAAE,SAAS;qBACzB;iBACF;aACF;SACF;QAED,GAAG,MAAM;KACV,CAAC;AACJ,CAAC,CAAC;AA9DW,QAAA,gCAAgC,oCA8D3C"}
|
|
@@ -21,6 +21,8 @@ export interface GitlabPipeline extends Pick<JobTemplate, "variables"> {
|
|
|
21
21
|
image: string;
|
|
22
22
|
workflow?: {
|
|
23
23
|
rules: GitlabRule[];
|
|
24
|
+
name?: string;
|
|
25
|
+
variables?: Record<string, string>;
|
|
24
26
|
};
|
|
25
27
|
stages: string[];
|
|
26
28
|
jobs: Record<string, GitlabJobWithContext>;
|