@catladder/pipeline 1.168.0 → 1.168.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/createAppBuildJob.d.ts +1 -2
- package/dist/build/base/createBuildJobDefinition.d.ts +3 -4
- package/dist/build/base/index.d.ts +1 -2
- package/dist/build/cache/createJobCache.d.ts +3 -2
- package/dist/build/cache/createJobCache.js +2 -2
- package/dist/build/cache/getAllCacheConfigsFromConfig.d.ts +2 -2
- package/dist/build/cache/getAllCacheConfigsFromConfig.js +2 -6
- package/dist/build/docker.d.ts +2 -3
- package/dist/build/node/buildJob.d.ts +1 -2
- package/dist/build/types.d.ts +6 -0
- package/dist/bundles/catladder-gitlab/index.js +1 -1
- package/dist/constants.js +1 -1
- package/dist/context/getEnvironmentVariables.d.ts +1 -1
- package/dist/deploy/base/deploy.d.ts +1 -1
- package/dist/deploy/base/deploy.js +2 -1
- package/dist/deploy/base/index.d.ts +1 -3
- package/dist/deploy/base/rollback.d.ts +1 -1
- package/dist/deploy/base/stop.d.ts +1 -1
- package/dist/deploy/custom/deployJob.js +6 -4
- package/dist/deploy/types/custom.d.ts +2 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +3 -3
- package/dist/types/jobDefinition.d.ts +8 -2
- package/examples/__snapshots__/custom-deploy.test.ts.snap +0 -4
- package/examples/__snapshots__/native-app.test.ts.snap +4 -0
- package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +27 -27
- package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +0 -8
- package/examples/native-app.ts +6 -6
- package/examples/rails-k8s-with-worker-dockerfile.test.ts +21 -4
- package/package.json +1 -1
- package/src/build/base/createAppBuildJob.ts +1 -2
- package/src/build/base/createBuildJobDefinition.ts +3 -4
- package/src/build/base/index.ts +4 -2
- package/src/build/cache/createJobCache.ts +6 -9
- package/src/build/cache/getAllCacheConfigsFromConfig.ts +5 -12
- package/src/build/docker.ts +2 -3
- package/src/build/node/buildJob.ts +4 -2
- package/src/build/types.ts +7 -0
- package/src/deploy/base/deploy.ts +5 -11
- package/src/deploy/base/index.ts +8 -3
- package/src/deploy/base/rollback.ts +1 -4
- package/src/deploy/base/stop.ts +1 -4
- package/src/deploy/custom/deployJob.ts +5 -2
- package/src/deploy/types/custom.ts +3 -7
- package/src/types/jobDefinition.ts +27 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getAllCacheConfigsFromConfig } from "../../build/cache/getAllCacheConfigsFromConfig";
|
|
1
2
|
import { getYarnInstall } from "../../build/node/yarn";
|
|
2
3
|
import { getRunnerImage } from "../../runner";
|
|
3
4
|
import type { ComponentContext } from "../../types/context";
|
|
@@ -22,10 +23,11 @@ export const createCustomDeployJobs = (
|
|
|
22
23
|
const yarnInstall = getYarnInstall(context, {
|
|
23
24
|
noCustomPostInstall: true,
|
|
24
25
|
});
|
|
25
|
-
|
|
26
|
+
|
|
27
|
+
const result = createDeployementJobs(context, {
|
|
26
28
|
deploy: {
|
|
27
29
|
image: deployConfig.jobImage ?? getRunnerImage("jobs-default"),
|
|
28
|
-
cache: deployConfig
|
|
30
|
+
cache: getAllCacheConfigsFromConfig(context, deployConfig),
|
|
29
31
|
script: [
|
|
30
32
|
`cd ${context.build.dir}`,
|
|
31
33
|
...(deployConfig.requiresYarnInstall ? yarnInstall : []),
|
|
@@ -45,4 +47,5 @@ export const createCustomDeployJobs = (
|
|
|
45
47
|
}
|
|
46
48
|
: undefined,
|
|
47
49
|
});
|
|
50
|
+
return result;
|
|
48
51
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { WithCacheConfig } from "../../build";
|
|
1
2
|
import type { GitlabJobImage } from "../../types";
|
|
2
|
-
import type { CatladderJob } from "../../types/jobs";
|
|
3
3
|
import type { DeployConfigBase } from "./base";
|
|
4
4
|
|
|
5
5
|
export type DeployConfigCustom = {
|
|
@@ -28,9 +28,5 @@ export type DeployConfigCustom = {
|
|
|
28
28
|
* image to use
|
|
29
29
|
*/
|
|
30
30
|
jobImage?: GitlabJobImage;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
* customize cache for the job
|
|
34
|
-
*/
|
|
35
|
-
jobCache?: CatladderJob["cache"];
|
|
36
|
-
} & DeployConfigBase;
|
|
31
|
+
} & DeployConfigBase &
|
|
32
|
+
WithCacheConfig;
|
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
import type { CacheConfig } from "../build";
|
|
2
|
-
import { CacheConfigAdvanced, CacheConfigSimple } from "../build";
|
|
3
2
|
import type { CatladderJob } from "./jobs";
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
// new intermediate types. Currently not widely used, but we will built a bit more abstraction on top of this
|
|
5
|
+
|
|
6
|
+
export type AppBuildJobDefinition = Partial<
|
|
6
7
|
Omit<CatladderJob, "artifacts" | "cache">
|
|
7
8
|
> & {
|
|
8
9
|
cache?: CacheConfig[];
|
|
9
10
|
};
|
|
11
|
+
|
|
12
|
+
export type DockerBuildJobDefinition = AppBuildJobDefinition; // currently the same
|
|
13
|
+
|
|
14
|
+
export type DeployJobDefinition = Pick<
|
|
15
|
+
CatladderJob,
|
|
16
|
+
| "script"
|
|
17
|
+
| "variables"
|
|
18
|
+
| "image"
|
|
19
|
+
| "artifacts"
|
|
20
|
+
| "services"
|
|
21
|
+
| "runnerVariables"
|
|
22
|
+
> & {
|
|
23
|
+
cache?: CacheConfig[];
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export type StopJobDefinition = Pick<
|
|
27
|
+
CatladderJob,
|
|
28
|
+
"script" | "variables" | "image" | "runnerVariables"
|
|
29
|
+
>;
|
|
30
|
+
|
|
31
|
+
export type RollbackJobDefinition = Pick<
|
|
32
|
+
CatladderJob,
|
|
33
|
+
"script" | "variables" | "runnerVariables" | "image"
|
|
34
|
+
>;
|