Skip to content

Commit

Permalink
added docs about pactPublish task #120
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Holshausen committed Jul 6, 2015
1 parent 5fe1698 commit 9eda214
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
7 changes: 5 additions & 2 deletions pact-jvm-consumer-groovy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The library is available on maven central using:

* group-id = `au.com.dius`
* artifact-id = `pact-jvm-consumer-groovy_2.11`
* version-id = `2.1.x`
* version-id = `2.2.x`

##Usage

Expand All @@ -19,7 +19,7 @@ to define your pacts. For a full example, have a look at the example JUnit `Exam
If you are using gradle for your build, add it to your `build.gradle`:

dependencies {
testCompile 'au.com.dius:pact-jvm-consumer-groovy_2.11:2.1.5'
testCompile 'au.com.dius:pact-jvm-consumer-groovy_2.11:2.2.6'
}

Then create an instance of the `PactBuilder` in your test.
Expand Down Expand Up @@ -304,3 +304,6 @@ test {
}
```

# Publishing your pact files to a pact broker

If you use Gradle, you can use the [pact Gradle plugin](https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-provider-gradle#publishing-pact-files-to-a-pact-broker) to publish your pact files.
6 changes: 5 additions & 1 deletion pact-jvm-consumer-junit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The library is available on maven central using:

* group-id = `au.com.dius`
* artifact-id = `pact-jvm-consumer-junit_2.11`
* version-id = `2.1.x`
* version-id = `2.2.x`

##Usage

Expand Down Expand Up @@ -346,3 +346,7 @@ For SBT:
fork in Test := true,
javaOptions in Test := Seq("-Dpact.rootDir=some/other/directory")
```

# Publishing your pact files to a pact broker

If you use Gradle, you can use the [pact Gradle plugin](https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-provider-gradle#publishing-pact-files-to-a-pact-broker) to publish your pact files.
20 changes: 20 additions & 0 deletions pact-jvm-provider-gradle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,3 +308,23 @@ To publish the plugin to the community portal:

$ ./gradlew :pact-jvm-provider-gradle_2.11:publishPlugins

# Publishing pact files to a pact broker

*[version 2.2.7+]*

The pact gradle plugin provides a `pactPublish` task that can publish all pact files in a directory
to a pact broker. To use it, you need to add a publish configuration to the pact configuration that defines the
directory where the pact files are and the URL to the pact broker.

For example:

```groovy
pact {
publish {
pactDirectory = '/pact/dir' // defaults to $buildDir/pacts
pactBrokerUrl = 'http://pactbroker:1234'
}
}
```

0 comments on commit 9eda214

Please sign in to comment.