Skip to content
This repository was archived by the owner on May 16, 2025. It is now read-only.

Conversation

@ivannaranjo
Copy link
Contributor

When we build a Docker image to be deployed to GKE we create a cloudbuild.yaml file that only builds the image by invoking docker build on the existing Dockerfile. As it turns out gcloud already supports this directly. Instead of generating the cloudbuild.yaml we can invoke gcloud like this:

gcloud container builds submit --tag={name of the tag} {path to the published app}

This will accomplish the same, building the Docker image for the app, with less complexity.

Fixes #591

@codecov
Copy link

codecov bot commented Sep 15, 2017

Codecov Report

Merging #799 into master will increase coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #799      +/-   ##
==========================================
+ Coverage   10.46%   10.47%   +<.01%     
==========================================
  Files         496      496              
  Lines       12130    12124       -6     
==========================================
  Hits         1270     1270              
+ Misses      10860    10854       -6
Impacted Files Coverage Δ
...ogleCloudExtension.Deployment/CloudBuilderUtils.cs 0% <ø> (ø) ⬆️
...nsion/GoogleCloudExtension.GCloud/GCloudWrapper.cs 0% <0%> (ø) ⬆️
...n/GoogleCloudExtension.Deployment/GkeDeployment.cs 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d925e1...952737e. Read the comment docs.

imageName: options.DeploymentName,
imageVersion: options.DeploymentVersion,
buildFilePath: buildFilePath);
imageVersion: options.DeploymentVersion);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since every parameter to GetImageTag() is found in options, would it be better to move the function into class DeploymentOptions itself?

string imageTag = options.ImageTag;

or

string imageTag = options.GetImageTag();

That would also let you get rid of class CloudBuilderUtils entirely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I want to keep it separate because that way creating a Docker image is not only related to GKE. I am in fact working on a private change at the moment where I need this code shared as it is, because I am just building docker images out of the project.

@ivannaranjo
Copy link
Contributor Author

PTAL

@ivannaranjo ivannaranjo merged commit 9541189 into GoogleCloudPlatform:master Sep 20, 2017
@ivannaranjo ivannaranjo deleted the master_not_creating_cloudbuild_yaml branch September 20, 2017 12:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants