versioning/

directory
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2017 License: Apache-2.0

README

Description

Versioning tools for Dockerfile source repos.

  • dockerfiles generates versionsed Dockerfiles from on a common template.
  • cloudbuild generates a configuration file to build these Dockerfiles using Google Container Builder.

Installation

git clone github.com/GoogleCloudPlatform/runtimes-common
cd runtimes-common/versioning
  • Build:
bazel build scripts:all
  • Set the path to the built scripts:
export PATH=$PATH:$PWD/bazel-bin/scripts

Create versions.yaml

At root of the Dockerfile source repo, add a file called versions.yaml. Follow the format defined in versions.go. See an example on github.

Primary folders in the Dockerfile source repo:

  • templates contains Dockerfile.template, which is a Go template for generating Dockerfiles.
  • tests contains any tests that should be included in the generated cloud build configuration.
  • Version folders as defined in versions.yaml. The Dockerfiles are generated into these folders. The folders should also contain all supporting files for each version, for example docker-entrypoint.sh files.

Usage of dockerfiles command

cd path/to/dockerfile/repo
dockerfiles

Usage of cloudbuild command

cd path/to/dockerfile/repo
cloudbuild > cloudbuild.yaml

You can use the generated cloudbuild.yaml file as followed:

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

Directories

Path Synopsis
scripts
cloudbuild
Command line tool for generating a Cloud Build yaml file based on versions.yaml.
Command line tool for generating a Cloud Build yaml file based on versions.yaml.
dockerfiles
Command line tool for updating Dockerfiles based on versions.yaml.
Command line tool for updating Dockerfiles based on versions.yaml.
Library for parsing versions.yaml file.
Library for parsing versions.yaml file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL