From 0959ba7bf720b1d9acc0c3246d4f0781e3b46b31 Mon Sep 17 00:00:00 2001 From: Tejal Desai Date: Tue, 5 Nov 2019 15:43:15 -0800 Subject: [PATCH] minimal jib gcb docs --- .../en/docs/pipeline-stages/builders.md | 19 ++++++++++++++++++- docs/content/en/samples/builders/gcb-jib.yaml | 6 ++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 docs/content/en/samples/builders/gcb-jib.yaml diff --git a/docs/content/en/docs/pipeline-stages/builders.md b/docs/content/en/docs/pipeline-stages/builders.md index 94e6764a33a..5b4ae37e095 100755 --- a/docs/content/en/docs/pipeline-stages/builders.md +++ b/docs/content/en/docs/pipeline-stages/builders.md @@ -221,7 +221,24 @@ a container image. Then for each such sub-project: ## Jib Maven and Gradle remotely with Google Cloud Build -{{% todo 1299 %}} +Similar to building [Dockerfile remotely on Google Cloud Build](#dockerfile-remotely-with-google-cloud-build), you can also build +maven and gradle projects remotely using Jib. +Jib cloud builder is one of the [supported builders for Google Cloud Build](https://cloud.google.com/cloud-build/docs/cloud-builders#supported_builder_images_provided_by_product_name_short). + +**Configuration** + +Similar to building [Dockerfile remotely on Google Cloud Build](#dockerfile-remotely-with-google-cloud-build), to use Cloud Build, add build type `googleCloudBuild` to the `build` +section of `skaffold.yaml`. The following options can optionally be configured: + +{{< schema root="GoogleCloudBuild" >}} + +**Example** + +The following `build` section, instructs Skaffold to build + `gcr.io/k8s-skaffold/project1` with Google Cloud Build using Jib builder: + +{{% readfile file="samples/builders/gcb-jib.yaml" %}} + ## Bazel locally diff --git a/docs/content/en/samples/builders/gcb-jib.yaml b/docs/content/en/samples/builders/gcb-jib.yaml new file mode 100644 index 00000000000..797e66139c2 --- /dev/null +++ b/docs/content/en/samples/builders/gcb-jib.yaml @@ -0,0 +1,6 @@ +build: + artifacts: + - image: gcr.io/k8s-skaffold/project1 + jib: {} + googleCloudBuild: + projectId: YOUR-GCP-PROJECT