@catladder/cli 5.3.2 → 5.4.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/bundles/catenv/index.js +49 -2
- package/dist/bundles/cli/index.js +49 -2
- package/dist/bundles/skills/catladder-builds/SKILL.md +4 -0
- package/dist/bundles/skills/catladder-builds/references/build-types.md +1 -0
- package/dist/packages/pipeline/src/build/docker.d.ts +6 -0
- package/dist/packages/pipeline/src/build/docker.js +49 -2
- package/dist/packages/pipeline/src/build/docker.js.map +1 -1
- package/dist/packages/pipeline/src/build/types.d.ts +29 -0
- package/dist/packages/pipeline/src/build/types.js.map +1 -1
- package/dist/skills/catladder-builds/SKILL.md +4 -0
- package/dist/skills/catladder-builds/references/build-types.md +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -6082,7 +6082,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6082
6082
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
6083
6083
|
};
|
|
6084
6084
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
6085
|
-
exports.hasDockerfile = exports.getDockerBuildDefaultScript = exports.getDockerBuildScriptWithBuiltInDockerFile = exports.gitlabDockerLogin = exports.DockerBuildJob = exports.getDockerJobBaseProps = exports.DOCKER_BUILD_JOB_NAME = exports.getDockerBuildVariables = exports.requiresDockerBuild = exports.getDockerImageVariables = void 0;
|
|
6085
|
+
exports.hasDockerfile = exports.getDockerBuildDefaultScript = exports.getDockerBuildScriptWithBuiltInDockerFile = exports.gitlabDockerLogin = exports.DockerBuildJob = exports.getDockerJobBaseProps = exports.DOCKER_BUILD_JOB_NAME = exports.getDockerBuildVariables = exports.requiresDockerBuild = exports.getReuseMainBranchImageScript = exports.getDockerImageVariables = void 0;
|
|
6086
6086
|
const fs_1 = __nccwpck_require__(79896);
|
|
6087
6087
|
const lodash_es_1 = __nccwpck_require__(50210);
|
|
6088
6088
|
const path_1 = __importDefault(__nccwpck_require__(16928));
|
|
@@ -6090,6 +6090,7 @@ const deploy_1 = __nccwpck_require__(3659);
|
|
|
6090
6090
|
const artifactsRegistry_1 = __nccwpck_require__(44330);
|
|
6091
6091
|
const gcloudServiceAccountLoginCommands_1 = __nccwpck_require__(54799);
|
|
6092
6092
|
const ciVariables_1 = __nccwpck_require__(91215);
|
|
6093
|
+
const configruedEnvs_1 = __nccwpck_require__(38866);
|
|
6093
6094
|
const runner_1 = __nccwpck_require__(92146);
|
|
6094
6095
|
const jobs_1 = __nccwpck_require__(98521);
|
|
6095
6096
|
const gitlab_1 = __nccwpck_require__(86962);
|
|
@@ -6121,6 +6122,52 @@ const getDockerImageVariables = (context) => {
|
|
|
6121
6122
|
};
|
|
6122
6123
|
};
|
|
6123
6124
|
exports.getDockerImageVariables = getDockerImageVariables;
|
|
6125
|
+
const shellQuote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
6126
|
+
/**
|
|
6127
|
+
* script that copies the main branch image instead of building it, see
|
|
6128
|
+
* `build.reuseMainBranchImage`. Exits the job when it
|
|
6129
|
+
* reused an image, so the build script after it only runs as fallback.
|
|
6130
|
+
*/
|
|
6131
|
+
const getReuseMainBranchImageScript = (context) => {
|
|
6132
|
+
var _a, _b;
|
|
6133
|
+
const buildConfig = context.build.config;
|
|
6134
|
+
// only standalone builds have the option, workspace builds don't
|
|
6135
|
+
const option = "reuseMainBranchImage" in buildConfig
|
|
6136
|
+
? buildConfig.reuseMainBranchImage
|
|
6137
|
+
: undefined;
|
|
6138
|
+
const { fullConfig, name, env } = context;
|
|
6139
|
+
if (!option ||
|
|
6140
|
+
!(0, configruedEnvs_1.getAllEnvsByTrigger)(fullConfig, name, "taggedRelease").includes(env)) {
|
|
6141
|
+
return [];
|
|
6142
|
+
}
|
|
6143
|
+
if ((0, deploy_1.isOfDeployType)((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config, "google-cloudrun")) {
|
|
6144
|
+
throw new Error(`${name}: build.reuseMainBranchImage is not supported for google-cloudrun deploys`);
|
|
6145
|
+
}
|
|
6146
|
+
const [mainBranchEnv] = (0, configruedEnvs_1.getAllEnvsByTrigger)(fullConfig, name, "mainBranch");
|
|
6147
|
+
if (!mainBranchEnv) {
|
|
6148
|
+
throw new Error(`${name}: build.reuseMainBranchImage needs an env that builds on the main branch (e.g. dev)`);
|
|
6149
|
+
}
|
|
6150
|
+
const releaseFiles = (_b = (option === true ? undefined : option.releaseFiles)) !== null && _b !== void 0 ? _b : [
|
|
6151
|
+
"CHANGELOG.md",
|
|
6152
|
+
];
|
|
6153
|
+
const sha = (0, ciVariables_1.getCiVariable)(context, "commitSha");
|
|
6154
|
+
return [
|
|
6155
|
+
...(0, exports.gitlabDockerLogin)(context),
|
|
6156
|
+
`REUSE_IMAGE="${(0, ciVariables_1.getCiVariable)(context, "registryImage")}/${mainBranchEnv}/${name}"`,
|
|
6157
|
+
`reuse_sha=""
|
|
6158
|
+
if docker buildx imagetools inspect "$REUSE_IMAGE:${sha}" >/dev/null 2>&1; then
|
|
6159
|
+
reuse_sha="${sha}"
|
|
6160
|
+
elif git fetch --quiet --depth=2 origin "${sha}" && [ -z "$(git diff --name-only "${sha}^" "${sha}" | grep -vxF ${releaseFiles.map((f) => `-e ${shellQuote(f)}`).join(" ")})" ]; then
|
|
6161
|
+
reuse_sha="$(git rev-parse "${sha}^")"
|
|
6162
|
+
fi
|
|
6163
|
+
if [ -n "$reuse_sha" ] && docker buildx imagetools create --prefer-index=false --tag "$DOCKER_IMAGE:$DOCKER_IMAGE_TAG" "$REUSE_IMAGE:$reuse_sha"; then
|
|
6164
|
+
echo "♻️ reused $REUSE_IMAGE:$reuse_sha, skipping the build"
|
|
6165
|
+
exit 0
|
|
6166
|
+
fi
|
|
6167
|
+
echo "no main branch image to reuse, building the image"`,
|
|
6168
|
+
];
|
|
6169
|
+
};
|
|
6170
|
+
exports.getReuseMainBranchImageScript = getReuseMainBranchImageScript;
|
|
6124
6171
|
/**
|
|
6125
6172
|
* Weather the context requires a docker build
|
|
6126
6173
|
*/
|
|
@@ -6192,7 +6239,7 @@ class DockerBuildJob extends jobs_1.CatladderJob {
|
|
|
6192
6239
|
provides: ["dockerImage"],
|
|
6193
6240
|
caches: cache,
|
|
6194
6241
|
...(0, exports.getDockerJobBaseProps)(),
|
|
6195
|
-
script: script || [],
|
|
6242
|
+
script: [...(0, exports.getReuseMainBranchImageScript)(context), ...(script || [])],
|
|
6196
6243
|
variables: {
|
|
6197
6244
|
...(0, removeUndefined_1.removeUndefined)((0, exports.getDockerBuildVariables)(context)),
|
|
6198
6245
|
...(0, removeUndefined_1.removeUndefined)(variables !== null && variables !== void 0 ? variables : {}),
|
|
@@ -12659,7 +12659,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12659
12659
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12660
12660
|
};
|
|
12661
12661
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
12662
|
-
exports.hasDockerfile = exports.getDockerBuildDefaultScript = exports.getDockerBuildScriptWithBuiltInDockerFile = exports.gitlabDockerLogin = exports.DockerBuildJob = exports.getDockerJobBaseProps = exports.DOCKER_BUILD_JOB_NAME = exports.getDockerBuildVariables = exports.requiresDockerBuild = exports.getDockerImageVariables = void 0;
|
|
12662
|
+
exports.hasDockerfile = exports.getDockerBuildDefaultScript = exports.getDockerBuildScriptWithBuiltInDockerFile = exports.gitlabDockerLogin = exports.DockerBuildJob = exports.getDockerJobBaseProps = exports.DOCKER_BUILD_JOB_NAME = exports.getDockerBuildVariables = exports.requiresDockerBuild = exports.getReuseMainBranchImageScript = exports.getDockerImageVariables = void 0;
|
|
12663
12663
|
const fs_1 = __nccwpck_require__(79896);
|
|
12664
12664
|
const lodash_es_1 = __nccwpck_require__(50210);
|
|
12665
12665
|
const path_1 = __importDefault(__nccwpck_require__(16928));
|
|
@@ -12667,6 +12667,7 @@ const deploy_1 = __nccwpck_require__(3659);
|
|
|
12667
12667
|
const artifactsRegistry_1 = __nccwpck_require__(44330);
|
|
12668
12668
|
const gcloudServiceAccountLoginCommands_1 = __nccwpck_require__(54799);
|
|
12669
12669
|
const ciVariables_1 = __nccwpck_require__(91215);
|
|
12670
|
+
const configruedEnvs_1 = __nccwpck_require__(38866);
|
|
12670
12671
|
const runner_1 = __nccwpck_require__(92146);
|
|
12671
12672
|
const jobs_1 = __nccwpck_require__(98521);
|
|
12672
12673
|
const gitlab_1 = __nccwpck_require__(86962);
|
|
@@ -12698,6 +12699,52 @@ const getDockerImageVariables = (context) => {
|
|
|
12698
12699
|
};
|
|
12699
12700
|
};
|
|
12700
12701
|
exports.getDockerImageVariables = getDockerImageVariables;
|
|
12702
|
+
const shellQuote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
12703
|
+
/**
|
|
12704
|
+
* script that copies the main branch image instead of building it, see
|
|
12705
|
+
* `build.reuseMainBranchImage`. Exits the job when it
|
|
12706
|
+
* reused an image, so the build script after it only runs as fallback.
|
|
12707
|
+
*/
|
|
12708
|
+
const getReuseMainBranchImageScript = (context) => {
|
|
12709
|
+
var _a, _b;
|
|
12710
|
+
const buildConfig = context.build.config;
|
|
12711
|
+
// only standalone builds have the option, workspace builds don't
|
|
12712
|
+
const option = "reuseMainBranchImage" in buildConfig
|
|
12713
|
+
? buildConfig.reuseMainBranchImage
|
|
12714
|
+
: undefined;
|
|
12715
|
+
const { fullConfig, name, env } = context;
|
|
12716
|
+
if (!option ||
|
|
12717
|
+
!(0, configruedEnvs_1.getAllEnvsByTrigger)(fullConfig, name, "taggedRelease").includes(env)) {
|
|
12718
|
+
return [];
|
|
12719
|
+
}
|
|
12720
|
+
if ((0, deploy_1.isOfDeployType)((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config, "google-cloudrun")) {
|
|
12721
|
+
throw new Error(`${name}: build.reuseMainBranchImage is not supported for google-cloudrun deploys`);
|
|
12722
|
+
}
|
|
12723
|
+
const [mainBranchEnv] = (0, configruedEnvs_1.getAllEnvsByTrigger)(fullConfig, name, "mainBranch");
|
|
12724
|
+
if (!mainBranchEnv) {
|
|
12725
|
+
throw new Error(`${name}: build.reuseMainBranchImage needs an env that builds on the main branch (e.g. dev)`);
|
|
12726
|
+
}
|
|
12727
|
+
const releaseFiles = (_b = (option === true ? undefined : option.releaseFiles)) !== null && _b !== void 0 ? _b : [
|
|
12728
|
+
"CHANGELOG.md",
|
|
12729
|
+
];
|
|
12730
|
+
const sha = (0, ciVariables_1.getCiVariable)(context, "commitSha");
|
|
12731
|
+
return [
|
|
12732
|
+
...(0, exports.gitlabDockerLogin)(context),
|
|
12733
|
+
`REUSE_IMAGE="${(0, ciVariables_1.getCiVariable)(context, "registryImage")}/${mainBranchEnv}/${name}"`,
|
|
12734
|
+
`reuse_sha=""
|
|
12735
|
+
if docker buildx imagetools inspect "$REUSE_IMAGE:${sha}" >/dev/null 2>&1; then
|
|
12736
|
+
reuse_sha="${sha}"
|
|
12737
|
+
elif git fetch --quiet --depth=2 origin "${sha}" && [ -z "$(git diff --name-only "${sha}^" "${sha}" | grep -vxF ${releaseFiles.map((f) => `-e ${shellQuote(f)}`).join(" ")})" ]; then
|
|
12738
|
+
reuse_sha="$(git rev-parse "${sha}^")"
|
|
12739
|
+
fi
|
|
12740
|
+
if [ -n "$reuse_sha" ] && docker buildx imagetools create --prefer-index=false --tag "$DOCKER_IMAGE:$DOCKER_IMAGE_TAG" "$REUSE_IMAGE:$reuse_sha"; then
|
|
12741
|
+
echo "♻️ reused $REUSE_IMAGE:$reuse_sha, skipping the build"
|
|
12742
|
+
exit 0
|
|
12743
|
+
fi
|
|
12744
|
+
echo "no main branch image to reuse, building the image"`,
|
|
12745
|
+
];
|
|
12746
|
+
};
|
|
12747
|
+
exports.getReuseMainBranchImageScript = getReuseMainBranchImageScript;
|
|
12701
12748
|
/**
|
|
12702
12749
|
* Weather the context requires a docker build
|
|
12703
12750
|
*/
|
|
@@ -12769,7 +12816,7 @@ class DockerBuildJob extends jobs_1.CatladderJob {
|
|
|
12769
12816
|
provides: ["dockerImage"],
|
|
12770
12817
|
caches: cache,
|
|
12771
12818
|
...(0, exports.getDockerJobBaseProps)(),
|
|
12772
|
-
script: script || [],
|
|
12819
|
+
script: [...(0, exports.getReuseMainBranchImageScript)(context), ...(script || [])],
|
|
12773
12820
|
variables: {
|
|
12774
12821
|
...(0, removeUndefined_1.removeUndefined)((0, exports.getDockerBuildVariables)(context)),
|
|
12775
12822
|
...(0, removeUndefined_1.removeUndefined)(variables !== null && variables !== void 0 ? variables : {}),
|
|
@@ -74,6 +74,10 @@ type: `build: { from: "web" }` (see workspace builds below).
|
|
|
74
74
|
runner tags, build-only env vars, and extra runner variables. A
|
|
75
75
|
`jobImage` is a concrete image url or `{ image: "<name>" }`
|
|
76
76
|
referencing a project image (see below).
|
|
77
|
+
- `reuseMainBranchImage` — in release pipelines, stage/prod copy the
|
|
78
|
+
image the main branch (`dev`) built for the released commit instead of
|
|
79
|
+
rebuilding it (falls back to a build). Only for images that don't
|
|
80
|
+
depend on the env, e.g. Rails via Cloud Native Buildpacks.
|
|
77
81
|
- `docker` — the image build strategy: a built-in
|
|
78
82
|
(`{ type: "nginx" | "node" | "meteor" }`) or
|
|
79
83
|
`{ type: "custom" }` (expects a `Dockerfile`).
|
|
@@ -20,6 +20,7 @@ generated pipeline files.
|
|
|
20
20
|
| `runnerVariables` | `Record<string,string>` | extra runner vars (also for `services:`) |
|
|
21
21
|
| `jobTags` | `string[]` | runner tags |
|
|
22
22
|
| `jobImage` | `JobImageConfig` | CI image for the build: a concrete image or `{ image: "<name>" }` referencing a project image |
|
|
23
|
+
| `reuseMainBranchImage` | `boolean \| { releaseFiles?: string[] }` | release envs (stage/prod) copy the main branch (`dev`) image of the released commit instead of rebuilding; falls back to a build. Only for env-independent images; not for `google-cloudrun`. `true` = `{ releaseFiles: ["CHANGELOG.md"] }` |
|
|
23
24
|
| `docker` | see below | the deployable image strategy |
|
|
24
25
|
|
|
25
26
|
`TestJobCustom` (for `lint`/`test`/`audit`): `command`, `jobImage`,
|
|
@@ -13,6 +13,12 @@ export declare const getDockerImageVariables: (context: ComponentContext) => {
|
|
|
13
13
|
DOCKER_IMAGE_NAME: string;
|
|
14
14
|
DOCKER_IMAGE: string;
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* script that copies the main branch image instead of building it, see
|
|
18
|
+
* `build.reuseMainBranchImage`. Exits the job when it
|
|
19
|
+
* reused an image, so the build script after it only runs as fallback.
|
|
20
|
+
*/
|
|
21
|
+
export declare const getReuseMainBranchImageScript: (context: ComponentContextWithBuild) => string[];
|
|
16
22
|
/**
|
|
17
23
|
* Weather the context requires a docker build
|
|
18
24
|
*/
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.hasDockerfile = exports.getDockerBuildDefaultScript = exports.getDockerBuildScriptWithBuiltInDockerFile = exports.gitlabDockerLogin = exports.DockerBuildJob = exports.getDockerJobBaseProps = exports.DOCKER_BUILD_JOB_NAME = exports.getDockerBuildVariables = exports.requiresDockerBuild = exports.getDockerImageVariables = void 0;
|
|
6
|
+
exports.hasDockerfile = exports.getDockerBuildDefaultScript = exports.getDockerBuildScriptWithBuiltInDockerFile = exports.gitlabDockerLogin = exports.DockerBuildJob = exports.getDockerJobBaseProps = exports.DOCKER_BUILD_JOB_NAME = exports.getDockerBuildVariables = exports.requiresDockerBuild = exports.getReuseMainBranchImageScript = exports.getDockerImageVariables = void 0;
|
|
7
7
|
const fs_1 = require("fs");
|
|
8
8
|
const lodash_es_1 = require("lodash-es");
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
@@ -11,6 +11,7 @@ const deploy_1 = require("../deploy");
|
|
|
11
11
|
const artifactsRegistry_1 = require("../deploy/cloudRun/artifactsRegistry");
|
|
12
12
|
const gcloudServiceAccountLoginCommands_1 = require("../deploy/cloudRun/utils/gcloudServiceAccountLoginCommands");
|
|
13
13
|
const ciVariables_1 = require("../bash/ciVariables");
|
|
14
|
+
const configruedEnvs_1 = require("../config/configruedEnvs");
|
|
14
15
|
const runner_1 = require("../runner");
|
|
15
16
|
const jobs_1 = require("../types/jobs");
|
|
16
17
|
const gitlab_1 = require("../utils/gitlab");
|
|
@@ -42,6 +43,52 @@ const getDockerImageVariables = (context) => {
|
|
|
42
43
|
};
|
|
43
44
|
};
|
|
44
45
|
exports.getDockerImageVariables = getDockerImageVariables;
|
|
46
|
+
const shellQuote = (value) => `'${value.replace(/'/g, `'\\''`)}'`;
|
|
47
|
+
/**
|
|
48
|
+
* script that copies the main branch image instead of building it, see
|
|
49
|
+
* `build.reuseMainBranchImage`. Exits the job when it
|
|
50
|
+
* reused an image, so the build script after it only runs as fallback.
|
|
51
|
+
*/
|
|
52
|
+
const getReuseMainBranchImageScript = (context) => {
|
|
53
|
+
var _a, _b;
|
|
54
|
+
const buildConfig = context.build.config;
|
|
55
|
+
// only standalone builds have the option, workspace builds don't
|
|
56
|
+
const option = "reuseMainBranchImage" in buildConfig
|
|
57
|
+
? buildConfig.reuseMainBranchImage
|
|
58
|
+
: undefined;
|
|
59
|
+
const { fullConfig, name, env } = context;
|
|
60
|
+
if (!option ||
|
|
61
|
+
!(0, configruedEnvs_1.getAllEnvsByTrigger)(fullConfig, name, "taggedRelease").includes(env)) {
|
|
62
|
+
return [];
|
|
63
|
+
}
|
|
64
|
+
if ((0, deploy_1.isOfDeployType)((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config, "google-cloudrun")) {
|
|
65
|
+
throw new Error(`${name}: build.reuseMainBranchImage is not supported for google-cloudrun deploys`);
|
|
66
|
+
}
|
|
67
|
+
const [mainBranchEnv] = (0, configruedEnvs_1.getAllEnvsByTrigger)(fullConfig, name, "mainBranch");
|
|
68
|
+
if (!mainBranchEnv) {
|
|
69
|
+
throw new Error(`${name}: build.reuseMainBranchImage needs an env that builds on the main branch (e.g. dev)`);
|
|
70
|
+
}
|
|
71
|
+
const releaseFiles = (_b = (option === true ? undefined : option.releaseFiles)) !== null && _b !== void 0 ? _b : [
|
|
72
|
+
"CHANGELOG.md",
|
|
73
|
+
];
|
|
74
|
+
const sha = (0, ciVariables_1.getCiVariable)(context, "commitSha");
|
|
75
|
+
return [
|
|
76
|
+
...(0, exports.gitlabDockerLogin)(context),
|
|
77
|
+
`REUSE_IMAGE="${(0, ciVariables_1.getCiVariable)(context, "registryImage")}/${mainBranchEnv}/${name}"`,
|
|
78
|
+
`reuse_sha=""
|
|
79
|
+
if docker buildx imagetools inspect "$REUSE_IMAGE:${sha}" >/dev/null 2>&1; then
|
|
80
|
+
reuse_sha="${sha}"
|
|
81
|
+
elif git fetch --quiet --depth=2 origin "${sha}" && [ -z "$(git diff --name-only "${sha}^" "${sha}" | grep -vxF ${releaseFiles.map((f) => `-e ${shellQuote(f)}`).join(" ")})" ]; then
|
|
82
|
+
reuse_sha="$(git rev-parse "${sha}^")"
|
|
83
|
+
fi
|
|
84
|
+
if [ -n "$reuse_sha" ] && docker buildx imagetools create --prefer-index=false --tag "$DOCKER_IMAGE:$DOCKER_IMAGE_TAG" "$REUSE_IMAGE:$reuse_sha"; then
|
|
85
|
+
echo "♻️ reused $REUSE_IMAGE:$reuse_sha, skipping the build"
|
|
86
|
+
exit 0
|
|
87
|
+
fi
|
|
88
|
+
echo "no main branch image to reuse, building the image"`,
|
|
89
|
+
];
|
|
90
|
+
};
|
|
91
|
+
exports.getReuseMainBranchImageScript = getReuseMainBranchImageScript;
|
|
45
92
|
/**
|
|
46
93
|
* Weather the context requires a docker build
|
|
47
94
|
*/
|
|
@@ -113,7 +160,7 @@ class DockerBuildJob extends jobs_1.CatladderJob {
|
|
|
113
160
|
provides: ["dockerImage"],
|
|
114
161
|
caches: cache,
|
|
115
162
|
...(0, exports.getDockerJobBaseProps)(),
|
|
116
|
-
script: script || [],
|
|
163
|
+
script: [...(0, exports.getReuseMainBranchImageScript)(context), ...(script || [])],
|
|
117
164
|
variables: {
|
|
118
165
|
...(0, removeUndefined_1.removeUndefined)((0, exports.getDockerBuildVariables)(context)),
|
|
119
166
|
...(0, removeUndefined_1.removeUndefined)(variables !== null && variables !== void 0 ? variables : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.js","sourceRoot":"","sources":["../../../../../../../packages/pipeline/src/build/docker.ts"],"names":[],"mappings":";;;;;;AAAA,2BAAgC;AAChC,yCAAsC;AACtC,gDAAwB;AAExB,sCAA2C;AAC3C,4EAI8C;AAC9C,kHAA+G;AAC/G,qDAAoD;AACpD,sCAA2C;AAM3C,wCAA6C;AAC7C,4CAAsD;AACtD,8DAA2D;AAE3D,MAAM,4BAA4B,GAAG;IACnC,sBAAsB,EAAE,MAAM;IAC9B,yBAAyB,EAAE,KAAK;IAChC,uBAAuB,EAAE,KAAK;CAC/B,CAAC;AAEK,MAAM,uBAAuB,GAAG,CAAC,OAAyB,EAAE,EAAE;;IACnE,MAAM,YAAY,GAAG,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM,CAAC;IAC5C,OAAO;QACL,GAAG,CAAC,IAAA,uBAAc,EAAC,YAAY,EAAE,iBAAiB,CAAC;YACjD,CAAC,CAAC;gBACE,eAAe,EAAE,IAAA,4CAAwB,EAAC,OAAO,CAAC;gBAClD,YAAY,EAAE,IAAA,iDAA6B,EAAC,OAAO,CAAC;gBACpD,kBAAkB,EAAE,IAAA,uDAAmC,EAAC,OAAO,CAAC;aACjE;YACH,CAAC,CAAC,4DAA4D;gBAC5D;oBACE,eAAe,EAAE,IAAA,2BAAa,EAAC,OAAO,EAAE,UAAU,CAAC;oBAEnD,kBAAkB,EAAE,GAAG,IAAA,2BAAa,EAAC,OAAO,EAAE,eAAe,CAAC,WAAW,OAAO,CAAC,IAAI,EAAE;oBACvF,0BAA0B;oBAC1B,iBAAiB,EAAE,OAAO,CAAC,GAAG,GAAG,GAAG,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,iBAC+B"}
|
|
@@ -178,6 +178,35 @@ export type BuildConfigBase = {
|
|
|
178
178
|
* custom image to use
|
|
179
179
|
*/
|
|
180
180
|
jobImage?: JobImageConfig;
|
|
181
|
+
/**
|
|
182
|
+
* reuse the docker image that the main branch pipeline already built,
|
|
183
|
+
* instead of building it again in tagged-release pipelines (stage / prod).
|
|
184
|
+
*
|
|
185
|
+
* The 🔨 docker job of a release env copies the image of the main branch
|
|
186
|
+
* env (e.g. `dev/<component>:<sha>`) to its own image name — a registry-side
|
|
187
|
+
* copy that keeps the digest, no rebuild. It reuses the image of
|
|
188
|
+
*
|
|
189
|
+
* - the tagged commit itself, or
|
|
190
|
+
* - its parent, when the tagged commit is a release commit that only
|
|
191
|
+
* touches `releaseFiles` (e.g. the `CHANGELOG.md` commit of semantic-release)
|
|
192
|
+
*
|
|
193
|
+
* and falls back to a regular build when there is no such image.
|
|
194
|
+
*
|
|
195
|
+
* Only enable this when the image does not depend on the env (no
|
|
196
|
+
* env-specific build vars or build args baked in): stage and prod then run
|
|
197
|
+
* exactly the image that was built and deployed on the main branch.
|
|
198
|
+
*
|
|
199
|
+
* `true` is short for `{ releaseFiles: ["CHANGELOG.md"] }`.
|
|
200
|
+
* Not supported for `google-cloudrun` deploys.
|
|
201
|
+
*/
|
|
202
|
+
reuseMainBranchImage?: boolean | {
|
|
203
|
+
/**
|
|
204
|
+
* files (relative to the repository root) a release commit may
|
|
205
|
+
* change without invalidating the image of its parent.
|
|
206
|
+
* Defaults to `["CHANGELOG.md"]`.
|
|
207
|
+
*/
|
|
208
|
+
releaseFiles?: string[];
|
|
209
|
+
};
|
|
181
210
|
} & WithCacheConfig;
|
|
182
211
|
export type BuildConfigNodeBase = BuildConfigBase & {
|
|
183
212
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../packages/pipeline/src/build/types.ts"],"names":[],"mappings":";;;AA+
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../packages/pipeline/src/build/types.ts"],"names":[],"mappings":";;;AA+cO,MAAM,uBAAuB,GAAG,CACrC,CAAsB,EACM,EAAE;IAC9B,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrB,OAAO,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC;AACxB,CAAC,CAAC;AALW,QAAA,uBAAuB,2BAKlC;AAEK,MAAM,aAAa,GAAG,CAC3B,CAAc,EACd,GAAG,KAAQ,EACqC,EAAE;IAClD,IAAI,CAAC,IAAA,+BAAuB,EAAC,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9C,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC,CAAC;AANW,QAAA,aAAa,iBAMxB"}
|
|
@@ -74,6 +74,10 @@ type: `build: { from: "web" }` (see workspace builds below).
|
|
|
74
74
|
runner tags, build-only env vars, and extra runner variables. A
|
|
75
75
|
`jobImage` is a concrete image url or `{ image: "<name>" }`
|
|
76
76
|
referencing a project image (see below).
|
|
77
|
+
- `reuseMainBranchImage` — in release pipelines, stage/prod copy the
|
|
78
|
+
image the main branch (`dev`) built for the released commit instead of
|
|
79
|
+
rebuilding it (falls back to a build). Only for images that don't
|
|
80
|
+
depend on the env, e.g. Rails via Cloud Native Buildpacks.
|
|
77
81
|
- `docker` — the image build strategy: a built-in
|
|
78
82
|
(`{ type: "nginx" | "node" | "meteor" }`) or
|
|
79
83
|
`{ type: "custom" }` (expects a `Dockerfile`).
|
|
@@ -20,6 +20,7 @@ generated pipeline files.
|
|
|
20
20
|
| `runnerVariables` | `Record<string,string>` | extra runner vars (also for `services:`) |
|
|
21
21
|
| `jobTags` | `string[]` | runner tags |
|
|
22
22
|
| `jobImage` | `JobImageConfig` | CI image for the build: a concrete image or `{ image: "<name>" }` referencing a project image |
|
|
23
|
+
| `reuseMainBranchImage` | `boolean \| { releaseFiles?: string[] }` | release envs (stage/prod) copy the main branch (`dev`) image of the released commit instead of rebuilding; falls back to a build. Only for env-independent images; not for `google-cloudrun`. `true` = `{ releaseFiles: ["CHANGELOG.md"] }` |
|
|
23
24
|
| `docker` | see below | the deployable image strategy |
|
|
24
25
|
|
|
25
26
|
`TestJobCustom` (for `lint`/`test`/`audit`): `command`, `jobImage`,
|