-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recovery-testing module Fix config of docker-compose plugin to support multiple modules.
- Loading branch information
Showing
10 changed files
with
332 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ buildscript { | |
plugins { | ||
id "io.github.gradle-nexus.publish-plugin" version '1.1.0' | ||
} | ||
apply plugin: 'docker-compose' | ||
|
||
nexusPublishing { | ||
repositories { | ||
|
@@ -84,10 +83,13 @@ subprojects { | |
apply plugin: 'java' | ||
apply plugin: 'scala' | ||
apply plugin: 'java-library' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
apply plugin: 'com.github.ben-manes.versions' | ||
|
||
if (!project.hasProperty("notPublished")) { | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
} | ||
|
||
task sourceJar(type: Jar) { | ||
from sourceSets.main.allSource | ||
classifier "sources" | ||
|
@@ -100,45 +102,47 @@ subprojects { | |
withSourcesJar() | ||
} | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from(components.java) | ||
artifactId = archivesBaseName | ||
pom { | ||
name = 'RabbitMQ client for Scala' | ||
description = 'Scala wrapper over standard RabbitMQ Java client library' | ||
url = 'https://github.com/avast/rabbitmq-scala-client' | ||
licenses { | ||
license { | ||
name = 'The MIT License' | ||
url = 'http://www.opensource.org/licenses/mit-license.php' | ||
if (!project.hasProperty("notPublished")) { | ||
afterEvaluate { | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from(components.java) | ||
artifactId = archivesBaseName | ||
pom { | ||
name = 'RabbitMQ client for Scala' | ||
description = 'Scala wrapper over standard RabbitMQ Java client library' | ||
url = 'https://github.com/avast/rabbitmq-scala-client' | ||
licenses { | ||
license { | ||
name = 'The MIT License' | ||
url = 'http://www.opensource.org/licenses/mit-license.php' | ||
} | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'jendakol' | ||
name = 'Jenda Kolena' | ||
email = '[email protected]' | ||
developers { | ||
developer { | ||
id = 'jendakol' | ||
name = 'Jenda Kolena' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git://github.com/avast/rabbitmq-scala-client.git' | ||
developerConnection = 'scm:git:ssh://github.com/avast/rabbitmq-scala-client.git' | ||
url = 'https://github.com/avast/rabbitmq-scala-client' | ||
} | ||
} | ||
scm { | ||
connection = 'scm:git:git://github.com/avast/rabbitmq-scala-client.git' | ||
developerConnection = 'scm:git:ssh://github.com/avast/rabbitmq-scala-client.git' | ||
url = 'https://github.com/avast/rabbitmq-scala-client' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
String base64Key = System.getenv('SIGNING_KEY') | ||
if (base64Key) { | ||
useInMemoryPgpKeys(new String(Base64.decoder.decode(base64Key)), System.getenv('SIGNING_PASSWORD')) | ||
sign publishing.publications | ||
signing { | ||
String base64Key = System.getenv('SIGNING_KEY') | ||
if (base64Key) { | ||
useInMemoryPgpKeys(new String(Base64.decoder.decode(base64Key)), System.getenv('SIGNING_PASSWORD')) | ||
sign publishing.publications | ||
} | ||
} | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
apply plugin: 'docker-compose' | ||
|
||
archivesBaseName = "rabbitmq-client-core_$scalaVersion" | ||
|
||
dockerCompose.isRequiredBy(test) | ||
|
||
test.doFirst { | ||
dockerCompose.exposeAsSystemProperties(test) | ||
} | ||
|
||
dependencies { | ||
api project(":pureconfig") | ||
|
||
api "com.spotify:docker-client:8.14.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: "3" | ||
services: | ||
cluster_rabbit1: | ||
image: lucifer8591/rabbitmq-server:3.7.17 | ||
hostname: cluster_rabbit1 | ||
ports: | ||
- "20001:5672" | ||
- "15672:15672" | ||
environment: | ||
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER:-admin} | ||
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS:-admin} | ||
cluster_rabbit2: | ||
image: lucifer8591/rabbitmq-server:3.7.17 | ||
hostname: cluster_rabbit2 | ||
links: | ||
- cluster_rabbit1 | ||
environment: | ||
- CLUSTERED=true | ||
- CLUSTER_WITH=cluster_rabbit1 | ||
- RAM_NODE=true | ||
ports: | ||
- "20002:5672" | ||
- "15673:15672" | ||
cluster_rabbit3: | ||
image: lucifer8591/rabbitmq-server:3.7.17 | ||
hostname: cluster_rabbit3 | ||
links: | ||
- cluster_rabbit1 | ||
- cluster_rabbit2 | ||
environment: | ||
- CLUSTERED=true | ||
- CLUSTER_WITH=cluster_rabbit1 | ||
ports: | ||
- "20003:5672" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
notPublished=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
recoveryTesting { | ||
hosts = ["127.0.0.1:20001", "127.0.0.1:20002", "127.0.0.1:20003"] // the order is irrelevant | ||
virtualHost = "/" | ||
|
||
name = "TestingConnection" | ||
|
||
credentials { | ||
enabled = true | ||
|
||
username = "admin" | ||
password = "admin" | ||
} | ||
|
||
connectionTimeout = 1s | ||
|
||
networkRecovery { | ||
enabled = true // enabled by default | ||
|
||
handler { | ||
type = "exponential" // exponential, linear | ||
|
||
initialDelay = 10s | ||
period = 2s | ||
maxLength = 32s | ||
} | ||
} | ||
|
||
|
||
consumers { | ||
consumer { | ||
name = "TestingConsumer" | ||
|
||
queueName = "RecoveryTesting" | ||
|
||
prefetchCount = 5 | ||
processTimeout = 0 | ||
|
||
declare { | ||
enabled = true | ||
|
||
durable = true | ||
autoDelete = false | ||
exclusive = false | ||
} | ||
|
||
bindings = [] | ||
} | ||
} | ||
|
||
producers { | ||
producer { | ||
name = "TestingProducer" | ||
exchange = "" | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.