Skip to content
Branch: master
Find file History
bendory Upgrade Docker to 18.09.6. (#494)
* Docker upgrade.

Added 18.09.6.
Removed 18.09.0 and 18.06.1.

* Rev to 18.09.6.

* Update README.md

* Upgraded docker to version 18.09.6.

* Upgraded docker to 18.09.6.

* Upgrade docker to 18.09.6.
Latest commit 1d14479 May 20, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
examples Remove unnecessary container_repositories May 3, 2019
.gcloudignore Fix + cleanup broken build issues. (#414) Dec 4, 2018
Dockerfile
README.md Add missing comma in bazel docker_build rule (#358) Sep 11, 2018
bazel.sh Write invocation_id even when bazel fails. (#363) Sep 17, 2018
cloudbuild.yaml Fix + cleanup broken build issues. (#414) Dec 4, 2018
invocation_id_test.sh Write invocation_id even when bazel fails. (#363) Sep 17, 2018

README.md

Bazel

This is a tool builder to simply invoke bazel commands.

Arguments passed to this builder will be passed to bazel directly.

The latest available version of bazel is used.

Examples

The following examples demonstrate build request that use this builder:

Build a target

This cloudbuild.yaml simply builds a target. It might be a binary, a library, a test target, or any other buildable target.

steps:
- name: gcr.io/cloud-builders/bazel
  args: ['build', '//java/com/company/service:server']

Build and push a container image

If the rule is a docker_build target, then you can bazel run the target to build a Docker image and load it into the Docker daemon. You can then tag the resulting image so it can be pushed to the Container Registry.

path/to/some/BUILD file:

docker_build(
  name = "docker_target",
  base = "@docker_debian//:wheezy",
  entrypoint = ["echo", "foo"],
)

This docker_build rule produces a Docker container image based on debian that specifies "echo foo" as its ENTRYPOINT.

See https://bazel.build/versions/master/docs/be/docker.html for more options.

cloudbuild.yaml:

steps:
# Build the Docker image and load it into the Docker daemon.
# The loaded image name is the BUILD target's name, prefixed with bazel/.
- name: gcr.io/cloud-builders/bazel
  args: ['run', '//path/to/some:docker_target']
# Re-tag the image to something in your project's gcr.io repository.
- name: gcr.io/cloud-builders/docker
  args: ['tag', 'bazel/path/to/some:docker_target', 'gcr.io/$PROJECT_ID/server']
# Push the image.
images: ['gcr.io/$PROJECT_ID/server']
You can’t perform that action at this time.