Commit Graph

23 Commits

Author SHA1 Message Date
Marcin Grzejszczak
d00880cd22 Fixed contractTest section; fixes gh-1608 2021-02-05 14:15:24 +01:00
Marcin Grzejszczak
a915cf102b Messaging polyglot support (#1472)
added support for AMQP, KAFKA and standalone options
2020-08-21 18:05:32 +02:00
Marcin Grzejszczak
2c2f49e98d Fixing RestAssured setup by excluding spring import 2020-07-23 15:19:41 +02:00
Marcin Grzejszczak
bd5b6e8800 Turns on JUnitPlatform for Gradle 2020-07-23 14:41:33 +02:00
Olga Maciaszek-Sharma
9fcf5a3612 2.2.x gradle 6.4 (#1405)
* Upgrade gradle wrapper to 6.4. Fixes gh-1387.

* Document PublishStubsToScmTask API changes.

* Upgrade groovy to 2.5.10.
2020-05-13 14:47:33 +02:00
Dominik Labuda
454e5b45a8 Local stub publishing reimplemented (#1291)
While the previous approach did publish the contracts to local .m2 repository, it did not create the maven-metadata-local.xml file indicating a local release. It instead created maven-metadata.xml, which indicates a remote release. This wasn't issue when the stubs were retrieved by Gradle directly (in our flow we pre-check availability of these stubs by Gradle), it did however cause problems when they were being resolved by AetherStubDownloader used in SCC Stub Runner.

In addition, this newer implementation allows to enable any publish (remote or local) independently of each other, which wasn't the case previously.

Fixes #1283 - again
2019-12-19 01:56:52 +01:00
Dominik Labuda
1ec86207c5 Verifier Docker image PUBLISH_ARTIFACTS_OFFLINE option (#1284)
New option for publishing stubs just into local .m2 added.
2019-12-10 14:15:47 +01:00
Dominik Labuda
f436d7fca9 SCC Verifier Docker now publishes stubs just once (#1223)
Originally, SCC Verifier Docker published artifacts twice.
Once defined in build.gradle - which also uploaded the original contracts and second time in a publish stubs task defined in gradle plugin. This PR removes the definition from build.gradle and now only the stubs are published and just once.
2019-09-25 12:56:26 +02:00
Marcin Grzejszczak
3cc125209e Bumped dependency-management-plugin to 1.0.8
fixes gh-1146
2019-08-01 09:04:40 +02:00
Marcin Grzejszczak
6b9e377487 Rewriting to java (#1131)
* Rewritting to java

- rewritten a lot of Spring Cloud Contract Spec module to Java
- extracted all Groovy stuff to a separate package
- will now continue writing extension modules
- spring-cloud-contract-spec will be written purely in java
- spring-cloud-contract-spec-groovy will have Groovy extensions

fixes gh-1130
2019-07-08 14:15:21 +02:00
Marcin Grzejszczak
8f0db8ffe2 Merge branch 'custom_stubs_classifier' of https://github.com/Dominick1993/spring-cloud-contract into Dominick1993-custom_stubs_classifier 2019-07-01 13:58:22 +02:00
Marcin Grzejszczak
783a7a67bf Upgraded Gradle to 5.5; fixes gh-1124 2019-07-01 13:56:25 +02:00
Dominik Labuda
d3ff357a54 Verifier docker image support for custom stubs classifier
Adds the possibility to provide custom stubs classifier. Might be useful to serve as some kind of tag for the stubs published.
2019-05-06 00:02:10 +02:00
Dominik Labuda
199afbd042 Docker image support for authenticated contracts download (#912)
Since there was no way to download contracts from external binary repository as authenticated user while using Docker Verifier image, it was added.
2019-03-29 11:28:40 +01:00
Marcin Grzejszczak
4da781b214 HTTP to HTTPS 2019-03-07 13:50:15 +01:00
Marcin Grzejszczak
8ce80e6e7f Applied checkstyle rules 2019-02-08 18:20:59 +01:00
Marcin Grzejszczak
e0e72c9c7f Fixed missing deprecation refactoring 2018-11-13 12:13:46 +01:00
Marcin Grzejszczak
3d42ab9d35 Bumped dependency management plugin 2018-08-21 11:58:18 +02:00
Marcin Grzejszczak
f9ff03f24d Updated Gradle to 4.9 2018-08-21 11:56:59 +02:00
Marcin Grzejszczak
0fe31ce3a5 Git Stub Downloader (#596)
when stubsMode is set to LOCAL or REMOTE, and repositoryRoot starts with git:// we can clone the provided git repository, and search for the folder with stubs for the given artifact. So if the git repo has a folder structure of groupid/artifactid/version (where group id is either dot or slash separated), then we will provide a path to that repository for the stub runner to harvest the stubs

- externalized versions
- added more debugging messages
- added ContractProjectUpdater that updates the project containing contracts from SCM. ATM supports only git
- added ResourceResolver that retrieves the ProtocolResolvers. It does it via spring.factories entries containing StubDownloaderBuilder. SDP extends ProtocolResovler.
added StubRunner.properties map, that will contain any properties that will be later used by any StubDownloader implementations
- added PUBLISH_STUBS_TO_SCM env var for Docker, so that publishStubsToScm task gets called
- updated docs

Breaking:

- StubDownloaderBuilder extends ProtocolResovler. By default the ProtocolResolver methods return null.
- stubRunnerOptions.stubRepositoryRoot is a Resource not a String
- generateWireMockClientStubs Gradle task got removed
- if folder with contracts has a subfolder called contracts, we will pick contracts from the subfolder

fixes #580
2018-03-31 09:35:00 +02:00
Marcin Grzejszczak
c33ad02550 Added support for Docker and external contracts repo
These environment variables are used when contracts lay in an external repository. To enable
this feature you must set the `EXTERNAL_CONTRACTS_ARTIFACT_ID` environment variable.

- `EXTERNAL_CONTRACTS_GROUP_ID` - group id of the project with contracts. Defaults to `com.example`
- `EXTERNAL_CONTRACTS_ARTIFACT_ID`- artifact id of the project with contracts.
- `EXTERNAL_CONTRACTS_CLASSIFIER`- classifier of the project with contracts. Empty by default
- `EXTERNAL_CONTRACTS_VERSION` - version of the project with contracts. Defaults to `+`, equivalent to picking the latest
- `EXTERNAL_CONTRACTS_REPO_WITH_BINARIES_URL` - URL of your Artifact Manager. Defaults to value of `REPO_WITH_BINARIES_URL` env var.
If that's not set, defaults to `http://localhost:8081/artifactory/libs-release-local`
which is the default URL of https://jfrog.com/artifactory/[Artifactory] running locally
- `EXTERNAL_CONTRACTS_PATH` - path to contracts for the given project, inside the project with contracts.
Defaults to slash separated `EXTERNAL_CONTRACTS_GROUP_ID` concatenated with `/` and `EXTERNAL_CONTRACTS_ARTIFACT_ID`. E.g.
for group id `foo.bar` and artifact id `baz`, would result in `foo/bar/baz` contracts path.
- `EXTERNAL_CONTRACTS_WORK_OFFLINE` - if set to `true` then will retrieve artifact with contracts
from the container's `.m2`. Mount your local `.m2` as a volume available at the container's `/root/.m2` path.
You must not set both `EXTERNAL_CONTRACTS_WORK_OFFLINE` and `EXTERNAL_CONTRACTS_REPO_WITH_BINARIES_URL`.

fixes gh-576
2018-03-15 14:48:28 +01:00
Alexey Nesterov
e89062f58d Fix disabling of publish task when env property is set (#574)
Because of Gradle's project lifecycle, disabling tasks in the script doesn't
work as expected, ./gradlew publish will still try to execute
:publishMavenJavaPublicationToMavenRepository and fail even if PUBLISH_ARTIFACTS
is set to false. To avoid that and make sure all publish tasks are disabled
script need to listen for tasks graph event to be ready and then disable the tasks.
2018-03-13 10:34:48 +01:00
Marcin Grzejszczak
37d7e8cfd3 Docker images (#527)
with this change we're adding generation of 2 docker images - verifier and stub runner
we also added a project `spring-cloud-contract-stub-runner-boot` which contains a far jar with stub runner boot

fixes gh-526, gh-516
2018-01-24 17:07:22 +01:00