@catladder/cli 0.0.0-next-dccc0a36 → 0.0.0-next-78f04d3f
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/src/catci.js +23 -0
- package/dist/apps/cli/src/catci.js.map +1 -1
- package/dist/apps/cli/src/release/githubQueuedRelease.d.ts +14 -0
- package/dist/apps/cli/src/release/githubQueuedRelease.js +152 -0
- package/dist/apps/cli/src/release/githubQueuedRelease.js.map +1 -0
- package/dist/bundles/catci/index.js +3 -3
- package/dist/bundles/catenv/index.js +272 -69
- package/dist/bundles/cli/index.js +272 -69
- package/dist/bundles/skills/catladder-releases/SKILL.md +13 -2
- package/dist/packages/pipeline/src/backends/github/GithubBackend.js +7 -0
- package/dist/packages/pipeline/src/backends/github/GithubBackend.js.map +1 -1
- package/dist/packages/pipeline/src/backends/github/githubReleaseJobs.d.ts +18 -2
- package/dist/packages/pipeline/src/backends/github/githubReleaseJobs.js +92 -10
- package/dist/packages/pipeline/src/backends/github/githubReleaseJobs.js.map +1 -1
- package/dist/packages/pipeline/src/backends/gitlab/GitlabBackend.js +31 -5
- package/dist/packages/pipeline/src/backends/gitlab/GitlabBackend.js.map +1 -1
- package/dist/packages/pipeline/src/backends/gitlab/gitlabReleaseJobs.d.ts +285 -3
- package/dist/packages/pipeline/src/backends/gitlab/gitlabReleaseJobs.js +142 -54
- package/dist/packages/pipeline/src/backends/gitlab/gitlabReleaseJobs.js.map +1 -1
- package/dist/packages/pipeline/src/types/github-types.d.ts +1 -0
- package/dist/packages/pipeline/src/types/release.d.ts +7 -1
- package/dist/skills/catladder-releases/SKILL.md +13 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/catci.ts +30 -0
- package/src/release/githubQueuedRelease.ts +173 -0
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGithubReleaseCheckJobs = exports.getGithubReleaseJobs = void 0;
|
|
3
|
+
exports.getGithubReleaseCheckJobs = exports.getGithubReleaseOnGreenWorkflow = exports.getGithubReleaseJobs = void 0;
|
|
4
4
|
const createGithubJobs_1 = require("./createGithubJobs");
|
|
5
5
|
const release_1 = require("../../release");
|
|
6
|
-
const
|
|
6
|
+
const shippedCatci_1 = require("../../catci/shippedCatci");
|
|
7
|
+
const CATCI = `${shippedCatci_1.GENERATED_CATCI_FOLDER}/index.js`;
|
|
8
|
+
const createReleaseJob = (config, images, options = {}) => {
|
|
9
|
+
var _a;
|
|
7
10
|
const method = (0, release_1.getReleaseMethod)(config);
|
|
8
11
|
const resolved = images.resolveRef({ catladderImage: method.image });
|
|
9
|
-
const imageNeeds =
|
|
12
|
+
const imageNeeds = !options.skipImageNeeds &&
|
|
13
|
+
resolved.need &&
|
|
14
|
+
typeof resolved.need === "object"
|
|
10
15
|
? [(0, createGithubJobs_1.githubGlobalJobId)(resolved.need.job)]
|
|
11
16
|
: [];
|
|
12
|
-
const allNeeds = [...imageNeeds, ...(needs !== null &&
|
|
17
|
+
const allNeeds = [...imageNeeds, ...((_a = options.needs) !== null && _a !== void 0 ? _a : [])];
|
|
13
18
|
return {
|
|
14
19
|
name: "create release",
|
|
15
20
|
"runs-on": "ubuntu-latest",
|
|
@@ -38,7 +43,7 @@ const createReleaseJob = (config, images, needs, extraEnv) => {
|
|
|
38
43
|
...(allNeeds.length > 0 ? { needs: allNeeds } : {}),
|
|
39
44
|
env: {
|
|
40
45
|
GITHUB_TOKEN: "${{ github.token }}",
|
|
41
|
-
...extraEnv,
|
|
46
|
+
...options.extraEnv,
|
|
42
47
|
},
|
|
43
48
|
steps: [
|
|
44
49
|
{
|
|
@@ -48,8 +53,21 @@ const createReleaseJob = (config, images, needs, extraEnv) => {
|
|
|
48
53
|
// tags since the last release) to determine the version
|
|
49
54
|
with: { "fetch-depth": 0 },
|
|
50
55
|
},
|
|
56
|
+
...(options.queueCheck
|
|
57
|
+
? [
|
|
58
|
+
{
|
|
59
|
+
name: "check main workflow",
|
|
60
|
+
id: "queue",
|
|
61
|
+
run: `node ${CATCI} release github-queue-check`,
|
|
62
|
+
shell: "bash",
|
|
63
|
+
},
|
|
64
|
+
]
|
|
65
|
+
: []),
|
|
51
66
|
{
|
|
52
67
|
name: "create release",
|
|
68
|
+
...(options.queueCheck
|
|
69
|
+
? { if: "steps.queue.outputs.queued != 'true'" }
|
|
70
|
+
: {}),
|
|
53
71
|
run: method.script,
|
|
54
72
|
shell: "bash",
|
|
55
73
|
},
|
|
@@ -63,7 +81,10 @@ const createReleaseJob = (config, images, needs, extraEnv) => {
|
|
|
63
81
|
* workflow after all other jobs; a force variant goes to the manual
|
|
64
82
|
* tasks workflow
|
|
65
83
|
* - otherwise (manual, the default): the release job goes to the
|
|
66
|
-
* manual tasks workflow
|
|
84
|
+
* manual tasks workflow. Its queue-check step releases right away on
|
|
85
|
+
* a green main run and otherwise queues the release for the
|
|
86
|
+
* release-on-green workflow (see getGithubReleaseOnGreenWorkflow) —
|
|
87
|
+
* the counterpart of gitlab's queue button + executor pair.
|
|
67
88
|
*/
|
|
68
89
|
const getGithubReleaseJobs = (config, mainWorkflowJobIds, images) => {
|
|
69
90
|
var _a;
|
|
@@ -71,28 +92,89 @@ const getGithubReleaseJobs = (config, mainWorkflowJobIds, images) => {
|
|
|
71
92
|
if (((_a = config.releases) === null || _a === void 0 ? void 0 : _a.when) === "auto") {
|
|
72
93
|
return {
|
|
73
94
|
main: {
|
|
74
|
-
"create-release": createReleaseJob(config, images,
|
|
95
|
+
"create-release": createReleaseJob(config, images, {
|
|
96
|
+
needs: mainWorkflowJobIds,
|
|
97
|
+
}),
|
|
75
98
|
},
|
|
76
99
|
manual: {
|
|
77
|
-
"force-create-release": createReleaseJob(config, images,
|
|
100
|
+
"force-create-release": createReleaseJob(config, images, {
|
|
101
|
+
extraEnv: method.forceReleaseVariables,
|
|
102
|
+
}),
|
|
78
103
|
},
|
|
79
104
|
};
|
|
80
105
|
}
|
|
81
106
|
return {
|
|
82
107
|
main: {},
|
|
83
108
|
manual: {
|
|
84
|
-
"create-release": createReleaseJob(config, images),
|
|
109
|
+
"create-release": createReleaseJob(config, images, { queueCheck: true }),
|
|
85
110
|
// an explicit force option wherever the method distinguishes it
|
|
86
111
|
// (e.g. changesets: release a patch bump without changesets)
|
|
87
112
|
...(method.forceReleaseVariables
|
|
88
113
|
? {
|
|
89
|
-
"force-create-release": createReleaseJob(config, images,
|
|
114
|
+
"force-create-release": createReleaseJob(config, images, {
|
|
115
|
+
extraEnv: method.forceReleaseVariables,
|
|
116
|
+
}),
|
|
90
117
|
}
|
|
91
118
|
: {}),
|
|
92
119
|
},
|
|
93
120
|
};
|
|
94
121
|
};
|
|
95
122
|
exports.getGithubReleaseJobs = getGithubReleaseJobs;
|
|
123
|
+
/**
|
|
124
|
+
* the release-on-green workflow (manual release mode only): runs on
|
|
125
|
+
* every completed main workflow run. A lightweight host job checks the
|
|
126
|
+
* queue marker (written by the create-release task while the main
|
|
127
|
+
* workflow was still running) — most runs have nothing queued and end
|
|
128
|
+
* after that single quick job. When the marker matches the completed
|
|
129
|
+
* run, the containerized release job creates the release.
|
|
130
|
+
*
|
|
131
|
+
* No image-build jobs here: the release image was ensured by the main
|
|
132
|
+
* workflow run that just completed (same commit, same content-hashed
|
|
133
|
+
* tag).
|
|
134
|
+
*/
|
|
135
|
+
const getGithubReleaseOnGreenWorkflow = (config, images, mainWorkflowName, workflowEnv) => {
|
|
136
|
+
var _a;
|
|
137
|
+
if (((_a = config.releases) === null || _a === void 0 ? void 0 : _a.when) === "auto") {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
return {
|
|
141
|
+
name: "catladder release on green",
|
|
142
|
+
on: {
|
|
143
|
+
workflow_run: {
|
|
144
|
+
workflows: [mainWorkflowName],
|
|
145
|
+
types: ["completed"],
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
env: workflowEnv,
|
|
149
|
+
jobs: {
|
|
150
|
+
guard: {
|
|
151
|
+
name: "check queued release",
|
|
152
|
+
"runs-on": "ubuntu-latest",
|
|
153
|
+
// consuming the queue marker is a ref deletion
|
|
154
|
+
permissions: { contents: "write" },
|
|
155
|
+
env: { GITHUB_TOKEN: "${{ github.token }}" },
|
|
156
|
+
outputs: { release: "${{ steps.guard.outputs.release }}" },
|
|
157
|
+
steps: [
|
|
158
|
+
{ name: "Checkout", uses: "actions/checkout@v4" },
|
|
159
|
+
{
|
|
160
|
+
name: "check queued release",
|
|
161
|
+
id: "guard",
|
|
162
|
+
run: `node ${CATCI} release github-queued-guard "\${{ github.event.workflow_run.head_sha }}" "\${{ github.event.workflow_run.conclusion }}"`,
|
|
163
|
+
shell: "bash",
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
},
|
|
167
|
+
"create-release": {
|
|
168
|
+
...createReleaseJob(config, images, {
|
|
169
|
+
needs: ["guard"],
|
|
170
|
+
skipImageNeeds: true,
|
|
171
|
+
}),
|
|
172
|
+
if: "${{ needs.guard.outputs.release == 'true' }}",
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
};
|
|
177
|
+
exports.getGithubReleaseOnGreenWorkflow = getGithubReleaseOnGreenWorkflow;
|
|
96
178
|
/**
|
|
97
179
|
* the informational MR/PR check job of the release method (e.g. the
|
|
98
180
|
* changeset check), added to the mr workflow. continue-on-error keeps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"githubReleaseJobs.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/backends/github/githubReleaseJobs.ts"],"names":[],"mappings":";;;AACA,yDAAuD;AACvD,2CAAiD;
|
|
1
|
+
{"version":3,"file":"githubReleaseJobs.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/backends/github/githubReleaseJobs.ts"],"names":[],"mappings":";;;AACA,yDAAuD;AACvD,2CAAiD;AACjD,2DAAkE;AAIlE,MAAM,KAAK,GAAG,GAAG,q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ACX,QAAQ,EAAE,qBAAqB;4BAC/B,QAAQ,EAAE,qBAAqB;yBAChC;qBACF;oBACH,CAAC,CAAC,EAAE,CAAC;aACR;YACD,WAAW,EAAE;gBACX,QAAQ,EAAE,MAAM;gBAChB,eAAe,EAAE,OAAO;gBACxB,GAAG,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC3D;YACD,GAAG,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACvD,mBAAmB,EAAE,IAAI;YACzB,GAAG,EAAE;gBACH,YAAY,EAAE,qBAAqB;aACpC;YACD,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,qBAAqB;oBAC3B,4DAA4D;oBAC5D,cAAc;oBACd,IAAI,EAAE,EAAE,aAAa,EAAE,CAAC,EAAE;iBAC3B;gBACD;oBACE,IAAI,EAAE,iBAAiB;oBACvB,GAAG,EAAE,MAAM,CAAC,WAAW;oBACvB,KAAK,EAAE,MAAM;iBACd;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AAtDW,QAAA,yBAAyB,6BAsDpC"}
|
|
@@ -7,6 +7,7 @@ const config_1 = require("../../types/config");
|
|
|
7
7
|
const createAllJobs_1 = require("../../pipeline/createAllJobs");
|
|
8
8
|
const jobImagesPlan_1 = require("../../customImages/jobImagesPlan");
|
|
9
9
|
const shippedCatci_1 = require("../../catci/shippedCatci");
|
|
10
|
+
const release_1 = require("../../release");
|
|
10
11
|
const index_1 = require("../index");
|
|
11
12
|
const createGitlabJobs_1 = require("./createGitlabJobs");
|
|
12
13
|
const createGitlabPipeline_1 = require("./createGitlabPipeline");
|
|
@@ -93,12 +94,29 @@ class GitlabBackend {
|
|
|
93
94
|
}
|
|
94
95
|
async createPipeline(config, images) {
|
|
95
96
|
const stages = (0, getPipelineStages_1.getPipelineStages)(config);
|
|
96
|
-
// release
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
|
|
97
|
+
// register the release image first: the per-trigger job creation
|
|
98
|
+
// below emits the build jobs of all images registered so far. The
|
|
99
|
+
// release jobs themselves are created afterwards — they need the
|
|
100
|
+
// main-branch job list for the queued-release executor's needs.
|
|
101
|
+
images.resolveRef({ catladderImage: (0, release_1.getReleaseMethod)(config).image });
|
|
100
102
|
// for all triggers create jobs and add base rules
|
|
101
|
-
const
|
|
103
|
+
const jobsPerTrigger = await Promise.all(config_1.ALL_PIPELINE_TRIGGERS.map(async (trigger) => ({
|
|
104
|
+
trigger,
|
|
105
|
+
jobs: await (0, createGitlabJobs_1.createGitlabJobs)(await (0, createAllJobs_1.createAllJobs)({ config, trigger, pipelineType: this.type }), images, getGitlabRulesForTrigger(trigger)),
|
|
106
|
+
})));
|
|
107
|
+
const allJobsPerTrigger = jobsPerTrigger.flatMap(({ jobs }) => jobs);
|
|
108
|
+
// the jobs the queued-release executor waits for: everything that
|
|
109
|
+
// runs automatically in a main-branch pipeline. Manual jobs (stop,
|
|
110
|
+
// rollback, gates) are excluded — gitlab skips a job whose needs
|
|
111
|
+
// include an unplayed manual job.
|
|
112
|
+
const mainBranchJobNames = [
|
|
113
|
+
...new Set(jobsPerTrigger
|
|
114
|
+
.filter(({ trigger }) => trigger === "mainBranch")
|
|
115
|
+
.flatMap(({ jobs }) => jobs)
|
|
116
|
+
.filter(({ gitlabJob }) => !isManualGitlabJob(gitlabJob))
|
|
117
|
+
.map(({ name }) => name)),
|
|
118
|
+
];
|
|
119
|
+
const releaseJobs = (0, gitlabReleaseJobs_1.getGitlabReleaseJobs)(config, images, mainBranchJobNames);
|
|
102
120
|
const allWorkspaceJobs = allJobsPerTrigger
|
|
103
121
|
.filter((j) => { var _a; return ((_a = j.context) === null || _a === void 0 ? void 0 : _a.type) === "workspace"; }) // sort by componentName in the same order as they appear in the config
|
|
104
122
|
// this is purely for better readability in git diffs when you add new components
|
|
@@ -164,6 +182,14 @@ class GitlabBackend {
|
|
|
164
182
|
}
|
|
165
183
|
}
|
|
166
184
|
exports.GitlabBackend = GitlabBackend;
|
|
185
|
+
/**
|
|
186
|
+
* whether a job can end up waiting for a human in a main-branch
|
|
187
|
+
* pipeline (catladder expresses manual-ness only through rules)
|
|
188
|
+
*/
|
|
189
|
+
function isManualGitlabJob(job) {
|
|
190
|
+
var _a;
|
|
191
|
+
return ((_a = job.rules) !== null && _a !== void 0 ? _a : []).some((rule) => rule.when === "manual");
|
|
192
|
+
}
|
|
167
193
|
function getGitlabRulesForTrigger(trigger) {
|
|
168
194
|
// mainBranch: on push to main branch except it's a release commit
|
|
169
195
|
// mr: on merge request
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitlabBackend.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/backends/gitlab/GitlabBackend.ts"],"names":[],"mappings":";;;AAAA,0CAAiC;AACjC,uCAKqB;AAUrB,+CAA2D;AAC3D,gEAA6D;AAC7D,oEAAiE;AACjE,2DAAkE;
|
|
1
|
+
{"version":3,"file":"GitlabBackend.js","sourceRoot":"","sources":["../../../../../../../../packages/pipeline/src/backends/gitlab/GitlabBackend.ts"],"names":[],"mappings":";;;AAAA,0CAAiC;AACjC,uCAKqB;AAUrB,+CAA2D;AAC3D,gEAA6D;AAC7D,oEAAiE;AACjE,2DAAkE;AAClE,2CAAiD;AAEjD,oCAA8C;AAE9C,yDAAsD;AACtD,iEAA0E;AAC1E,2DAA2D;AAC3D,2DAAwD;AACxD,mEAAgE;AAEhE,MAAM,0BAA0B,GAAG,sBAAsB,CAAC;AAE1D,MAAM,uBAAuB,GAAG,0BAA0B,GAAG,SAAS,CAAC;AAEvE,MAAa,aAAa;IAA1B;QACW,SAAI,GAAG,QAAiB,CAAC;QAEzB,oBAAe,GAAG,uBAAuB,CAAC;IAiOrD,CAAC;IA/NC,KAA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|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { JobImagesPlan } from "../../customImages/jobImagesPlan";
|
|
2
2
|
import type { Config } from "../../types/config";
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
3
|
+
export declare const RELEASE_BUTTON_JOB_NAME = "create release";
|
|
4
|
+
export declare const RELEASE_EXECUTOR_JOB_NAME = "\uD83D\uDE80 release once pipeline succeeds";
|
|
5
|
+
export declare const getGitlabReleaseJobs: (config: Config, images: JobImagesPlan, mainBranchJobNames: string[]) => {
|
|
6
|
+
"\uD83E\uDD8B changeset check": {
|
|
5
7
|
stage: string;
|
|
6
8
|
image: string;
|
|
7
9
|
script: string[];
|
|
8
|
-
allow_failure:
|
|
10
|
+
allow_failure: true;
|
|
9
11
|
artifacts: {
|
|
10
12
|
paths: string[];
|
|
11
13
|
expose_as: string;
|
|
@@ -22,11 +24,191 @@ export declare const getGitlabReleaseJobs: (config: Config, images: JobImagesPla
|
|
|
22
24
|
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
23
25
|
}[];
|
|
24
26
|
};
|
|
27
|
+
"\u26A0\uFE0F force create release": {
|
|
28
|
+
rules: {
|
|
29
|
+
if?: string;
|
|
30
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
31
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
32
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
33
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
34
|
+
start_in?: string;
|
|
35
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
36
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
37
|
+
}[];
|
|
38
|
+
variables?: Record<string, string>;
|
|
39
|
+
needs: any[];
|
|
40
|
+
allow_failure: true;
|
|
41
|
+
stage: string;
|
|
42
|
+
image: string;
|
|
43
|
+
script: string[];
|
|
44
|
+
after_script: string[];
|
|
45
|
+
};
|
|
46
|
+
"create release": {
|
|
47
|
+
rules: {
|
|
48
|
+
if?: string;
|
|
49
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
50
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
51
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
52
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
53
|
+
start_in?: string;
|
|
54
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
55
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
56
|
+
}[];
|
|
57
|
+
stage: string;
|
|
58
|
+
image: string;
|
|
59
|
+
script: string[];
|
|
60
|
+
after_script: string[];
|
|
61
|
+
needs?: undefined;
|
|
62
|
+
allow_failure?: undefined;
|
|
63
|
+
};
|
|
64
|
+
} | {
|
|
65
|
+
"\uD83E\uDD8B changeset check"?: undefined;
|
|
66
|
+
"\u26A0\uFE0F force create release": {
|
|
67
|
+
rules: {
|
|
68
|
+
if?: string;
|
|
69
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
70
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
71
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
72
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
73
|
+
start_in?: string;
|
|
74
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
75
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
76
|
+
}[];
|
|
77
|
+
variables?: Record<string, string>;
|
|
78
|
+
needs: any[];
|
|
79
|
+
allow_failure: true;
|
|
80
|
+
stage: string;
|
|
81
|
+
image: string;
|
|
82
|
+
script: string[];
|
|
83
|
+
after_script: string[];
|
|
84
|
+
};
|
|
85
|
+
"create release": {
|
|
86
|
+
rules: {
|
|
87
|
+
if?: string;
|
|
88
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
89
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
90
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
91
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
92
|
+
start_in?: string;
|
|
93
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
94
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
95
|
+
}[];
|
|
96
|
+
stage: string;
|
|
97
|
+
image: string;
|
|
98
|
+
script: string[];
|
|
99
|
+
after_script: string[];
|
|
100
|
+
needs?: undefined;
|
|
101
|
+
allow_failure?: undefined;
|
|
102
|
+
};
|
|
103
|
+
} | {
|
|
104
|
+
"\uD83E\uDD8B changeset check": {
|
|
105
|
+
stage: string;
|
|
106
|
+
image: string;
|
|
107
|
+
script: string[];
|
|
108
|
+
allow_failure: true;
|
|
109
|
+
artifacts: {
|
|
110
|
+
paths: string[];
|
|
111
|
+
expose_as: string;
|
|
112
|
+
when: "always";
|
|
113
|
+
};
|
|
114
|
+
rules: {
|
|
115
|
+
if?: string;
|
|
116
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
117
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
118
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
119
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
120
|
+
start_in?: string;
|
|
121
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
122
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
123
|
+
}[];
|
|
124
|
+
};
|
|
125
|
+
"\u26A0\uFE0F force create release": {
|
|
126
|
+
rules: {
|
|
127
|
+
if?: string;
|
|
128
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
129
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
130
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
131
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
132
|
+
start_in?: string;
|
|
133
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
134
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
135
|
+
}[];
|
|
136
|
+
variables?: Record<string, string>;
|
|
137
|
+
needs: any[];
|
|
138
|
+
allow_failure: true;
|
|
139
|
+
stage: string;
|
|
140
|
+
image: string;
|
|
141
|
+
script: string[];
|
|
142
|
+
after_script: string[];
|
|
143
|
+
};
|
|
144
|
+
"create release": {
|
|
145
|
+
allow_failure: true;
|
|
146
|
+
rules: {
|
|
147
|
+
if?: string;
|
|
148
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
149
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
150
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
151
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
152
|
+
start_in?: string;
|
|
153
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
154
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
155
|
+
}[];
|
|
156
|
+
stage: string;
|
|
157
|
+
image: string;
|
|
158
|
+
script: string[];
|
|
159
|
+
after_script: string[];
|
|
160
|
+
needs?: undefined;
|
|
161
|
+
};
|
|
162
|
+
} | {
|
|
163
|
+
"\uD83E\uDD8B changeset check"?: undefined;
|
|
164
|
+
"\u26A0\uFE0F force create release": {
|
|
165
|
+
rules: {
|
|
166
|
+
if?: string;
|
|
167
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
168
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
169
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
170
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
171
|
+
start_in?: string;
|
|
172
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
173
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
174
|
+
}[];
|
|
175
|
+
variables?: Record<string, string>;
|
|
176
|
+
needs: any[];
|
|
177
|
+
allow_failure: true;
|
|
178
|
+
stage: string;
|
|
179
|
+
image: string;
|
|
180
|
+
script: string[];
|
|
181
|
+
after_script: string[];
|
|
182
|
+
};
|
|
25
183
|
"create release": {
|
|
184
|
+
allow_failure: true;
|
|
185
|
+
rules: {
|
|
186
|
+
if?: string;
|
|
187
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
188
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
189
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
190
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
191
|
+
start_in?: string;
|
|
192
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
193
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
194
|
+
}[];
|
|
26
195
|
stage: string;
|
|
27
196
|
image: string;
|
|
28
197
|
script: string[];
|
|
29
198
|
after_script: string[];
|
|
199
|
+
needs?: undefined;
|
|
200
|
+
};
|
|
201
|
+
} | {
|
|
202
|
+
"\uD83E\uDD8B changeset check": {
|
|
203
|
+
stage: string;
|
|
204
|
+
image: string;
|
|
205
|
+
script: string[];
|
|
206
|
+
allow_failure: true;
|
|
207
|
+
artifacts: {
|
|
208
|
+
paths: string[];
|
|
209
|
+
expose_as: string;
|
|
210
|
+
when: "always";
|
|
211
|
+
};
|
|
30
212
|
rules: {
|
|
31
213
|
if?: string;
|
|
32
214
|
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
@@ -50,10 +232,110 @@ export declare const getGitlabReleaseJobs: (config: Config, images: JobImagesPla
|
|
|
50
232
|
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
51
233
|
}[];
|
|
52
234
|
variables?: Record<string, string>;
|
|
235
|
+
needs: any[];
|
|
236
|
+
allow_failure: true;
|
|
53
237
|
stage: string;
|
|
54
238
|
image: string;
|
|
55
239
|
script: string[];
|
|
56
240
|
after_script: string[];
|
|
241
|
+
};
|
|
242
|
+
"create release": {
|
|
243
|
+
stage: string;
|
|
244
|
+
image: string;
|
|
245
|
+
script: string[];
|
|
57
246
|
needs: any[];
|
|
247
|
+
allow_failure: true;
|
|
248
|
+
rules: {
|
|
249
|
+
if?: string;
|
|
250
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
251
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
252
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
253
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
254
|
+
start_in?: string;
|
|
255
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
256
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
257
|
+
}[];
|
|
258
|
+
};
|
|
259
|
+
"\uD83D\uDE80 release once pipeline succeeds": {
|
|
260
|
+
needs: ({
|
|
261
|
+
job: string;
|
|
262
|
+
optional: boolean;
|
|
263
|
+
} | {
|
|
264
|
+
job: string;
|
|
265
|
+
})[];
|
|
266
|
+
rules: {
|
|
267
|
+
if?: string;
|
|
268
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
269
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
270
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
271
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
272
|
+
start_in?: string;
|
|
273
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
274
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
275
|
+
}[];
|
|
276
|
+
stage: string;
|
|
277
|
+
image: string;
|
|
278
|
+
script: string[];
|
|
279
|
+
after_script: string[];
|
|
280
|
+
};
|
|
281
|
+
} | {
|
|
282
|
+
"\uD83E\uDD8B changeset check"?: undefined;
|
|
283
|
+
"\u26A0\uFE0F force create release": {
|
|
284
|
+
rules: {
|
|
285
|
+
if?: string;
|
|
286
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
287
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
288
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
289
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
290
|
+
start_in?: string;
|
|
291
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
292
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
293
|
+
}[];
|
|
294
|
+
variables?: Record<string, string>;
|
|
295
|
+
needs: any[];
|
|
296
|
+
allow_failure: true;
|
|
297
|
+
stage: string;
|
|
298
|
+
image: string;
|
|
299
|
+
script: string[];
|
|
300
|
+
after_script: string[];
|
|
301
|
+
};
|
|
302
|
+
"create release": {
|
|
303
|
+
stage: string;
|
|
304
|
+
image: string;
|
|
305
|
+
script: string[];
|
|
306
|
+
needs: any[];
|
|
307
|
+
allow_failure: true;
|
|
308
|
+
rules: {
|
|
309
|
+
if?: string;
|
|
310
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
311
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
312
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
313
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
314
|
+
start_in?: string;
|
|
315
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
316
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
317
|
+
}[];
|
|
318
|
+
};
|
|
319
|
+
"\uD83D\uDE80 release once pipeline succeeds": {
|
|
320
|
+
needs: ({
|
|
321
|
+
job: string;
|
|
322
|
+
optional: boolean;
|
|
323
|
+
} | {
|
|
324
|
+
job: string;
|
|
325
|
+
})[];
|
|
326
|
+
rules: {
|
|
327
|
+
if?: string;
|
|
328
|
+
changes?: import("../../types/gitlab-ci-yml").Changes;
|
|
329
|
+
exists?: import("../../types/gitlab-ci-yml").Exists;
|
|
330
|
+
variables?: import("../../types/gitlab-ci-yml").RulesVariables;
|
|
331
|
+
when?: import("../../types/gitlab-ci-yml").When;
|
|
332
|
+
start_in?: string;
|
|
333
|
+
allow_failure?: import("../../types/gitlab-ci-yml").AllowFailure;
|
|
334
|
+
needs?: import("../../types/gitlab-ci-yml").RulesNeeds;
|
|
335
|
+
}[];
|
|
336
|
+
stage: string;
|
|
337
|
+
image: string;
|
|
338
|
+
script: string[];
|
|
339
|
+
after_script: string[];
|
|
58
340
|
};
|
|
59
341
|
};
|