You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This image builder is sugar on top of `gcloud builds submit`. It offers the following features:
3
+
This builder is sugar on top of `gcloud builds submit`. It offers the following features:
5
4
6
5
- Automatically injecting the standard commit-based tag (e.g. `20190403-dddd315ad-dirty`) as `_GIT_TAG`
7
6
- Optionally blocking pushes of dirty builds
@@ -14,36 +13,38 @@ and `cloudbuild.yaml`. For example, a subset of the `kubekins-e2e` variants look
14
13
15
14
```yaml
16
15
variants:
17
-
'1.14':
18
-
CONFIG: '1.14'
19
-
GO_VERSION: 1.12.1
20
-
K8S_RELEASE: latest
21
-
BAZEL_VERSION: 0.21.0
22
-
'1.13':
23
-
CONFIG: '1.13'
24
-
GO_VERSION: 1.11.5
25
-
K8S_RELEASE: stable-1.13
26
-
BAZEL_VERSION: 0.18.1
16
+
'1.16':
17
+
CONFIG: '1.16'
18
+
GO_VERSION: 1.12.12
19
+
K8S_RELEASE: stable-1.16
20
+
BAZEL_VERSION: 0.23.2
21
+
'1.15':
22
+
CONFIG: '1.15'
23
+
GO_VERSION: 1.12.12
24
+
K8S_RELEASE: stable-1.15
25
+
BAZEL_VERSION: 0.23.2
27
26
```
28
27
29
-
By default, the image builder will build both the `1.13` and `1.14` groups simultaneously.
30
-
If `--log-dir` is specified, it will write the build logs for each to `1.13.log` and `1.14.log`.
28
+
By default, the image builder will build both the `1.15` and `1.16` groups simultaneously.
29
+
If `--log-dir` is specified, it will write the build logs for each to `1.15.log` and `1.16.log`.
31
30
32
-
Alternatively, you can use `--variant` to build only one variant, e.g. `--variant 1.13`.
31
+
Alternatively, you can use `--variant` to build only one variant, e.g. `--variant 1.15`.
33
32
34
33
If no `variants.yaml` is specified, `cloudbuild.yaml` will be run once with no extra substitutions
35
34
beyond `_GIT_TAG`.
36
35
37
36
## Usage
38
37
39
-
```
40
-
bazel run //images/builder -- [options] path/to/image-directory/
38
+
```shell
39
+
bazel run //images/builder -- [options] path/to/build-directory/
41
40
```
42
41
43
-
* `--allow-dirty`: If true, allow pushing dirty builds.
44
-
* `--log-dir`: If provided, build logs will be sent to files in this directory instead of to stdout/stderr.
45
-
* `--project`: If specified, use a non-default GCP project.
46
-
* `--scratch-bucket`: If provided, the complete GCS path for Cloud Build to store scratch files (sources, logs). Necessary for upload reuse. If omitted, `gcloud` will create or reuse a bucket of its choosing.
47
-
* `--variant`: If specified, build only the given variant. An error if no variants are defined.
48
-
* `--env-passthrough`: A comma-separated list of environment variables to pass through as substitutions.
49
-
The substitution names will automatically be prefixed with underscores, as required by GCB.
42
+
- `--allow-dirty`: If true, allow pushing dirty builds.
43
+
- `--log-dir`: If provided, build logs will be sent to files in this directory instead of to stdout/stderr.
44
+
- `--project`: If specified, use a non-default GCP project.
45
+
- `--scratch-bucket`: If provided, the complete GCS path for Cloud Build to store scratch files (sources, logs). Necessary for upload reuse. If omitted, `gcloud` will create or reuse a bucket of its choosing.
46
+
- `--variant`: If specified, build only the given variant. An error if no variants are defined.
47
+
- `--env-passthrough`: Comma-separated list of specified environment variables to be passed to GCB as substitutions with an underscore (`_`) prefix. If the variable doesn't exist, the substitution will exist but be empty.
48
+
- `--build-dir`: If provided, this directory will be uploaded as the source for the Google Cloud Build run.
49
+
- `--gcb-config`: If provided, this will be used as the name of the Google Cloud Build config file.
50
+
- `--no-source`: If true, no source will be uploaded with this build.
0 commit comments