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

Do not build the mvn-gcloud builder image during Cloud Build executions #157

Closed
wants to merge 1 commit into from

Conversation

aslo
Copy link
Contributor

@aslo aslo commented Sep 26, 2017

I set up a build trigger that will rebuild and push the gcr.io/java-runtime-test/mvn-gcloud-builder image on every push to master. Now, we don't need to rebuild this image during Cloud Build executions.

fixes #155

@meltsufin
Copy link
Member

How are we going to know if this trigger-based build is failing?
I think I prefer to actually building the mvn-gcloud-builder image during every execution as long as it's part of this codebase. Is the concern mostly around the speed of the integration testing?

@aslo
Copy link
Contributor Author

aslo commented Sep 26, 2017

Code reuse is another big part of this. If we separate this image's build from the runtime release builds, all of the runtimes can use it easily. Right now the openjdk and jetty runtimes contain very similar dockerfiles that are used for the same thing.

@meltsufin
Copy link
Member

It sounds like a useful build step. Would it make any sense to host it here alongside other Cloud Build steps?

@aslo
Copy link
Contributor Author

aslo commented Sep 26, 2017

I'm not sure it would necessarily make sense. This image is somewhat specific to our use case, so I'm not sure how much value customers would get from it. Also, if we were to add it to the cloud-builders repo, we would no longer control it. There's additional overhead there in terms of getting new images released and updated.

@meltsufin
Copy link
Member

Maybe we can just use a wget step to download gcloud as part of the build?

@balopat
Copy link
Contributor

balopat commented Sep 27, 2017

The problem I see with the current design is:

  • we could use the exact same step in other runtimes, but with the sizable Dockerfile definition that duplication seems problematic
  • we build and install python and gcloud on top of maven for every build (this could be okay in the end, if we find build wait times are cheaper than maintenance overhead created by alternative solutions)

Design alternatives:

  1. build and host somewhere:
  • Hosting it in cloud builders - the problem is not with specificity but rather that those builders seem to be "single-tool" images, while this one is a "multi-tool" image, so it would break that consistency.
  • Hosting it ourselves (java-runtimes) - the problem is maintenance overhead and extra jobs to ensure this is always there
  1. simplify build step (if we're okay to incur the build time)
  • We could simulate a "mixed step" like: "from mvn+gcloud" with a multistage Dockerfile potentially? The small Dockerfile might be okay to duplicate - @aslo do you mind testing out whether a multistage Dockerfile would look simple enough?
  • Simple wget might reduce the Dockerfile size too - if we can do it cleanly

@aslo
Copy link
Contributor Author

aslo commented Sep 27, 2017

do you mind testing out whether a multistage Dockerfile would look simple enough?

Happy to take a look at it, but I'm pretty sure that the multistage dockerfile would need to be virtually identical to the mvn-gcloud dockerfile we have now. I'm not sure how we'd be able to get around duplicating all that.

@aslo
Copy link
Contributor Author

aslo commented Sep 29, 2017

@meltsufin and I decided to close this to revisit later.

@aslo aslo closed this Sep 29, 2017
@aslo aslo deleted the no-build-mvn-gcloud branch September 29, 2017 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not build a "builder" image during every image build.
3 participants