0

On Google Cloud Container Builder we want to:

  • Push any branch to REPO:BRANCH
  • Push any tag to REPO:TAG
  • Push master to REPO:latest

Do we need a separate cloudbuild.yml file for each? Is there a lighter way of doing this?

We need to use a file rather than a trigger in the UI, because the build takes 20 minutes, and the timeout of the UI triggers are 10 minutes.

Maximilian
  • 7,512
  • 3
  • 50
  • 63

1 Answers1

5

At this time, using three different config files for the different naming schemes is the best solution.

Letting you use a single config file for all the ways you want to build (different triggers on the same repo, or from gcloud directly, etc) is one of our goals, so we'll take your use-case into consideration.

John Asmuth
  • 1,052
  • 5
  • 7
  • OK. Even if it's "TAG_OR_BRANCH_NAME" then that'd cut out a lot of duplication – Maximilian Apr 13 '17 at 00:14
  • 4
    You could use "gcr.io/$PROJECT_ID/foo:${TAG_NAME}${BRANCH_NAME}" right now and get either the tag or branch name (only one will ever be set), but this does not help you turn master into :latest. – John Asmuth Apr 13 '17 at 13:00