@catladder/pipeline 3.40.1 โ 3.41.0
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/index.js +2 -4
- package/dist/build/types.d.ts +0 -10
- package/dist/constants.js +1 -1
- package/dist/deploy/base/deploy.js +1 -6
- package/dist/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +2 -3
- package/dist/deploy/cloudRun/createJobs/getCloudRunStopScripts.js +2 -3
- package/dist/deploy/custom/deployJob.js +2 -3
- package/dist/deploy/kubernetes/deployJob.js +2 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/examples/__snapshots__/automatic-releases.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-execute-script-on-deploy.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-health-check-defaults.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-health-check-only-startup.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-health-check.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-http2.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-memory-limit.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-meteor-with-worker.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-n8n.test.ts.snap +940 -0
- package/examples/__snapshots__/cloud-run-nextjs.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-no-cpu-throttling.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-no-service.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-non-public.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-post-stop-job.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-service-custom-vpc-connector.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-service-custom-vpc.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-service-gen2.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-service-increase-timout.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-service-with-volumes.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-session-affinity.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-storybook.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-with-agents.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-with-gpu.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-with-ngnix.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-with-sql-legacy-jobs.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-with-sql-multiple-dbs.test.ts.snap +0 -336
- package/examples/__snapshots__/cloud-run-with-sql-reuse-db.test.ts.snap +0 -224
- package/examples/__snapshots__/cloud-run-with-sql.test.ts.snap +0 -112
- package/examples/__snapshots__/cloud-run-with-worker.test.ts.snap +0 -112
- package/examples/__snapshots__/custom-build-job-with-tests.test.ts.snap +0 -112
- package/examples/__snapshots__/custom-build-job.test.ts.snap +0 -112
- package/examples/__snapshots__/custom-deploy.test.ts.snap +0 -106
- package/examples/__snapshots__/custom-docker-file.test.ts.snap +0 -112
- package/examples/__snapshots__/custom-envs.test.ts.snap +0 -132
- package/examples/__snapshots__/custom-verify-job.test.ts.snap +0 -112
- package/examples/__snapshots__/git-submodule.test.ts.snap +0 -112
- package/examples/__snapshots__/kubernetes-application-customization.test.ts.snap +0 -112
- package/examples/__snapshots__/kubernetes-with-cloud-sql.test.ts.snap +0 -112
- package/examples/__snapshots__/kubernetes-with-jobs.test.ts.snap +0 -224
- package/examples/__snapshots__/kubernetes-with-mongodb.test.ts.snap +0 -112
- package/examples/__snapshots__/local-dot-env.test.ts.snap +0 -112
- package/examples/__snapshots__/meteor-kubernetes.test.ts.snap +0 -112
- package/examples/__snapshots__/modify-generated-files.test.ts.snap +0 -88
- package/examples/__snapshots__/modify-generated-yaml.test.ts.snap +0 -88
- package/examples/__snapshots__/multiline-var.test.ts.snap +0 -336
- package/examples/__snapshots__/native-app.test.ts.snap +0 -216
- package/examples/__snapshots__/node-build-with-custom-image.test.ts.snap +0 -112
- package/examples/__snapshots__/node-build-with-docker-additions.test.ts.snap +0 -112
- package/examples/__snapshots__/override-secrets.test.ts.snap +0 -112
- package/examples/__snapshots__/rails-k8s-with-worker-dockerfile.test.ts.snap +0 -112
- package/examples/__snapshots__/rails-k8s-with-worker.test.ts.snap +0 -112
- package/examples/__snapshots__/referencing-other-vars.test.ts.snap +0 -336
- package/examples/__snapshots__/wait-for-other-deploy.test.ts.snap +0 -208
- package/examples/__snapshots__/workspace-api-www-turbo-cache.test.ts.snap +0 -224
- package/examples/__snapshots__/workspace-api-www.test.ts.snap +0 -224
- package/examples/{custom-sbom-java.test.ts โ cloud-run-n8n.test.ts} +2 -2
- package/examples/cloud-run-n8n.ts +62 -0
- package/package.json +1 -1
- package/src/build/base/index.ts +0 -4
- package/src/build/types.ts +0 -13
- package/src/deploy/base/deploy.ts +0 -5
- package/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts +0 -2
- package/src/deploy/cloudRun/createJobs/getCloudRunStopScripts.ts +0 -2
- package/src/deploy/custom/deployJob.ts +2 -9
- package/src/deploy/kubernetes/deployJob.ts +3 -10
- package/dist/build/sbom.d.ts +0 -5
- package/dist/build/sbom.js +0 -35
- package/dist/deploy/sbom.d.ts +0 -4
- package/dist/deploy/sbom.js +0 -21
- package/examples/custom-sbom-java.ts +0 -38
- package/src/build/sbom.ts +0 -53
- package/src/deploy/sbom.ts +0 -34
|
@@ -3,10 +3,7 @@ import { getRunnerImage } from "../../runner";
|
|
|
3
3
|
import type { ComponentContext } from "../../types/context";
|
|
4
4
|
import type { CatladderJob } from "../../types/jobs";
|
|
5
5
|
import { createDeployementJobs } from "../base";
|
|
6
|
-
|
|
7
|
-
getDependencyTrackDeleteScript,
|
|
8
|
-
getDependencyTrackUploadScript,
|
|
9
|
-
} from "../sbom";
|
|
6
|
+
|
|
10
7
|
import { isOfDeployType } from "../types";
|
|
11
8
|
import { createKubeValues } from "./kubeValues";
|
|
12
9
|
|
|
@@ -80,17 +77,13 @@ export const createKubernetesDeployJobs = (
|
|
|
80
77
|
),
|
|
81
78
|
"kubernetesCreateSecret",
|
|
82
79
|
"kubernetesDeploy",
|
|
83
|
-
|
|
80
|
+
|
|
84
81
|
"echo deployment successful ๐ป",
|
|
85
82
|
],
|
|
86
83
|
},
|
|
87
84
|
stop: {
|
|
88
85
|
...shared,
|
|
89
|
-
script: [
|
|
90
|
-
...connectContext,
|
|
91
|
-
"kubernetesDelete",
|
|
92
|
-
...getDependencyTrackDeleteScript(context),
|
|
93
|
-
],
|
|
86
|
+
script: [...connectContext, "kubernetesDelete"],
|
|
94
87
|
},
|
|
95
88
|
rollback: {
|
|
96
89
|
...shared,
|
package/dist/build/sbom.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ComponentContextWithBuild } from "../types/context";
|
|
2
|
-
import type { CatladderJob } from "../types/jobs";
|
|
3
|
-
export declare const SBOM_BUILD_JOB_NAME = "\uD83E\uDDFE sbom";
|
|
4
|
-
export declare const SBOM_FILE = "__sbom.json";
|
|
5
|
-
export declare const createSbomBuildJob: (context: ComponentContextWithBuild) => CatladderJob;
|
package/dist/build/sbom.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createSbomBuildJob = exports.SBOM_FILE = exports.SBOM_BUILD_JOB_NAME = void 0;
|
|
7
|
-
var _1 = require(".");
|
|
8
|
-
var utils_1 = require("../utils");
|
|
9
|
-
exports.SBOM_BUILD_JOB_NAME = "๐งพ sbom";
|
|
10
|
-
exports.SBOM_FILE = "__sbom.json";
|
|
11
|
-
var createSbomBuildJob = function (context) {
|
|
12
|
-
var _a, _b, _c, _d;
|
|
13
|
-
var buildConfig = context.build.config;
|
|
14
|
-
var defaultImage = {
|
|
15
|
-
name: "aquasec/trivy:0.58.2",
|
|
16
|
-
entrypoint: [""]
|
|
17
|
-
};
|
|
18
|
-
var defaultScript = ["trivy fs --quiet --format cyclonedx --output \"".concat(exports.SBOM_FILE, "\" ").concat(context.packageManagerInfo.componentIsInWorkspace ? "." : context.build.dir)];
|
|
19
|
-
var image = (0, _1.isStandaloneBuildConfig)(buildConfig) && buildConfig.type === "custom" && buildConfig.sbom !== false ? (_b = (_a = buildConfig.sbom) === null || _a === void 0 ? void 0 : _a.jobImage) !== null && _b !== void 0 ? _b : defaultImage : defaultImage;
|
|
20
|
-
var script = (0, _1.isStandaloneBuildConfig)(buildConfig) && buildConfig.type === "custom" && buildConfig.sbom !== false ? (_d = (0, utils_1.ensureArrayOrNull)((_c = buildConfig.sbom) === null || _c === void 0 ? void 0 : _c.command)) !== null && _d !== void 0 ? _d : defaultScript : defaultScript;
|
|
21
|
-
return {
|
|
22
|
-
name: exports.SBOM_BUILD_JOB_NAME,
|
|
23
|
-
stage: "build",
|
|
24
|
-
envMode: "jobPerEnv",
|
|
25
|
-
variables: {},
|
|
26
|
-
cache: undefined,
|
|
27
|
-
image: image,
|
|
28
|
-
script: script,
|
|
29
|
-
allow_failure: true,
|
|
30
|
-
artifacts: {
|
|
31
|
-
paths: [exports.SBOM_FILE]
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
exports.createSbomBuildJob = createSbomBuildJob;
|
package/dist/deploy/sbom.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type ComponentContext } from "../types/context";
|
|
2
|
-
export declare const sbomDeactivated: (context: ComponentContext) => boolean;
|
|
3
|
-
export declare const getDependencyTrackUploadScript: (context: ComponentContext) => string[];
|
|
4
|
-
export declare const getDependencyTrackDeleteScript: (context: ComponentContext) => string[];
|
package/dist/deploy/sbom.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getDependencyTrackDeleteScript = exports.getDependencyTrackUploadScript = exports.sbomDeactivated = void 0;
|
|
7
|
-
var BashExpression_1 = require("../bash/BashExpression");
|
|
8
|
-
var sbom_1 = require("../build/sbom");
|
|
9
|
-
var context_1 = require("../types/context");
|
|
10
|
-
var sbomDeactivated = function (context) {
|
|
11
|
-
return context.build.type === "disabled" || (0, context_1.componentContextIsStandaloneBuild)(context) && context.build.config.type === "custom" && context.build.config.sbom === false;
|
|
12
|
-
};
|
|
13
|
-
exports.sbomDeactivated = sbomDeactivated;
|
|
14
|
-
var getDependencyTrackUploadScript = function (context) {
|
|
15
|
-
return (0, exports.sbomDeactivated)(context) ? [] : ["echo 'Uploading SBOM to Dependency Track'", "/dtrackuploader https://dep.panter.swiss/ \"$DT_KEY_PROD\" upload \"".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName, "/").concat(context.name, "\" \"").concat((0, BashExpression_1.getBashVariable)("ROOT_URL"), "\" \"").concat(sbom_1.SBOM_FILE, "\" vex.json || true")];
|
|
16
|
-
};
|
|
17
|
-
exports.getDependencyTrackUploadScript = getDependencyTrackUploadScript;
|
|
18
|
-
var getDependencyTrackDeleteScript = function (context) {
|
|
19
|
-
return (0, exports.sbomDeactivated)(context) ? [] : ["echo 'Disabling component in Dependency Track'", "/dtrackuploader https://dep.panter.swiss/ \"$DT_KEY_PROD\" disable \"".concat(context.fullConfig.customerName, "-").concat(context.fullConfig.appName, "/").concat(context.name, "\" \"").concat((0, BashExpression_1.getBashVariable)("CI_ENVIRONMENT_URL"), "\" || true")];
|
|
20
|
-
};
|
|
21
|
-
exports.getDependencyTrackDeleteScript = getDependencyTrackDeleteScript;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Config } from "../src";
|
|
2
|
-
|
|
3
|
-
const config = {
|
|
4
|
-
appName: "test-app",
|
|
5
|
-
customerName: "pan",
|
|
6
|
-
components: {
|
|
7
|
-
app: {
|
|
8
|
-
dir: "app",
|
|
9
|
-
build: {
|
|
10
|
-
type: "custom",
|
|
11
|
-
docker: {
|
|
12
|
-
type: "custom",
|
|
13
|
-
buildContextLocation: "component", // default is root
|
|
14
|
-
},
|
|
15
|
-
jobImage: "maven:3-eclipse-temurin-11",
|
|
16
|
-
buildCommand: ["mvn package", "cp -r target dist"],
|
|
17
|
-
sbom: {
|
|
18
|
-
jobImage: "maven:3-eclipse-temurin-11",
|
|
19
|
-
command: [
|
|
20
|
-
"mvn org.cyclonedx:cyclonedx-maven-plugin:2.7.4:makeBom",
|
|
21
|
-
"mv target/bom.json __sbom.json",
|
|
22
|
-
],
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
deploy: {
|
|
26
|
-
type: "google-cloudrun",
|
|
27
|
-
projectId: "asdf",
|
|
28
|
-
region: "asia-east1",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
} satisfies Config;
|
|
33
|
-
|
|
34
|
-
export default config;
|
|
35
|
-
|
|
36
|
-
export const information = {
|
|
37
|
-
title: "Custom: Sbom Java",
|
|
38
|
-
};
|
package/src/build/sbom.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { isStandaloneBuildConfig } from ".";
|
|
2
|
-
import type { ComponentContextWithBuild } from "../types/context";
|
|
3
|
-
import type { CatladderJob } from "../types/jobs";
|
|
4
|
-
import { ensureArrayOrNull } from "../utils";
|
|
5
|
-
|
|
6
|
-
export const SBOM_BUILD_JOB_NAME = "๐งพ sbom";
|
|
7
|
-
export const SBOM_FILE = "__sbom.json";
|
|
8
|
-
|
|
9
|
-
export const createSbomBuildJob = (
|
|
10
|
-
context: ComponentContextWithBuild,
|
|
11
|
-
): CatladderJob => {
|
|
12
|
-
const buildConfig = context.build.config;
|
|
13
|
-
|
|
14
|
-
const defaultImage = {
|
|
15
|
-
name: "aquasec/trivy:0.58.2",
|
|
16
|
-
entrypoint: [""],
|
|
17
|
-
};
|
|
18
|
-
const defaultScript = [
|
|
19
|
-
`trivy fs --quiet --format cyclonedx --output "${SBOM_FILE}" ${
|
|
20
|
-
context.packageManagerInfo.componentIsInWorkspace
|
|
21
|
-
? "."
|
|
22
|
-
: context.build.dir
|
|
23
|
-
}`,
|
|
24
|
-
];
|
|
25
|
-
|
|
26
|
-
const image =
|
|
27
|
-
isStandaloneBuildConfig(buildConfig) &&
|
|
28
|
-
buildConfig.type === "custom" &&
|
|
29
|
-
buildConfig.sbom !== false
|
|
30
|
-
? (buildConfig.sbom?.jobImage ?? defaultImage)
|
|
31
|
-
: defaultImage;
|
|
32
|
-
|
|
33
|
-
const script =
|
|
34
|
-
isStandaloneBuildConfig(buildConfig) &&
|
|
35
|
-
buildConfig.type === "custom" &&
|
|
36
|
-
buildConfig.sbom !== false
|
|
37
|
-
? (ensureArrayOrNull(buildConfig.sbom?.command) ?? defaultScript)
|
|
38
|
-
: defaultScript;
|
|
39
|
-
|
|
40
|
-
return {
|
|
41
|
-
name: SBOM_BUILD_JOB_NAME,
|
|
42
|
-
stage: "build",
|
|
43
|
-
envMode: "jobPerEnv",
|
|
44
|
-
variables: {},
|
|
45
|
-
cache: undefined,
|
|
46
|
-
image,
|
|
47
|
-
script,
|
|
48
|
-
allow_failure: true,
|
|
49
|
-
artifacts: {
|
|
50
|
-
paths: [SBOM_FILE],
|
|
51
|
-
},
|
|
52
|
-
};
|
|
53
|
-
};
|
package/src/deploy/sbom.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { getBashVariable } from "../bash/BashExpression";
|
|
2
|
-
import { SBOM_FILE } from "../build/sbom";
|
|
3
|
-
import {
|
|
4
|
-
componentContextIsStandaloneBuild,
|
|
5
|
-
type ComponentContext,
|
|
6
|
-
} from "../types/context";
|
|
7
|
-
|
|
8
|
-
export const sbomDeactivated = (context: ComponentContext) =>
|
|
9
|
-
context.build.type === "disabled" ||
|
|
10
|
-
(componentContextIsStandaloneBuild(context) &&
|
|
11
|
-
context.build.config.type === "custom" &&
|
|
12
|
-
context.build.config.sbom === false);
|
|
13
|
-
|
|
14
|
-
export const getDependencyTrackUploadScript = (
|
|
15
|
-
context: ComponentContext,
|
|
16
|
-
): string[] => {
|
|
17
|
-
return sbomDeactivated(context)
|
|
18
|
-
? []
|
|
19
|
-
: [
|
|
20
|
-
"echo 'Uploading SBOM to Dependency Track'",
|
|
21
|
-
`/dtrackuploader https://dep.panter.swiss/ "$DT_KEY_PROD" upload "${context.fullConfig.customerName}-${context.fullConfig.appName}/${context.name}" "${getBashVariable("ROOT_URL")}" "${SBOM_FILE}" vex.json || true`,
|
|
22
|
-
];
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const getDependencyTrackDeleteScript = (
|
|
26
|
-
context: ComponentContext,
|
|
27
|
-
): string[] => {
|
|
28
|
-
return sbomDeactivated(context)
|
|
29
|
-
? []
|
|
30
|
-
: [
|
|
31
|
-
"echo 'Disabling component in Dependency Track'",
|
|
32
|
-
`/dtrackuploader https://dep.panter.swiss/ "$DT_KEY_PROD" disable "${context.fullConfig.customerName}-${context.fullConfig.appName}/${context.name}" "${getBashVariable("CI_ENVIRONMENT_URL")}" || true`,
|
|
33
|
-
];
|
|
34
|
-
};
|