@catladder/pipeline 1.110.0 → 1.110.2
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/build/base/__tests__/createArtifactsConfig.test.d.ts +1 -0
- package/dist/build/base/__tests__/createArtifactsConfig.test.js +40 -0
- package/dist/build/base/createArtifactsConfig.d.ts +4 -0
- package/dist/build/base/createArtifactsConfig.js +63 -0
- package/dist/build/custom/__tests__/testJob.test.d.ts +1 -0
- package/dist/build/custom/__tests__/testJob.test.js +37 -0
- package/dist/build/custom/testJob.d.ts +5 -1
- package/dist/build/custom/testJob.js +10 -23
- package/dist/build/node/testJob.js +15 -11
- package/dist/build/types.d.ts +39 -40
- package/dist/bundles/catladder-gitlab/index.js +3 -3
- package/dist/constants.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/gitlab-types.d.ts +13 -22
- package/examples/__snapshots__/cloud-run-memory-limit.ts.snap +4 -0
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.ts.snap +4 -0
- package/examples/__snapshots__/cloud-run-non-public.ts.snap +4 -0
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.ts.snap +8 -0
- package/examples/__snapshots__/cloud-run-with-sql.ts.snap +8 -0
- package/examples/__snapshots__/custom-deploy.ts.snap +4 -0
- package/examples/__snapshots__/custom-envs.ts.snap +4 -0
- package/examples/__snapshots__/kubernetes-application-customization.ts.snap +4 -0
- package/examples/__snapshots__/kubernetes-with-cloud-sql-legacy.ts.snap +4 -0
- package/examples/__snapshots__/kubernetes-with-cloud-sql.ts.snap +4 -0
- package/examples/__snapshots__/kubernetes-with-jobs.ts.snap +8 -0
- package/examples/__snapshots__/kubernetes-with-mongodb.ts.snap +4 -0
- package/examples/__snapshots__/native-app.ts.snap +8 -0
- package/examples/__snapshots__/node-build-with-custom-image.ts.snap +4 -0
- package/examples/__snapshots__/wait-for-other-deploy.ts.snap +8 -0
- package/package.json +1 -1
- package/src/build/base/__tests__/__snapshots__/createArtifactsConfig.test.ts.snap +49 -0
- package/src/build/base/__tests__/createArtifactsConfig.test.ts +41 -0
- package/src/build/base/createArtifactsConfig.ts +34 -0
- package/src/build/custom/__tests__/testJob.test.ts +32 -0
- package/src/build/custom/testJob.ts +8 -21
- package/src/build/node/testJob.ts +21 -4
- package/src/build/types.ts +45 -46
- package/src/types/gitlab-types.ts +12 -12
package/src/build/types.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
Artifacts,
|
|
3
|
+
EnvVars,
|
|
4
|
+
GitlabJobImage,
|
|
5
|
+
GitlabJobService,
|
|
6
|
+
} from "../types";
|
|
2
7
|
|
|
3
8
|
import type { CatladderJob } from "../types/jobs";
|
|
4
9
|
|
|
@@ -12,6 +17,22 @@ export type BuildConfigArtifactsReports = {
|
|
|
12
17
|
junit?: string[];
|
|
13
18
|
};
|
|
14
19
|
|
|
20
|
+
export type TestJobCustom = {
|
|
21
|
+
command?: string | string[];
|
|
22
|
+
jobImage?: GitlabJobImage;
|
|
23
|
+
/**
|
|
24
|
+
* additional CI/CD artifacts reports,
|
|
25
|
+
* use to display information in merge requests, pipeline views and security dashboards.
|
|
26
|
+
*/
|
|
27
|
+
artifactsReports?: BuildConfigArtifactsReports;
|
|
28
|
+
/**
|
|
29
|
+
* GitLab {@link Artifacts} configuration.
|
|
30
|
+
*
|
|
31
|
+
* {@link TestJobCustom.artifacts}.reports.junit is merged with {@link TestJobCustom.artifactsReports} in case both given.
|
|
32
|
+
*/
|
|
33
|
+
artifacts?: Artifacts;
|
|
34
|
+
};
|
|
35
|
+
|
|
15
36
|
export type BuildConfigBase = {
|
|
16
37
|
/**
|
|
17
38
|
* command to run on the image to start the app (e.g. yarn start)
|
|
@@ -38,39 +59,38 @@ export type BuildConfigBase = {
|
|
|
38
59
|
* customize docker build
|
|
39
60
|
*/
|
|
40
61
|
docker?: {
|
|
62
|
+
/**
|
|
63
|
+
* Custom Dockerfile lines integrated in the generated Dockerfile before the standard build steps.
|
|
64
|
+
*
|
|
65
|
+
* - [runner-images/docker-build/scripts/ensureNodeDockerfile](https://git.panter.ch/catladder/catladder/-/tree/main/runner-images/docker-build/scripts/ensureNodeDockerfile)
|
|
66
|
+
* - [runner-images/docker-build/scripts/ensureNginxDockerfile](https://git.panter.ch/catladder/catladder/-/tree/main/runner-images/docker-build/scripts/ensureNginxDockerfile)
|
|
67
|
+
* - [runner-images/docker-build/scripts/ensureMeteorDockerfile](https://git.panter.ch/catladder/catladder/-/tree/main/runner-images/docker-build/scripts/ensureMeteorDockerfile)
|
|
68
|
+
*/
|
|
41
69
|
additionsBegin?: string[];
|
|
70
|
+
/**
|
|
71
|
+
* Custom Dockerfile lines integrated in the generated Dockerfile after the standard build steps.
|
|
72
|
+
*
|
|
73
|
+
* - [runner-images/docker-build/scripts/ensureNodeDockerfile](https://git.panter.ch/catladder/catladder/-/tree/main/runner-images/docker-build/scripts/ensureNodeDockerfile)
|
|
74
|
+
* - [runner-images/docker-build/scripts/ensureNginxDockerfile](https://git.panter.ch/catladder/catladder/-/tree/main/runner-images/docker-build/scripts/ensureNginxDockerfile)
|
|
75
|
+
* - [runner-images/docker-build/scripts/ensureMeteorDockerfile](https://git.panter.ch/catladder/catladder/-/tree/main/runner-images/docker-build/scripts/ensureMeteorDockerfile)
|
|
76
|
+
*/
|
|
42
77
|
additionsEnd?: string[];
|
|
43
78
|
};
|
|
44
79
|
|
|
45
80
|
/**
|
|
46
81
|
* customize lint, set false to disable
|
|
47
82
|
*/
|
|
48
|
-
lint?:
|
|
49
|
-
| false
|
|
50
|
-
| {
|
|
51
|
-
command?: string | string[];
|
|
52
|
-
jobImage?: GitlabJobImage;
|
|
53
|
-
};
|
|
83
|
+
lint?: false | TestJobCustom;
|
|
54
84
|
|
|
55
85
|
/**
|
|
56
86
|
* customize test, set false to disable
|
|
57
87
|
*/
|
|
58
|
-
test?:
|
|
59
|
-
| false
|
|
60
|
-
| {
|
|
61
|
-
command?: string | string[];
|
|
62
|
-
jobImage?: GitlabJobImage;
|
|
63
|
-
};
|
|
88
|
+
test?: false | TestJobCustom;
|
|
64
89
|
|
|
65
90
|
/**
|
|
66
91
|
* customize audit, set false to disable
|
|
67
92
|
*/
|
|
68
|
-
audit?:
|
|
69
|
-
| false
|
|
70
|
-
| {
|
|
71
|
-
command?: string | string[];
|
|
72
|
-
jobImage?: GitlabJobImage;
|
|
73
|
-
};
|
|
93
|
+
audit?: false | TestJobCustom;
|
|
74
94
|
|
|
75
95
|
/**
|
|
76
96
|
* additional paths for artifacts,
|
|
@@ -147,6 +167,9 @@ export type BuildConfigCustom = Omit<
|
|
|
147
167
|
> & {
|
|
148
168
|
type: "custom";
|
|
149
169
|
jobImage: GitlabJobImage;
|
|
170
|
+
/**
|
|
171
|
+
* {@link GitlabJobService}s used in lint, test, audit, and build jobs.
|
|
172
|
+
*/
|
|
150
173
|
jobServices?: GitlabJobService[];
|
|
151
174
|
|
|
152
175
|
docker: BuildConfigCustomDocker;
|
|
@@ -154,41 +177,17 @@ export type BuildConfigCustom = Omit<
|
|
|
154
177
|
/**
|
|
155
178
|
* custom lint, disabled when not set
|
|
156
179
|
*/
|
|
157
|
-
lint?:
|
|
158
|
-
command?: string | string[];
|
|
159
|
-
jobImage?: GitlabJobImage;
|
|
160
|
-
/**
|
|
161
|
-
* additional CI/CD artifacts reports,
|
|
162
|
-
* use to display information in merge requests, pipeline views and security dashboards.
|
|
163
|
-
*/
|
|
164
|
-
artifactsReports?: BuildConfigArtifactsReports;
|
|
165
|
-
};
|
|
180
|
+
lint?: TestJobCustom;
|
|
166
181
|
|
|
167
182
|
/**
|
|
168
183
|
* custom test, disabled when not set
|
|
169
184
|
*/
|
|
170
|
-
test?:
|
|
171
|
-
command?: string | string[];
|
|
172
|
-
jobImage?: GitlabJobImage;
|
|
173
|
-
/**
|
|
174
|
-
* additional CI/CD artifacts reports,
|
|
175
|
-
* use to display information in merge requests, pipeline views and security dashboards.
|
|
176
|
-
*/
|
|
177
|
-
artifactsReports?: BuildConfigArtifactsReports;
|
|
178
|
-
};
|
|
185
|
+
test?: TestJobCustom;
|
|
179
186
|
|
|
180
187
|
/**
|
|
181
188
|
* custom audit, disabled when not set
|
|
182
189
|
*/
|
|
183
|
-
audit?:
|
|
184
|
-
command?: string | string[];
|
|
185
|
-
jobImage?: GitlabJobImage;
|
|
186
|
-
/**
|
|
187
|
-
* additional CI/CD artifacts reports,
|
|
188
|
-
* use to display information in merge requests, pipeline views and security dashboards.
|
|
189
|
-
*/
|
|
190
|
-
artifactsReports?: BuildConfigArtifactsReports;
|
|
191
|
-
};
|
|
190
|
+
audit?: TestJobCustom;
|
|
192
191
|
|
|
193
192
|
/**
|
|
194
193
|
* custom sbom (software bill of materials), set false to disable
|
|
@@ -2,19 +2,19 @@ export type Artifacts = {
|
|
|
2
2
|
paths: string[];
|
|
3
3
|
expire_in?: string;
|
|
4
4
|
when?: "always" | "on_success" | "on_failure";
|
|
5
|
-
|
|
5
|
+
// Reports won't show up on MRs until https://gitlab.com/groups/gitlab-org/-/epics/8205
|
|
6
|
+
reports?: {
|
|
7
|
+
accessibility?: string | string[];
|
|
8
|
+
coverage_report?: { coverage_format: string; path: string };
|
|
9
|
+
codequality?: string | string[];
|
|
10
|
+
cyclonedx?: string | string[];
|
|
11
|
+
dotenv?: string | string[];
|
|
12
|
+
junit?: string | string[];
|
|
13
|
+
sast?: string;
|
|
14
|
+
secret_detection?: string;
|
|
15
|
+
terraform?: string;
|
|
16
|
+
};
|
|
6
17
|
};
|
|
7
|
-
// Reports won't show up on MRs until https://gitlab.com/groups/gitlab-org/-/epics/8205
|
|
8
|
-
export type ArtifactReports =
|
|
9
|
-
| { accessibility: string | string[] }
|
|
10
|
-
| { coverage_report: { coverage_format: string; path: string } }
|
|
11
|
-
| { codequality: string | string[] }
|
|
12
|
-
| { cyclonedx: string | string[] }
|
|
13
|
-
| { dotenv: string | string[] }
|
|
14
|
-
| { junit: string | string[] }
|
|
15
|
-
| { sast: string }
|
|
16
|
-
| { secret_detection: string }
|
|
17
|
-
| { terraform: string };
|
|
18
18
|
export type GitlabJobCache = {
|
|
19
19
|
key: GitlabJobCacheKey;
|
|
20
20
|
policy?: string;
|