Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ scala:
- 2.11.7

after_success:
- bash deploy-baked-donut.sh
- if [ "$TRAVIS_BRANCH" == "master" ]; then
bash deploy-baked-donut.sh

cache:
directories:
- /root/.ivy2/cache/
env:
global:
- ENCRYPTION_LABEL: "e95fb731c984"
- COMMIT_AUTHOR_EMAIL: "chdask@gmail.com"

notifications:
slack: magentys:hTBVaA9gGjBPhW5OAqnMwePI
slack: magentys:hTBVaA9gGjBPhW5OAqnMwePI
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM openjdk:9
LABEL maintainer="tim.myerscough@mechanicalrock.io"

ENV DONUT_VERSION 1.0

WORKDIR /app

RUN wget http://repo1.maven.org/maven2/io/magentys/donut/${DONUT_VERSION}/donut-${DONUT_VERSION}-one-jar.jar /app/donut.jar

ENTRYPOINT ["java", "-jar", "donut.jar", "-o", "/output"]
55 changes: 43 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![](http://magentys.github.io/donut/img/Donut-05.png)
![](http://magentys.github.io/donut/img/Donut-05.png)

[![Build Status](https://travis-ci.org/MagenTys/donut.svg?branch=master)](https://travis-ci.org/MagenTys/donut)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.magentys/donut/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.magentys/donut)
Expand All @@ -10,7 +10,7 @@ Donut currently supports any tool that produces gherkin json (ie. cucumber-jvm e
Live Demos => [Only Scenarios](http://magentys.github.io/donut/demo.html)   [Scenarios and Unit Tests](http://magentys.github.io/donut/demo-scenarios-and-unitTests.html)   [Scenarios and Orphaned Unit Tests](http://magentys.github.io/donut/demo-scenarios-and-orphanedUnitTests.html)

## Quickstart
You can either use Donut directly or check out the available plugins:
You can either use Donut directly or check out the available plugins:
* [Maven plugin](https://github.com/MagenTys/donut-maven-plugin)
* [Specflow adaptor](https://github.com/MagenTys/SpecNuts)
* [Jenkins plugin](https://github.com/MagenTys/donut-jenkins-plugin)
Expand All @@ -19,22 +19,41 @@ You can either use Donut directly or check out the available plugins:
## Release Notes
See what's new [here](release-notes.md)

### download
### Download
```
wget http://repo1.maven.org/maven2/io/magentys/donut/1.0/donut-1.0-one-jar.jar
```
or download the latest release from: [here](http://repo1.maven.org/maven2/io/magentys/donut/1.0/donut-1.0-one-jar.jar)

### run from command line
### Run from command line

```
java -jar donut-<Version>.jar -s cucumber:/my/path/cucumber-reports -n myProjectName
```

### options
### Run using Docker

Donut is packaged as a [Docker container](https://hub.docker.com/r/donutreport/donut-report/)

To run using Docker:

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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..

```
docker run -v /path/to/your/cucumber-reports:/source -v /path/to/output-report:/output donutreport/donut-report -n myProjectName -s cucumber:/source [options]
```

In the above command, using the docker `-v` parameter `/source` and `/output` volumes are mounted in the container, to pass data in, and out.
Use `-s cucumber:/source` Donut option to retrieve the reports

*Passing multiple source directories*:
If you need to pass multiple source directories, e.g. for Cucumber reports and unit tests, and the directories are in different paths, you can use the following variant:

```
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]
```

@amitsha256 amitsha256 Oct 6, 2017

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These commands are not working. I got this:
Error: Unknown option -s Error: Unknown argument 'cucumber:/source'


### Options

`-n` or `--projectName` is a mandatory parameter, and it should be the name of the project.
`-s` or `--sourcedirs` is a mandatory parameter, and it should be a comma separated list of the paths to the directories that hold the generated result files.
`-s` or `--sourcedirs` is a mandatory parameter, and it should be a comma separated list of the paths to the directories that hold the generated result files.

Other parameters can also be specified as below:

Expand Down Expand Up @@ -85,7 +104,7 @@ default values:
</dependency>
```

* SBT
* SBT
```
libraryDependencies += "io.magentys" % "donut" % "1.0"
```
Expand All @@ -98,12 +117,12 @@ compile 'io.magentys:donut:1.0'
Example usage of the `Generator`

```
ReportConsole report =
ReportConsole report =
Generator.apply(sourceDirectory, outputDirectory, filePrefix, timestamp, template, countSkippedAsFailure,
countPendingAsFailure, countUndefinedAsFailure, countMissingAsFailure, projectName, projectVersion, customAttributes);
```

This will create an `html` report at the outputDirectory and will return a `ReportConsole` output object:
This will create an `html` report at the outputDirectory and will return a `ReportConsole` output object:

```
allFeatures: List[Feature]
Expand All @@ -126,17 +145,29 @@ buildFailed: Boolean

## Build from source

### prerequisites
### Prerequisites

* install java 8+
* install scala 2.11+
* install SBT ([www.scala-sbt.org](http://www.scala-sbt.org))

### run from sbt
### Run from sbt

`sbt "run-main io.magentys.donut.Boot -s cucumber:/my/path/cucumber-reports -n myProjectName" `

### credits
### Build Docker Container

Set your Docker Hub credentials
```
export VERSION=version_number

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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-compose run sbt
docker login
docker build . -t donutreport/donut-report
docker tag donutreport/donut-report donutreport/donut-report:$VERSION
docker push donutreport/donut-report:$VERSION
```

### Credits

* JQuery
* Bootstrap
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '2'
services:
sbt:
image: hseeberger/scala-sbt
entrypoint:
- sbt
- clean
- one-jar
working_dir: /work
volumes:
- .:/work
# Enable the use of Docker from within the container
- /var/run/docker.sock:/var/run/docker.sock
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 0.13.9
sbt.version = 0.13.15