Dockerfile - #43
Conversation
cache dependencies for travis build Build container from published version. Will use autobuild on Docker Hub Add instructions for manual Docker deployment
|
|
||
| WORKDIR /app | ||
|
|
||
| RUN wget http://repo1.maven.org/maven2/io/magentys/donut/1.0/donut-1.0-one-jar.jar /app/donut.jar |
There was a problem hiding this comment.
Adding docker to the Travis build, caused test failures due to ordering conflict when reading files.
Therefore building and deploying to DockerHub at the moment would be manual and should use released versions.
Alternatively, we could build the one-jar prior to building the container and copy it in (details are in the README for that)
There was a problem hiding this comment.
This line could change to
COPY target/donut*-one-jar.jar /app/donut.jar
|
|
||
| To run using Docker: | ||
| ``` | ||
| docker run -v /path/to/your/cucumber-reports:/source -v /path/to/output-report:/output donutreport/donut-docker -n myProjectName [options] |
There was a problem hiding this comment.
The input and output volumes are required to ensure the folders are available to the container, and aren't lost when the report is generated.
There was a problem hiding this comment.
The name of image is incorrect. It should be donutreport/donut-report .
There was a problem hiding this comment.
This command fails with a donut exception when we pass multiple paths ex: docker run -v /Users/amit/git-repositories/donut/src/test/resources/cuke-and-unit/cuke,/Users/amit/git-repositories/donut/src/test/resources/cuke-and-unit/unit:/source -v /Users/amit/tempd/report:/output donutreport/donut-report -n myProject
0 [main] INFO io.magentys.donut.gherkin.Generator$ - source paths: cucumber:/source
11 [main] INFO io.magentys.donut.gherkin.Generator$ - Cuke path: /source
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: io.magentys.donut.gherkin.DonutException
at io.magentys.donut.gherkin.Generator$.apply(Generator.scala:39)
at io.magentys.donut.Boot$.delayedEndpoint$io$magentys$donut$Boot$1(Boot.scala:85)
There was a problem hiding this comment.
It works for one path(the cucumber path). But it should be able to accept the both cucumber and unit test json paths ex: cucumber:/my/cucumber/path,/my/JUnit/path
There was a problem hiding this comment.
I've updated so you need to specify the -s command yourself.
Updated the README
… and fixed the image name typo
|
|
||
| To run using Docker: | ||
| ``` | ||
| docker run -v /path/to/your/cucumber-reports:/source -v /path/to/output-report:/output donutreport/donut-docker -n myProjectName [options] |
There was a problem hiding this comment.
The name of image is incorrect. It should be donutreport/donut-report .
|
|
||
| To run using Docker: | ||
| ``` | ||
| docker run -v /path/to/your/cucumber-reports:/source -v /path/to/output-report:/output donutreport/donut-docker -n myProjectName [options] |
|
|
||
| To run using Docker: | ||
| ``` | ||
| docker run -v /path/to/your/cucumber-reports:/source -v /path/to/output-report:/output donutreport/donut-docker -n myProjectName [options] |
There was a problem hiding this comment.
This command fails with a donut exception when we pass multiple paths ex: docker run -v /Users/amit/git-repositories/donut/src/test/resources/cuke-and-unit/cuke,/Users/amit/git-repositories/donut/src/test/resources/cuke-and-unit/unit:/source -v /Users/amit/tempd/report:/output donutreport/donut-report -n myProject
0 [main] INFO io.magentys.donut.gherkin.Generator$ - source paths: cucumber:/source
11 [main] INFO io.magentys.donut.gherkin.Generator$ - Cuke path: /source
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.simontuffs.onejar.Boot.run(Boot.java:340)
at com.simontuffs.onejar.Boot.main(Boot.java:166)
Caused by: io.magentys.donut.gherkin.DonutException
at io.magentys.donut.gherkin.Generator$.apply(Generator.scala:39)
at io.magentys.donut.Boot$.delayedEndpoint$io$magentys$donut$Boot$1(Boot.scala:85)
|
|
||
| To run using Docker: | ||
| ``` | ||
| docker run -v /path/to/your/cucumber-reports:/source -v /path/to/output-report:/output donutreport/donut-docker -n myProjectName [options] |
There was a problem hiding this comment.
It works for one path(the cucumber path). But it should be able to accept the both cucumber and unit test json paths ex: cucumber:/my/cucumber/path,/my/JUnit/path
…specify multiple source dirs / specflow
|
|
||
| Donut is packaged as a [Docker container](https://hub.docker.com/r/donutreport/donut-report/) | ||
|
|
||
| To run using Docker: |
There was a problem hiding this comment.
You added a clarifying statement here regarding the version. By default, the current command will choose the LATEST image available.
I've extracted the version into an ENV. This will need to be updated as part of the release, etc.
I've updated the instructions for tagging/deploy to specify the version number.
The version of the container, should match the version of Donut Maven project..
|
|
||
| Set your Docker Hub credentials | ||
| ``` | ||
| export VERSION=version_number |
There was a problem hiding this comment.
These are manual commands at the moment, and need to tally the version.
Next steps will be to automatically build, and will need to get the version from SBT
|
|
||
| ``` | ||
| docker run -v /path/to/your/cucumber-reports:/source -v /path/to/your/unit-test-reports:/source_unit -v /path/to/output-report:/output donutreport/donut-report -n myProjectName -s cucumber:/source,/source_unit [options] | ||
| ``` |
There was a problem hiding this comment.
These commands are not working. I got this:
Error: Unknown option -s Error: Unknown argument 'cucumber:/source'
Container published here:
https://hub.docker.com/u/donutreport/dashboard/