Skip to content
Permalink
Browse files

GCB rebrand. (#309)

* Container Builder becomes Cloud Build.

* `gcloud container builds` --> `gcloud builds`.
  • Loading branch information...
bendory committed Jul 24, 2018
1 parent 8f94d33 commit 8cf67a719100e089781402e40a919df1a4f571f0
@@ -1,7 +1,7 @@
# Google Cloud Container Builder official builder images
# Google Cloud Build official builder images

This repository contains source code for official builders used with the [Google
Cloud Container Builder API](https://cloud.google.com/container-builder/docs/).
Cloud Build API](https://cloud.google.com/cloud-build/docs/).

Pre-built images are available at `gcr.io/cloud-builders/...` and include:

@@ -25,4 +25,4 @@ Community
repo](https://github.com/GoogleCloudPlatform/cloud-builders-community).

File issues here, or e-mail `gcr-contact@google.com` if you have questions about
the usage of these build steps or the Cloud Container Builder API in general.
the usage of these build steps or the Cloud Build API in general.
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml

steps:
# Build the Bazel builder and output the version we built with.
@@ -11,8 +11,8 @@ By default, the version of Docker that is used by this builder is `17.12.0`.
## GCR Credentials

The Docker build step is automatically set up with credentials for your
[Container Builder Service
Account](https://cloud.google.com/container-builder/docs/permissions). These
[Cloud Build Service
Account](https://cloud.google.com/cloud-build/docs/permissions). These
permissions are sufficient to interact directly with GCR.

## Examples
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml

steps:
# Build all supported versions.
@@ -5,7 +5,7 @@ This directory contains a simple example that uses the docker build step.
To build this "Hello, world!" app, run:

```
gcloud container builds submit --tag=gcr.io/my-project/sample-image .
gcloud builds submit --tag=gcr.io/my-project/sample-image .
```

Once your build is successful, you can run the app like this:
@@ -25,7 +25,7 @@ is used to build your project.
To build this builder, run the following command on this directory:

```bash
gcloud container builds submit --config=./cloudbuild.yaml .
gcloud builds submit --config=./cloudbuild.yaml .
```

This will build the Container Build step in your current GCP project.
@@ -12,6 +12,7 @@ RUN \
bigtable \
cbt \
cloud-datastore-emulator \
cloud-build-local \
container-builder-local \
datalab \
docker-credential-gcr \
@@ -7,9 +7,9 @@ Arguments passed to this builder will be passed to `gcloud` directly, allowing
callers to run [any `gcloud`
command](https://cloud.google.com/sdk/gcloud/reference/).

When executed in the Container Builder environment, commands are executed with
When executed in the Cloud Build environment, commands are executed with
credentials of the [builder service
account](https://cloud.google.com/container-builder/docs/permissions) for the
account](https://cloud.google.com/cloud-build/docs/permissions) for the
project.

The latest released version of `gcloud` is used.
@@ -38,8 +38,8 @@ There are two variants of the `gcloud` builder:
* `gcloud-slim` installs only the `gcloud` CLI and no components, and is
smaller.

Both images are cached on Container Builder worker VMs, so the size of the image
should not matter in most cases when running in that environment. However, in
other environments where images are not cached, you may find that a smaller
builder image is faster to pull, and might be preferrable to the larger "kitchen
sink" `gcloud` builder image.
Both images are cached on Cloud Build VMs, so the size of the image should not
matter in most cases when running in that environment. However, in other
environments where images are not cached, you may find that a smaller builder
image is faster to pull, and might be preferrable to the larger "kitchen sink"
`gcloud` builder image.
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml

steps:
- name: 'gcr.io/cloud-builders/docker'
@@ -5,9 +5,9 @@ This is a tool builder to simply invoke `git` commands.
Arguments passed to this builder will be passed to `git` directly, allowing
callers to run [any Git command](https://git-scm.com/docs).

When executed in the Container Builder environment, commands are executed with
When executed in the Cloud Build environment, commands are executed with
credentials of the [builder service
account](https://cloud.google.com/container-builder/docs/permissions) for the
account](https://cloud.google.com/cloud-build/docs/permissions) for the
project.

## Examples
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml

steps:
# Pull the latest gcloud image.
@@ -70,4 +70,4 @@ If you use the `install` subcommand, the binaries will end up in `$GOPATH/bin`.

To build this builder, run the following command in this directory.

$ gcloud container builds submit . --config=cloudbuild.yaml
$ gcloud builds submit . --config=cloudbuild.yaml
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml

steps:
# Build the alpine and debian versions.
@@ -8,7 +8,7 @@ executing `export PROJECT_ID=my-project` prior to running the below commands.

First, build the app:

`gcloud container builds submit --config=cloudbuild.yaml .`
`gcloud builds submit --config=cloudbuild.yaml .`

If you have Docker installed locally, you can test your app. In one window, run:

@@ -6,4 +6,4 @@ This Container Builder build step runs the Gradle build tool.

To build this builder, run the following command in this directory.

$ gcloud container builds submit . --config=cloudbuild.yaml
$ gcloud builds submit . --config=cloudbuild.yaml
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml
#
# TODO(franklinn): Stop tagging java/mvn images once usage has dropped off.

@@ -7,9 +7,9 @@ Arguments passed to this builder will be passed to `gsutil` directly, allowing
callers to run [any `gsutil`
command](https://cloud.google.com/storage/docs/gsutil).

When executed in the Container Builder environment, commands are executed with
When executed in the Cloud Build environment, commands are executed with
credentials of the [builder service
account](https://cloud.google.com/container-builder/docs/permissions) for the
account](https://cloud.google.com/cloud-build/docs/permissions) for the
project.

The latest available version of `gsutil` is used.
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml

steps:
- name: 'gcr.io/cloud-builders/docker'
@@ -9,7 +9,7 @@ To run this example, make sure you have created a GCS Bucket named `$PROJECT_ID`
and run:

```
gcloud container builds submit --config=cloudbuild.yaml .
gcloud builds submit --config=cloudbuild.yaml .
```

The `hello` binary will be found in your GCS Bucket.
@@ -6,4 +6,4 @@ This build step runs the javac tool.

To build this builder, run the following command in this directory.

$ gcloud container builds submit . --config=cloudbuild.yaml
$ gcloud builds submit . --config=cloudbuild.yaml
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml
#
# TODO(franklinn): Stop tagging java/javac images once usage has dropped off.

@@ -1,20 +1,20 @@
# Tool builder: `gcr.io/cloud-builders/kubectl`

This Container Builder build step runs
This Cloud Build build step runs
[`kubectl`](https://kubernetes.io/docs/user-guide/kubectl-overview/).

## Using this builder with Google Kubernetes Engine

To use this builder, your
[builder service account](https://cloud.google.com/container-builder/docs/how-to/service-account-permissions)
[builder service account](https://cloud.google.com/cloud-build/docs/how-to/service-account-permissions)
will need IAM permissions sufficient for the operations you want to perform. For
typical read-only usage, the "Kubernetes Engine Viewer" role is sufficient. To
deploy container images on a GKE cluster, the "Kubernetes Engine Developer" role
is sufficient. Check the
[GKE IAM page](https://cloud.google.com/kubernetes-engine/docs/iam-integration)
for details.

Running the following command will give Container Builder Service Account
Running the following command will give Cloud Build Service Account
`container.developer` role access to your Kubernetes Engine clusters:

```sh
@@ -33,11 +33,11 @@ cluster. You can configure the cluster by setting environment variables.
CLOUDSDK_CONTAINER_CLUSTER=<your cluster's name>


If your GKE cluster is in a different project than Container Builder, also set:
If your GKE cluster is in a different project than Cloud Build, also set:

```CLOUDSDK_CORE_PROJECT=<the GKE cluster project>```
Make sure you also grant the Container Builder service account permissions in the GKE cluster project.
Make sure you also grant the Cloud Build service account permissions in the GKE cluster project.
Setting the environment variables above will cause this step's entrypoint to
first run a command to fetch cluster credentials as follows.
@@ -50,4 +50,4 @@ Then, `kubectl` will have the configuration needed to talk to your GKE cluster.
To build this builder, run the following command in this directory.
$ gcloud container builds submit . --config=cloudbuild.yaml
$ gcloud builds submit . --config=cloudbuild.yaml
@@ -7,4 +7,4 @@ dependencies that are precached within the image.

To build this builder, run the following command in this directory.

$ gcloud container builds submit . --config=cloudbuild.yaml
$ gcloud builds submit . --config=cloudbuild.yaml
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml
#
# TODO(franklinn): Stop tagging java/mvn images once usage has dropped off.

@@ -6,4 +6,4 @@ This Container Builder build step runs the `npm` tool.

To build this builder, run the following command in this directory.

$ gcloud container builds submit . --config=cloudbuild.yaml
$ gcloud builds submit . --config=cloudbuild.yaml
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml

steps:
# Build all supported versions.
@@ -6,4 +6,4 @@ This Container Builder build step runs the `yarn` tool.

To build this builder, run the following command in this directory.

$ gcloud container builds submit . --config=cloudbuild.yaml
$ gcloud builds submit . --config=cloudbuild.yaml
@@ -1,5 +1,5 @@
# In this directory, run the following command to build this builder.
# $ gcloud container builds submit . --config=cloudbuild.yaml
# $ gcloud builds submit . --config=cloudbuild.yaml
#
# TODO(franklinn): Stop tagging nodejs/yarn images once usage has dropped off.

0 comments on commit 8cf67a7

Please sign in to comment.
You can’t perform that action at this time.