-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Source connector productization (#17)
* Updated build scripts * Code refactoring and stability fixes * Added automated integration testing * Updated documentation * Packages available from download pages
- Loading branch information
Showing
71 changed files
with
2,491 additions
and
1,304 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,30 @@ | ||
language: java | ||
install: true | ||
|
||
sudo: required | ||
services: | ||
- docker | ||
jdk: | ||
- openjdk8 | ||
- openjdk8 | ||
|
||
script: | ||
- ./gradlew clean check jar | ||
- ./gradlew clean integrationTest --tests com.solace.connector.kafka.connect.source.it.SourceConnectorIT | ||
|
||
after_success: | ||
- > | ||
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then | ||
git config --global user.email "[email protected]"; | ||
git config --global user.name "travis-ci"; | ||
mkdir gh-pages; # Now update gh-pages | ||
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/SolaceProducts/pubsubplus-connector-kafka-source gh-pages > /dev/null 2>&1; | ||
rm gh-pages/downloads/pubsubplus-connector-kafka-source* | ||
mv build/distributions/pubsubplus-connector-kafka-source* gh-pages/downloads | ||
cd gh-pages; | ||
pushd downloads | ||
cp index.template index.html; FILENAME=`find . | grep *.zip | cut -d'/' -f2 | sed 's/.\{4\}$//'`; sed -i "s/CONNECTOR_NAME/$FILENAME/g" index.html; | ||
popd; | ||
git add -f .; | ||
git commit -m "Latest connector distribution on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"; | ||
git remote add origin-pages https://${GH_TOKEN}@github.com/SolaceProducts/pubsubplus-connector-kafka-source.git > /dev/null 2>&1; | ||
git push --quiet --set-upstream origin-pages gh-pages; | ||
echo "Updated and pushed GH pages!"; | ||
fi |
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,3 @@ | ||
- Simple process JMS message types support | ||
TextMessage | ||
BytesMessage |
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 |
---|---|---|
@@ -1,110 +1,87 @@ | ||
/* | ||
* This build file was generated by the Gradle 'init' task. | ||
* | ||
* This generated file contains a sample Java Library project to get you started. | ||
* For more details take a look at the Java Libraries chapter in the Gradle | ||
* user guapply plugin: e available at https://docs.gradle.org/3.5/userguapply plugin: e/java_library_plugin.html | ||
*/ | ||
|
||
// Apply the java-library plugin to add support for Java Library | ||
apply plugin: 'java-library' | ||
apply plugin: 'java' | ||
apply plugin: 'checkstyle' | ||
apply plugin: 'findbugs' | ||
apply plugin: 'pmd' | ||
apply plugin: 'jacoco' | ||
//apply plugin: 'net.researchgate.release' version '2.4.0' | ||
//apply plugin: "com.jfrog.bintray" version '1.7' | ||
apply plugin: 'maven' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'distribution' | ||
apply plugin: 'org.unbroken-dome.test-sets' | ||
|
||
ext { | ||
//kafkaVersion = '0.10.0.0' | ||
//kafkaVersion = '0.11.0.0' | ||
//kafkaVersion = '1.1.0' | ||
kafkaVersion = '2.0.0' | ||
kafkaVersion = '2.4.1' | ||
solaceJavaAPIVersion = '10.6.0' | ||
} | ||
|
||
// In this section you declare where to find the dependencies of your project | ||
repositories { | ||
// Use jcenter for resolving your dependencies. | ||
// You can declare any Maven/Ivy/file repository here. | ||
jcenter() | ||
mavenLocal() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// This dependency is exported to consumers, that is to say found on their compile classpath. | ||
api 'org.apache.commons:commons-math3:3.6.1' | ||
|
||
// This dependency is used internally, and not exposed to consumers on their own compile classpath. | ||
implementation 'com.google.guava:guava:21.0' | ||
|
||
// Use JUnit test framework | ||
testImplementation 'junit:junit:4.12' | ||
buildscript { | ||
repositories { | ||
maven { | ||
url "https://plugins.gradle.org/m2/" | ||
} | ||
} | ||
dependencies { | ||
classpath "com.github.spotbugs:spotbugs-gradle-plugin:3.0.0" | ||
classpath "org.unbroken-dome.test-sets:org.unbroken-dome.test-sets.gradle.plugin:2.2.1" | ||
} | ||
} | ||
|
||
// In this section you declare where to find the dependencies of your project | ||
repositories { | ||
// Use jcenter for resolving your dependencies. | ||
// You can declare any Maven/Ivy/file repository here. | ||
jcenter() | ||
mavenCentral() | ||
|
||
maven { url "https://mvnrepository.com/artifact/com.solacesystems/sol-jcsmp" } | ||
// https://mvnrepository.com/artifact/com.solacesystems/sol-jcsmp | ||
|
||
|
||
testSets { | ||
integrationTest | ||
} | ||
|
||
dependencies { | ||
// This dependency is exported to consumers, that is to say found on their compile classpath. | ||
//api 'org.apache.commons:commons-math3:3.6.1' | ||
|
||
// This dependency is used internally, and not exposed to consumers on their own compile classpath. | ||
implementation 'com.google.guava:guava:21.0' | ||
|
||
// Use JUnit test framework | ||
testImplementation 'junit:junit:4.12' | ||
|
||
testCompile group: 'junit', name: 'junit', version: '4.12' | ||
integrationTestImplementation 'junit:junit:4.12' | ||
integrationTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.2' | ||
integrationTestImplementation 'org.junit.jupiter:junit-jupiter-engine:5.5.2' | ||
integrationTestImplementation 'org.junit.jupiter:junit-jupiter-params:5.5.2' | ||
integrationTestImplementation 'org.junit.platform:junit-platform-engine:1.5.2' | ||
integrationTestImplementation 'org.mockito:mockito-core:3.2.4' | ||
integrationTestImplementation 'org.mockito:mockito-junit-jupiter:3.2.4' | ||
integrationTestImplementation 'org.testcontainers:testcontainers:1.12.4' | ||
integrationTestImplementation 'org.testcontainers:junit-jupiter:1.12.4' | ||
integrationTestImplementation 'org.slf4j:slf4j-api:1.7.28' | ||
integrationTestImplementation 'org.slf4j:slf4j-simple:1.7.28' | ||
integrationTestImplementation 'org.apache.commons:commons-configuration2:2.6' | ||
integrationTestImplementation 'commons-beanutils:commons-beanutils:1.9.4' | ||
integrationTestImplementation 'com.google.code.gson:gson:2.3.1' | ||
integrationTestImplementation 'commons-io:commons-io:2.4' | ||
integrationTestImplementation 'com.squareup.okhttp3:okhttp:4.4.0' | ||
integrationTestImplementation 'org.apache.kafka:kafka-clients:$kafkaVersion' | ||
compile "org.apache.kafka:connect-api:$kafkaVersion" | ||
compile 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2' | ||
compile 'org.bouncycastle:bcprov-jdk15on:1.54' | ||
compile 'org.bouncycastle:bcpkix-jdk15on:1.54' | ||
compile 'org.bouncycastle:bcpg-jdk15on:1.54' | ||
compile 'commons-io:commons-io:2.4' | ||
compile 'org.slf4j:slf4j-api:1.7.14' | ||
testCompile 'org.slf4j:slf4j-simple:1.7.14' | ||
compile group: 'com.solacesystems', name: 'sol-jcsmp', version: '10.4.0' | ||
//compile 'com.puppycrawl.tools:checkstyle:8.12' | ||
compile "com.solacesystems:sol-jcsmp:$solaceJavaAPIVersion" | ||
} | ||
|
||
tasks.withType(FindBugs) { | ||
reports { | ||
xml.enabled = true | ||
html.enabled = false | ||
task('prepDistForIntegrationTesting') { | ||
dependsOn assembleDist | ||
doLast { | ||
copy { | ||
from zipTree(file('build/distributions').listFiles().findAll {it.name.endsWith('.zip')}[0]) | ||
into (file('src/integrationTest/resources')) | ||
} | ||
copy { | ||
from zipTree(file('build/distributions').listFiles().findAll {it.name.endsWith('.zip')}[0]) | ||
into (file('build/resources/integrationTest')) | ||
} | ||
} | ||
} | ||
|
||
task copyRuntimeLibs(type: Copy) { | ||
into "$buildDir/output/lib" | ||
from configurations.runtime | ||
project.integrationTest { | ||
useJUnitPlatform() | ||
outputs.upToDateWhen { false } | ||
dependsOn prepDistForIntegrationTesting | ||
} | ||
|
||
checkstyle { | ||
repositories { | ||
mavenCentral() | ||
} | ||
configurations { | ||
checkstyle | ||
distributions { | ||
main { | ||
contents { | ||
from('etc/solace_source.properties') { into 'etc' } | ||
from('etc/solace_source_properties.json') { into 'etc' } | ||
from('doc/distribution-readme.md') { into 'doc' } | ||
from('LICENSE') { into 'doc' } | ||
into('lib') { | ||
from jar | ||
from(project.configurations.runtime) | ||
} | ||
// from jar | ||
} | ||
} | ||
dependencies { | ||
//checkstyle 'com.puppycrawl.tools:checkstyle:6.12.1' | ||
checkstyle 'com.puppycrawl.tools:checkstyle:8.12' | ||
|
||
} | ||
} | ||
|
||
processResources { | ||
expand project.properties | ||
} |
Oops, something went wrong.