forked from treasure-data/embulk-input-marketo
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from trocco-io/marge-treasure-data-109
Marge treasure data 109
- Loading branch information
Showing
48 changed files
with
1,750 additions
and
982 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
* @treasure-data/integrations |
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,38 @@ | ||
name: Build and test | ||
|
||
on: push | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 1.8 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
|
||
- name: Build with testing | ||
run: ./gradlew check --console rich --info | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: always() | ||
with: | ||
name: tests | ||
path: ./build/reports/tests/test | ||
|
||
- name: JaCoCo test report | ||
if: success() | ||
run: ./gradlew jacocoTestReport | ||
|
||
- uses: actions/upload-artifact@v2 | ||
if: success() | ||
with: | ||
name: jacoco | ||
path: ./build/reports/jacoco/test |
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
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 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,117 +1,186 @@ | ||
plugins { | ||
id "com.jfrog.bintray" version "1.1" | ||
id "com.github.jruby-gradle.base" version "0.1.5" | ||
id "java" | ||
id "maven-publish" | ||
id "checkstyle" | ||
id "jacoco" | ||
id "signing" | ||
id "org.embulk.embulk-plugins" version "0.4.2" | ||
id "com.palantir.git-version" version "0.12.3" | ||
} | ||
import com.github.jrubygradle.JRubyExec | ||
|
||
repositories { | ||
mavenCentral() | ||
jcenter() | ||
maven { | ||
url "https://dl.bintray.com/embulk-base-restclient/maven" | ||
} | ||
} | ||
configurations { | ||
provided | ||
} | ||
|
||
group = "com.treasuredata.embulk.plugins" | ||
description = "Loads records from Marketo." | ||
version = { | ||
def baseVersion = "0.6.32" | ||
def baseVersion = "0.6.23" | ||
def patchVersion = "1" | ||
def vd = versionDetails() | ||
if (vd.lastTag != "${baseVersion}.${patchVersion}") { | ||
logger.warn "lastTag '${vd.lastTag}' is not '${baseVersion}.${patchVersion}'" | ||
} | ||
if (vd.commitDistance == 0 && vd.lastTag ==~ /^[0-9]+\.[0-9]+\.[0-9]+(\.[a-zA-Z0-9]+)?/) { | ||
baseVersion | ||
"${vd.lastTag}.trocco" | ||
} else { | ||
"${baseVersion}.${vd.gitHash}.pre" | ||
} | ||
}() | ||
|
||
sourceCompatibility = 1.7 | ||
targetCompatibility = 1.7 | ||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
|
||
def embulkVersion = '0.10.29' | ||
|
||
dependencies { | ||
compile "org.embulk:embulk-core:0.8.+" | ||
provided "org.embulk:embulk-core:0.8.+" | ||
compile "org.embulk.base.restclient:embulk-base-restclient:0.5.3" | ||
compile "org.embulk.base.restclient:embulk-util-retryhelper-jetty92:0.5.3" | ||
compile 'org.apache.commons:commons-text:1.2' | ||
// https://mvnrepository.com/artifact/org.apache.commons/commons-csv | ||
compile group: 'org.apache.commons', name: 'commons-csv', version: '1.8' | ||
compileOnly "org.embulk:embulk-api:$embulkVersion" | ||
compileOnly "org.embulk:embulk-spi:$embulkVersion" | ||
|
||
compile('org.embulk:embulk-util-config:0.3.1') { | ||
// Conflict with Embulk Core | ||
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-annotations' | ||
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core' | ||
exclude group: 'com.fasterxml.jackson.core', module: 'jackson-databind' | ||
exclude group: 'com.fasterxml.jackson.datatype', module: 'jackson-datatype-jdk8' | ||
exclude group: 'javax.validation', module: 'validation-api' | ||
} | ||
|
||
compile "org.embulk:embulk-util-json:0.1.1" | ||
compile "org.embulk:embulk-util-text:0.1.1" | ||
compile "org.embulk:embulk-util-timestamp:0.2.1" | ||
|
||
// Explicit dependencies for embulk-util-* that matches with Embulk | ||
compile 'com.fasterxml.jackson.core:jackson-core:2.6.7' | ||
compile 'com.fasterxml.jackson.core:jackson-annotations:2.6.7' | ||
compile 'com.fasterxml.jackson.core:jackson-databind:2.6.7' | ||
compile 'com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7' | ||
compile 'javax.validation:validation-api:1.1.0.Final' | ||
|
||
compile 'org.embulk:embulk-base-restclient:0.10.1' | ||
compile 'org.embulk:embulk-util-retryhelper-jetty92:0.8.2' | ||
|
||
compile 'com.google.guava:guava:18.0' | ||
compile "com.google.code.findbugs:annotations:3.0.1" | ||
compile 'org.apache.commons:commons-lang3:3.4' | ||
compile 'org.apache.commons:commons-csv:1.8' | ||
|
||
testCompile "junit:junit:4.+" | ||
testCompile "org.embulk:embulk-core:0.8.+:tests" | ||
testCompile "org.embulk:embulk-test:0.8.+" | ||
testCompile "org.embulk:embulk-core:$embulkVersion:tests" | ||
testCompile "org.embulk:embulk-junit4:$embulkVersion" | ||
testCompile "org.embulk:embulk-deps:$embulkVersion" | ||
testCompile "org.mockito:mockito-core:2.+" | ||
} | ||
|
||
task classpath(type: Copy, dependsOn: ["jar"]) { | ||
doFirst { file("classpath").deleteDir() } | ||
from (configurations.runtime - configurations.provided + files(jar.archivePath)) | ||
into "classpath" | ||
embulkPlugin { | ||
mainClass = "org.embulk.input.marketo.MarketoInputPlugin" | ||
category = "input" | ||
type = "marketo" | ||
} | ||
|
||
publishing { | ||
publications { | ||
maven(MavenPublication) { | ||
groupId = project.group | ||
artifactId = project.name | ||
|
||
from components.java // Must be "components.java". The dependency modification works only for it. | ||
// javadocJar and sourcesJar are added by java.withJavadocJar() and java.withSourcesJar() above. | ||
// See: https://docs.gradle.org/current/javadoc/org/gradle/api/plugins/JavaPluginExtension.html | ||
|
||
pom { // https://central.sonatype.org/pages/requirements.html | ||
packaging "jar" | ||
|
||
name = project.name | ||
description = project.description | ||
url = "https://www.embulk.org/" | ||
|
||
licenses { | ||
license { | ||
// http://central.sonatype.org/pages/requirements.html#license-information | ||
name = "MIT License" | ||
url = "http://www.opensource.org/licenses/mit-license.php" | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
name = "Treasure Data" | ||
email = "[email protected]" | ||
} | ||
} | ||
|
||
scm { | ||
connection = "scm:git:git://github.com/treasure-data/embulk-input-marketo.git" | ||
developerConnection = "scm:git:[email protected]:treasure-data/embulk-input-marketo.git" | ||
url = "https://github.com/treasure-data/embulk-input-marketo" | ||
} | ||
} | ||
} | ||
} | ||
|
||
repositories { | ||
maven { // publishMavenPublicationToMavenCentralRepository | ||
name = "mavenCentral" | ||
if (project.version.endsWith("-SNAPSHOT")) { | ||
url "https://oss.sonatype.org/content/repositories/snapshots" | ||
} else { | ||
url "https://oss.sonatype.org/service/local/staging/deploy/maven2" | ||
} | ||
|
||
credentials { | ||
username = project.hasProperty("ossrhUsername") ? ossrhUsername : "" | ||
password = project.hasProperty("ossrhPassword") ? ossrhPassword : "" | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign publishing.publications.maven | ||
} | ||
|
||
gem { | ||
authors = ["uu59", "yoshihara", "taikhuu", "Treasure Data"] | ||
email = ["[email protected]", "[email protected]", "[email protected]", "[email protected]"] | ||
summary = "Marketo input plugin for Embulk" | ||
homepage = "https://github.com/treasure-data/embulk-input-marketo" | ||
licenses = ["MIT"] | ||
} | ||
|
||
gemPush { | ||
host = "https://rubygems.org" | ||
} | ||
|
||
javadoc { | ||
options { | ||
locale = 'en_US' | ||
encoding = 'UTF-8' | ||
} | ||
} | ||
clean { delete "classpath" } | ||
|
||
checkstyle { | ||
configFile = file("${project.rootDir}/config/checkstyle/checkstyle.xml") | ||
toolVersion = '6.14.1' | ||
} | ||
checkstyleMain { | ||
exclude '**/**/CsvTokenizer*' | ||
configFile = file("${project.rootDir}/config/checkstyle/default.xml") | ||
ignoreFailures = false | ||
ignoreFailures = true | ||
} | ||
checkstyleTest { | ||
configFile = file("${project.rootDir}/config/checkstyle/default.xml") | ||
ignoreFailures = false | ||
ignoreFailures = true | ||
} | ||
task checkstyle(type: Checkstyle) { | ||
classpath = sourceSets.main.output + sourceSets.test.output | ||
source = sourceSets.main.allJava + sourceSets.test.allJava | ||
} | ||
|
||
task gem(type: JRubyExec, dependsOn: ["gemspec", "classpath"]) { | ||
jrubyArgs "-rrubygems/gem_runner", "-eGem::GemRunner.new.run(ARGV)", "build" | ||
script "${project.name}.gemspec" | ||
doLast { ant.move(file: "${project.name}-${project.version}.gem", todir: "pkg") } | ||
} | ||
|
||
task gemPush(type: JRubyExec, dependsOn: ["gem"]) { | ||
jrubyArgs "-rrubygems/gem_runner", "-eGem::GemRunner.new.run(ARGV)", "push" | ||
script "pkg/${project.name}-${project.version}.gem" | ||
} | ||
|
||
task "package"(dependsOn: ["gemspec", "classpath"]) { | ||
doLast { | ||
println "> Build succeeded." | ||
println "> You can run embulk with '-L ${file(".").absolutePath}' argument." | ||
} | ||
} | ||
|
||
task gemspec { | ||
ext.gemspecFile = file("${project.name}.gemspec") | ||
inputs.file "build.gradle" | ||
outputs.file gemspecFile | ||
doLast { gemspecFile.write($/ | ||
Gem::Specification.new do |spec| | ||
spec.name = "${project.name}" | ||
spec.version = "${project.version}" | ||
spec.authors = ["uu59", "yoshihara", "taikhuu"] | ||
spec.summary = %[Marketo input plugin for Embulk] | ||
spec.description = %[Loads records from Marketo.] | ||
spec.email = ["[email protected]", "[email protected]", "[email protected]"] | ||
spec.licenses = ["Apache2"] | ||
spec.homepage = "https://github.com/treasure-data/embulk-input-marketo" | ||
|
||
spec.files = `git ls-files`.split("\n") + Dir["classpath/*.jar"] | ||
spec.test_files = spec.files.grep(%r"^(test|spec)/") | ||
spec.require_paths = ["lib"] | ||
|
||
#spec.add_dependency 'YOUR_GEM_DEPENDENCY', ['~> YOUR_GEM_DEPENDENCY_VERSION'] | ||
spec.add_development_dependency 'bundler', ['~> 1.0'] | ||
spec.add_development_dependency 'rake', ['>= 10.0'] | ||
end | ||
/$) | ||
jacocoTestReport { | ||
group = "Reporting" | ||
reports { | ||
xml.enabled false | ||
csv.enabled false | ||
html.destination file("${buildDir}/reports/coverage") | ||
} | ||
} | ||
clean { delete "${project.name}.gemspec" } |
Oops, something went wrong.