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
images/builder: Allow GCB builds from arbitrary build directories
- Remove cdToRootDir
This function was not actually cd-ing into directories
- Add --build-dir flag to support builds that require the entire
repo/workspace to be uploaded to GCB
- Add a validation method to ensure config directory and cloudbuild.yaml
exist before submitting build
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
flag.StringVar(&o.buildDir, "build-dir", "", "If provided, this directory will be uploaded as the source for the Google Cloud Build run.")
268
+
flag.StringVar(&o.cloudbuildFile, "gcb-config", "cloudbuild.yaml", "If provided, this will be used as the name of the Google Cloud Build config file.")
260
269
flag.StringVar(&o.logDir, "log-dir", "", "If provided, build logs will be sent to files in this directory instead of to stdout/stderr.")
261
270
flag.StringVar(&o.scratchBucket, "scratch-bucket", "", "The complete GCS path for Cloud Build to store scratch files (sources, logs).")
262
271
flag.StringVar(&o.project, "project", "", "If specified, use a non-default GCP project.")
flag.StringVar(&o.variant, "variant", "", "If specified, build only the given variant. An error if no variants are defined.")
265
-
flag.StringVar(&o.envPassthrough, "env-passthrough", "", "Comma-separated list of specified environment variables to be passed to GCB as subtitutions with an _ prefix. If the variable doesn't exist, the substitution will exist but be empty.")
274
+
flag.StringVar(&o.envPassthrough, "env-passthrough", "", "Comma-separated list of specified environment variables to be passed to GCB as substitutions with an _ prefix. If the variable doesn't exist, the substitution will exist but be empty.")
275
+
266
276
flag.Parse()
277
+
267
278
ifflag.NArg() <1 {
268
-
_, _=fmt.Fprintln(os.Stderr, "expected an image directory to be provided")
279
+
_, _=fmt.Fprintln(os.Stderr, "expected a config directory to be provided")
0 commit comments