Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(builds/containers): Enable moving builds to spinnaker-community… #7

Merged
merged 1 commit into from
Feb 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,5 @@ dmypy.json

# Pyre type checker
.pyre/

.idea/
20 changes: 10 additions & 10 deletions dev/buildtool/cloudbuild-build-java8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ steps:
name: gcr.io/cloud-builders/docker
args: [
"build",
"-t", "gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME",
"-t", "gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-slim",
"-t", "$_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME",
"-t", "$_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-slim",
"-f", "Dockerfile.slim",
".",
]
Expand All @@ -23,7 +23,7 @@ steps:
name: gcr.io/cloud-builders/docker
args: [
"build",
"-t", "gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-ubuntu",
"-t", "$_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-ubuntu",
"-f", "Dockerfile.ubuntu",
".",
]
Expand All @@ -32,7 +32,7 @@ steps:
name: gcr.io/cloud-builders/docker
args: [
"build",
"-t", "gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-java8",
"-t", "$_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-java8",
"-f", "Dockerfile.java8",
".",
]
Expand All @@ -41,16 +41,16 @@ steps:
name: gcr.io/cloud-builders/docker
args: [
"build",
"-t", "gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-ubuntu-java8",
"-t", "$_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-ubuntu-java8",
"-f", "Dockerfile.ubuntu-java8",
".",
]
images:
- gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME
- gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-slim
- gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-java8
- gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-ubuntu
- gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-ubuntu-java8
- $_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME
- $_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-slim
- $_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-java8
- $_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-ubuntu
- $_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-ubuntu-java8
timeout: 3600s
options:
machineType: N1_HIGHCPU_8
20 changes: 10 additions & 10 deletions dev/buildtool/cloudbuild-tag-java8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ steps:
name: gcr.io/cloud-builders/docker
args: [
"build",
"-t", "gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME",
"-t", "gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-slim",
"-t", "gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-java8",
"-t", "$_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME",
"-t", "$_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-slim",
"-t", "$_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-java8",
"-f", "Dockerfile.slim",
".",
]
Expand All @@ -24,17 +24,17 @@ steps:
name: gcr.io/cloud-builders/docker
args: [
"build",
"-t", "gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-ubuntu",
"-t", "gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-ubuntu-java8",
"-t", "$_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-ubuntu",
"-t", "$_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-ubuntu-java8",
"-f", "Dockerfile.ubuntu",
".",
]
images:
- gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME
- gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-slim
- gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-java8
- gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-ubuntu
- gcr.io/$PROJECT_ID/$_IMAGE_NAME:$TAG_NAME-ubuntu-java8
- $_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME
- $_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-slim
- $_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-java8
- $_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-ubuntu
- $_DOCKER_REGISTRY/$_IMAGE_NAME:$TAG_NAME-ubuntu-java8
timeout: 3600s
options:
machineType: N1_HIGHCPU_8
5 changes: 3 additions & 2 deletions dev/buildtool/container_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,11 @@ def __build_with_gcb(self, repository, build_version):
# Note this command assumes a cwd of git_dir
command = ('gcloud builds submit '
' --account={account} --project={project}'
' --substitutions=TAG_NAME={tag_name},_IMAGE_NAME={image_name}'
' --substitutions=TAG_NAME={tag_name},_IMAGE_NAME={image_name},_DOCKER_REGISTRY={docker_registry}'
' --config={cloudbuild_config} .'
.format(account=options.gcb_service_account,
project=options.gcb_project,
docker_registry=options.docker_registry,
tag_name=build_version,
image_name=service_name,
cloudbuild_config=cloudbuild_config))
Expand Down Expand Up @@ -136,7 +137,7 @@ def init_argparser(self, parser, defaults):
self.add_bom_parser_args(parser, defaults)
self.add_argument(
parser, 'gcb_project', defaults, None,
help='The GCP project ID to publish containers to when'
help='The GCP project ID that builds the containers when'
' using Google Container Builder.')
self.add_argument(
parser, 'gcb_service_account', defaults, None,
Expand Down