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

Adding build options for the BuildImageConfiguration #666

Merged
merged 45 commits into from
Jan 3, 2017

Conversation

weiserr
Copy link

@weiserr weiserr commented Dec 20, 2016

The changes within this PullRequest allow adding arbitrary "simple" queryArguments to the Docker daemon build REST interface (https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/build-image-from-a-dockerfile).

For the full conversation please see #623.

Katsuya-Tomioka and others added 5 commits December 13, 2016 14:54
Signed-off-by: Katsuya Tomioka <katsuya@basistech.com>
This avoids corrupted log files.

Fixes fabric8io#652.
AWS ECR key exchange
closes fabric8io#637

Signed-off-by: Chas Honton <chas@apache.org>
Signed-off-by: Chas Honton <chas@apache.org>
The build options are propagated as query arguments to the REST request
(https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/build-image-from-a-dockerfile).

Signed-off-by: Robert Weiser <robert.weiser@elca.ch>
@codecov-io
Copy link

codecov-io commented Dec 20, 2016

Current coverage is 47.39% (diff: 58.33%)

Merging #666 into master will increase coverage by 0.02%

@@             master       #666   diff @@
==========================================
  Files           113        113          
  Lines          5881       5891    +10   
  Methods           0          0          
  Messages          0          0          
  Branches       1020       1022     +2   
==========================================
+ Hits           2786       2792     +6   
- Misses         2850       2854     +4   
  Partials        245        245          
Diff Coverage File Path
0% .../java/io/fabric8/maven/docker/access/UrlBuilder.java
0% ...maven/docker/access/hc/DockerAccessWithHcClient.java
•••••••••• 100% ...ic8/maven/docker/config/BuildImageConfiguration.java
•••••••••• 100% .../maven/docker/config/handler/property/ConfigKey.java
•••••••••• 100% ...va/io/fabric8/maven/docker/service/BuildService.java
•••••••••• 100% ...r/config/handler/property/PropertyConfigHandler.java

Sunburst

Powered by Codecov. Last update 67fa15b...8dfe0c0

hwellmann and others added 23 commits December 21, 2016 16:20
Signed-off-by: Chas Honton <chas@apache.org>
Signed-off-by: Chas Honton <chas@apache.org>
    Signed-off-by: Katsuya Tomioka <katsuya@basistech.com>
added ability to explicitly via configuration to create named volumes
via <volumes><volume> configuration.
Example config
```xml
<volumes>
  <volume>
    <name>Volume Name</name>
    <driver>local</driver>
    <driverOpts>
      <driverOpt-key-name>driverOpt-value</driverOpt-key-name>
    </driverOpts>
    <labels>
    	<label-key>someValue</label-key>
      <com-github-fabric8-dmp-sample-volume>
        voluminous
      </com-github-fabric8-dmp-sample-volume>
    </labels>
  </volume>
</volumes>
```
Added a new volume sample
Added a new goal volume-create
minor formatting / spelling correction for intro.md

Signed-off-by: Tom Burton <Tom.Burton@Outlook.com>
Signed-off-by: Tom Burton <Tom.Burton@Outlook.com>
fabric8io#664 (review)
corrected spelling
corrected ascii-doc + formatting
code formatting

Signed-off-by: Tom Burton <Tom.Burton@Outlook.com>
fabric8io#664 (review)
corrected spelling
corrected ascii-doc + formatting
code formatting

Signed-off-by: Tom Burton <Tom.Burton@Outlook.com>
This is a cleanup of PR fabric8io#664 with the following major points tackled:

* Cleaned formatting
* Removed unneeded classes and service method for listing and getting volumes. This is not needed now and probablu not in the future.
* Fixed some Copy&Pase errors (like the default phase for 'volume-remove' which was the same as for 'volume-create'
* Fixed tests. Please note, that *no service method* should be adapted to be "testable". Especially do not introduce a non-private method only for this purpose and test this method instead of the offiical API. Modern Mock frameworks can deal with the the problems which are tried to be solved with this. Otherwise the API gets dilulted, more complicated, more maintenance, more coupled.
* Removed assert that do nothing.

Tests can be still improved for the service but its fine for now,

Next step is to add support for the PropertyHandler to allow configuration of the volumes also via properties.
Signed-off-by: Katsuya Tomioka <katsuya@basistech.com>
        Signed-off-by: Katsuya Tomioka <katsuya@basistech.com>
Signed-off-by: Katsuya Tomioka <katsuya@basistech.com>
rhuss and others added 17 commits January 2, 2017 17:04
This change is related to fabric8io#661 to make start / stop more symmetric

- removing Java 8 methods
- minor cosmetics
- docs for docker.dockerArchive external property
- removed unneed boolean tag
- removed unused method
…kerFileDir also set

Signed-off-by: Laszlo Meszaros <lacienator@gmail.com>
Also streamlined the load image functionality. This includes
the code from fabric8io#624 and fixes fabric8io#624
This is required to make unit tests predictable.
- Updated changelog
- Refactored to use BuildOptions instead of overly lengthy argument lists
- Tuned documentation a bit
@@ -66,7 +66,7 @@ public void buildImage(ImageConfiguration imageConfig, MojoParameters params, bo
dockerArchive,
getDockerfileName(buildConfig),
cleanupMode.isRemove(),
noCache, mergedBuildMap);
noCache, mergedBuildMap, buildConfig.getBuildOptions());
Copy link
Collaborator

Choose a reason for hiding this comment

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

The argument lists becomes quite lengthy now, so that I have refactored it to use a BuildOptions argument object. Makes it much nicer, too to merge the various options into a single place.

@rhuss
Copy link
Collaborator

rhuss commented Jan 3, 2017

Thanks a lot ! Looks good to me, I made some minor changes (see next commit) and will merge it for the next release.

@rhuss
Copy link
Collaborator

rhuss commented Jan 3, 2017

[merge]

@fusesource-ci fusesource-ci merged commit d05a221 into fabric8io:master Jan 3, 2017
@weiserr
Copy link
Author

weiserr commented Jan 3, 2017

Cheers!

rgbj pushed a commit to rgbj/docker-maven-plugin that referenced this pull request Jun 21, 2017
- Updated changelog
- Refactored to use BuildOptions instead of overly lengthy argument lists
- Tuned documentation a bit
rgbj pushed a commit to rgbj/docker-maven-plugin that referenced this pull request Jun 21, 2017
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.

9 participants