@catladder/pipeline 1.111.2 → 1.111.4

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.
@@ -0,0 +1,35 @@
1
+ import type { Context } from "../../types/context";
2
+ import type { JobWithoutScript } from "./types";
3
+ import { DEPLOY_RUNNER_VARIABLES } from "./variables";
4
+ export const STOP_JOB_NAME = "🛑 Stop ⚠️";
5
+
6
+ export const getBaseDeploymentStopJob = (
7
+ context: Context
8
+ ): JobWithoutScript => {
9
+ return {
10
+ name: STOP_JOB_NAME,
11
+ envMode: "stagePerEnv", // makes it easier to run manual tasks er env
12
+ needs: [], // can be executed even if the deploy job failed
13
+ rules: [
14
+ {
15
+ if: "$CI_COMMIT_BRANCH =~ /^[0-9]+\\.([0-9]+|x)\\.x$/", // automatic on hotfix branches
16
+ when: "on_success",
17
+ allow_failure: true,
18
+ },
19
+ {
20
+ when: "manual",
21
+ allow_failure: true,
22
+ },
23
+ ],
24
+ variables: {
25
+ ...DEPLOY_RUNNER_VARIABLES,
26
+ ...context.environment.jobOnlyVars.deploy.envVars,
27
+ GIT_STRATEGY: "none",
28
+ },
29
+ stage: "stop",
30
+ environment: {
31
+ ...context.environment.gitlabEnvironment,
32
+ action: "stop",
33
+ },
34
+ };
35
+ };
@@ -0,0 +1,3 @@
1
+ import type { CatladderJob } from "../../types/jobs";
2
+
3
+ export type JobWithoutScript = Omit<CatladderJob, "script">;
@@ -0,0 +1,6 @@
1
+ export const DEPLOY_RUNNER_VARIABLES = {
2
+ KUBERNETES_CPU_REQUEST: "0.5",
3
+ KUBERNETES_CPU_LIMIT: "1",
4
+ KUBERNETES_MEMORY_REQUEST: "200Mi",
5
+ KUBERNETES_MEMORY_LIMIT: "400Mi",
6
+ };
@@ -1,10 +0,0 @@
1
- import type { Context } from "../types";
2
- import type { CatladderJob } from "../types/jobs";
3
- export declare const DEPLOY_JOB_NAME = "\uD83D\uDE80 Deploy";
4
- export declare const STOP_JOB_NAME = "\uD83D\uDED1 Stop \u26A0\uFE0F";
5
- export declare const ROLLBACK_JOB_NAME = "\u21A9\uFE0F Rollback \u26A0\uFE0F";
6
- declare type JobWithoutScript = Omit<CatladderJob, "script">;
7
- export declare const getBaseDeploymentJob: (context: Context) => JobWithoutScript;
8
- export declare const getBaseDeploymentStopJob: (context: Context) => JobWithoutScript;
9
- export declare const getBaseRollbackJob: (context: Context) => JobWithoutScript;
10
- export {};