-
Notifications
You must be signed in to change notification settings - Fork 366
feat(#1656) : Add Jib publish strategy #4680
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
feat(#1656) : Add Jib publish strategy #4680
Conversation
|
🐫 Thank you for contributing! Code Coverage Report |
ded8201 to
c1f28f7
Compare
|
🐫 Thank you for contributing! Code Coverage Report |
| jibPlugin := maven.Plugin{ | ||
| GroupID: "com.google.cloud.tools", | ||
| ArtifactID: "jib-maven-plugin", | ||
| Version: "3.3.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have this variable set in the Camel K Runtime BOM instead but I guess can be considered after the draft phase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea, I would need to see how to make that work. Is it a good idea to do that now as we are moving the runtime code to a possible camel-quarkus extension ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not matter, we can always add that, let's keep for a later dev.
c1f28f7 to
f447c9d
Compare
|
🐫 Thank you for contributing! Code Coverage Report |
f447c9d to
0b149a1
Compare
|
🐫 Thank you for contributing! Code Coverage Report |
0b149a1 to
3e16b4d
Compare
|
🐫 Thank you for contributing! Code Coverage Report |
squakez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I think it's okey. There are a few design changes that could make this cleaner if possible.
pkg/builder/quarkus.go
Outdated
| }, | ||
| }, | ||
| }, | ||
| jib.JibMavenPlugin(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should do this one only when the publish strategy is JIB. However, in general, I think we should leverage the builder profile configuration to have a clean logic separation (ie, the quarkus trait should know nothing about the publishing strategy).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the proposed approach, you should be able to create a configmap on the fly containing the required configuration for Jib and set to the build accordingly.
|
|
||
| return util.RunAndLog(ctx, cmd, mavenLogHandler, mavenLogHandler) | ||
| // generate maven file | ||
| if err := generateMavenContext(c.context.Path, args); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if, instead of copying the execution config in a file, you could try to regenerate the same at the moment of calling the JIB (ie, creating a func which take care to generate and call it here and later when needed). It would be much cleaner IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better, but I would like to dedicate another issue to this part as it needs a big refactoring in a sensitive part of the build task. It would also be an occasion to see if we can separate the maven code dedicated to commands execution from the project generation code.
3e16b4d to
8cd46a1
Compare
|
🐫 Thank you for contributing! Code Coverage Report |
229dedf to
63cd5d3
Compare
|
🐫 Thank you for contributing! Code Coverage Report |
1 similar comment
|
🐫 Thank you for contributing! Code Coverage Report |
63cd5d3 to
5e89ebe
Compare
|
I adapted to use a maven profile:
What still needs to be done in this Draft: tests and commits squash What will be done in later PRs:
|
|
🐫 Thank you for contributing! Code Coverage Report |
5e89ebe to
7588ab2
Compare
|
🐫 Thank you for contributing! Code Coverage Report |
7588ab2 to
7035a90
Compare
|
🐫 Thank you for contributing! Code Coverage Report |
* Add publish jib strategy compatible with incremental build and native build * Use google jib maven plugin * Use builder maven profiles trait to configure jib plugin * The ConfigMap is created with: * maven jib plugin profile content in profile.xml * kit as an owner * The Jib Profile is used in the Jib published strategy
7035a90 to
c921652
Compare
|
🐫 Thank you for contributing! Code Coverage Report |
squakez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work, thanks for contributing to this. I'm going to add some issues to take care of known enhancements later on.
Addition of a new strategy leveraging Jib:
What will be done in later PRs:
Release Note