-
Notifications
You must be signed in to change notification settings - Fork 640
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
Add the ability to attach a saved image archive as a project artifact #1210
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1210 +/- ##
============================================
+ Coverage 53.05% 53.48% +0.43%
- Complexity 1532 1553 +21
============================================
Files 150 150
Lines 7990 7996 +6
Branches 1202 1204 +2
============================================
+ Hits 4239 4277 +38
+ Misses 3333 3297 -36
- Partials 418 422 +4
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #1210 +/- ##
============================================
+ Coverage 53.05% 53.48% +0.43%
- Complexity 1532 1553 +21
============================================
Files 150 150
Lines 7990 7996 +6
Branches 1202 1204 +2
============================================
+ Hits 4239 4277 +38
+ Misses 3333 3297 -36
- Partials 418 422 +4
|
Codecov Report
@@ Coverage Diff @@
## master #1210 +/- ##
============================================
+ Coverage 53.33% 53.51% +0.18%
+ Complexity 1595 1554 -41
============================================
Files 154 150 -4
Lines 8166 7998 -168
Branches 1249 1204 -45
============================================
- Hits 4355 4280 -75
+ Misses 3379 3296 -83
+ Partials 432 422 -10
|
Codecov Report
@@ Coverage Diff @@
## master #1210 +/- ##
============================================
+ Coverage 53.05% 53.48% +0.43%
- Complexity 1532 1553 +21
============================================
Files 150 150
Lines 7990 7996 +6
Branches 1202 1204 +2
============================================
+ Hits 4239 4277 +38
+ Misses 3333 3297 -36
- Partials 418 422 +4
|
52f88f0
to
b64b4e8
Compare
Signed-off-by: William Rose <william.rose@nuance.com>
b64b4e8
to
9e2bf69
Compare
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.
Looks good, but i have a minor suggestion how to model the configuration.
private boolean saveAttach; | ||
|
||
@Parameter(property = "docker.save.classifier") | ||
private String saveClassifier; |
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 wonder whether we could combine both properties (as I'm always trying to keep the configuration surface small). What's about having a single 'saveAttach' string property, which can be 'true/false' (then a default classifier is select for 'true') or any other value in which case it enables the featue and uses that classifier ?
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 can, although I always worry about making something that looks boolean, but isn't, because of previous mockery.
I could make specifying a non-empty saveClassifier
mean "attach with this classifier", and not provide the default logic, since by the time you write <saveAttach>true</saveAttach>
, you probably could have written <saveClassifier>archive</saveClassifier>
, and we could use %a for the alias (as in <saveClassifier>archive-%a</saveClassifier>
or -Ddocker.save.classifier=archive-%a)?
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 can, although I always worry about making something that looks boolean, but isn't, because of previous mockery.
I could make specifying a non-empty
saveClassifier
mean "attach with this classifier", and not provide the default logic, since by the time you write<saveAttach>true</saveAttach>
, you probably could have written<saveClassifier>archive</saveClassifier>
, and we could use %a for the alias (as in<saveClassifier>archive-%a</saveClassifier>
or -Ddocker.save.classifier=archive-%a)?
Fair enough. I think having no default name is fine as adding one is trivial (also saves the user a documentation lookup for finding out what the default would be).
Signed-off-by: William Rose <william.rose@nuance.com>
4752423
to
bbf7773
Compare
I added a commit to remove saveAttach in favour of just saveClassifier. I didn't squash this with the previous commit yet as I think if you merge PR #1208 I will need to resolve a conflict in the changelog, so I can squash it all then. |
…hives. This PR implements the proposed pattern matching that scans the archive prior to loading and then creates a tag from the image name loaded from the archive to the image name configured in the Maven project. Signed-off-by: William Rose <william.rose@nuance.com> Add the ability to attach a saved image archive as a project artifact. Signed-off-by: William Rose <william.rose@nuance.com> PR fabric8io#1210 Remove saveAttach and just use saveClassifier. Signed-off-by: William Rose <william.rose@nuance.com> Issue fabric8io#1207 Specify image name pattern when loading from archives. This PR implements the proposed pattern matching that scans the archive prior to loading and then creates a tag from the image name loaded from the archive to the image name configured in the Maven project. Signed-off-by: William Rose <william.rose@nuance.com>
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.
Thanks ! lgtm
This PR is to add the ability to attach an image archive produced by docker:save to the project as an artifact. Currently this is not possible and archives have to be attached using something like build-helper-maven-plugin.
To avoid conflict with docker:source, the default attach classifier is
archive
(orarchive-<saveAlias>
), instead ofdocker
(ordocker-<alias>
) as used by that mojo.