Skip to content

Commit

Permalink
chore(core): move from org.kestra to io.kestra
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Mar 25, 2021
1 parent 5ad586f commit 5d6f7f4
Show file tree
Hide file tree
Showing 48 changed files with 225 additions and 219 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- master
tags:
- v*

pull_request:
branches:
Expand Down Expand Up @@ -36,15 +38,39 @@ jobs:

# Gradle check
- name: Build with Gradle
run: ./gradlew check --no-daemon
run: ./gradlew check

# Publish package
- name: Publish package
# Publish
- name: Publish package to Sonatype
if: github.ref == 'refs/heads/master'
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_KEY: ${{ secrets.BINTRAY_KEY }}
run: ./gradlew bintrayUpload --parallel --no-daemon
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_GPG_KEYID: ${{ secrets.SONATYPE_GPG_KEYID }}
SONATYPE_GPG_PASSWORD: ${{ secrets.SONATYPE_GPG_PASSWORD }}
SONATYPE_GPG_FILE: ${{ secrets.SONATYPE_GPG_FILE }}
run: |
echo "signing.keyId=${SONATYPE_GPG_KEYID}" > ~/.gradle/gradle.properties
echo "signing.password=${SONATYPE_GPG_PASSWORD}" >> ~/.gradle/gradle.properties
echo "signing.secretKeyRingFile=${HOME}/.gradle/secring.gpg" >> ~/.gradle/gradle.properties
echo ${SONATYPE_GPG_FILE} | base64 -d > ~/.gradle/secring.gpg
./gradlew publishToSonatype
# Release
- name: Release package to Maven Central
if: startsWith(github.ref, 'refs/tags/v')
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_GPG_KEYID: ${{ secrets.SONATYPE_GPG_KEYID }}
SONATYPE_GPG_PASSWORD: ${{ secrets.SONATYPE_GPG_PASSWORD }}
SONATYPE_GPG_FILE: ${{ secrets.SONATYPE_GPG_FILE }}
run: |
echo "signing.keyId=${SONATYPE_GPG_KEYID}" > ~/.gradle/gradle.properties
echo "signing.password=${SONATYPE_GPG_PASSWORD}" >> ~/.gradle/gradle.properties
echo "signing.secretKeyRingFile=${HOME}/.gradle/secring.gpg" >> ~/.gradle/gradle.properties
echo ${SONATYPE_GPG_FILE} | base64 -d > ~/.gradle/secring.gpg
./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository
# Slack
- name: Slack notification
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## Documentation
* The official Kestra documentation can be found under: [kestra.io](https://kestra.io)
* This plugin documentation can be found [here](https://kestra.io/plugins/task-serdes/)
* This plugin documentation can be found [here](https://kestra.io/plugins/plugin-serdes/)

## License
Apache 2.0 © [Nigh Tech](https://nigh.tech)
Expand Down
96 changes: 38 additions & 58 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,27 @@ plugins {
id "idea"
id "com.adarshr.test-logger" version "2.1.1"
id "com.github.johnrengelman.shadow" version "6.1.0"
id "maven-publish"
id 'ru.vyarus.java-lib' version '2.1.0'
id 'ru.vyarus.github-info' version '1.2.0'
id "com.jfrog.bintray" version "1.8.5"
id 'signing'
id "io.github.gradle-nexus.publish-plugin" version "1.0.0"
id "com.github.ben-manes.versions" version "0.36.0"
id 'net.researchgate.release' version '2.8.1'
}

def isBuildSnapshot = version.toString().endsWith("-SNAPSHOT")
def publishVersion = isBuildSnapshot ? project.version.replaceAll(/-SNAPSHOT$/, "") : project.version;

repositories {
mavenCentral()
jcenter()
maven { url "https://dl.bintray.com/kestra/maven" + (isBuildSnapshot ? "-snapshot" : "") }
if (isBuildSnapshot) {
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }
}
}

sourceCompatibility = 11
group "org.kestra.task.serdes"
group "io.kestra.plugin"
description 'Serde plugin for Kestra'

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
Expand All @@ -42,7 +44,7 @@ dependencies {
compileOnly "io.micronaut:micronaut-validation"

// kestra
compileOnly group: "org.kestra", name: "core", version: kestraVersion
compileOnly group: "io.kestra", name: "core", version: kestraVersion

api 'de.siegmar:fastcsv:1.0.3'
api 'org.apache.avro:avro:1.10.1'
Expand Down Expand Up @@ -74,10 +76,10 @@ dependencies {
testImplementation platform("io.micronaut:micronaut-bom:$micronautVersion")
testImplementation "io.micronaut.test:micronaut-test-junit5"

testImplementation group: "org.kestra", name: "core", version: kestraVersion
testImplementation group: "org.kestra", name: "repository-memory", version: kestraVersion
testImplementation group: "org.kestra", name: "runner-memory", version: kestraVersion
testImplementation group: "org.kestra", name: "storage-local", version: kestraVersion
testImplementation group: "io.kestra", name: "core", version: kestraVersion
testImplementation group: "io.kestra", name: "repository-memory", version: kestraVersion
testImplementation group: "io.kestra", name: "runner-memory", version: kestraVersion
testImplementation group: "io.kestra", name: "storage-local", version: kestraVersion

testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation "org.hamcrest:hamcrest:2.2"
Expand All @@ -91,16 +93,41 @@ dependencies {
/**********************************************************************************************************************\
* Publish
**********************************************************************************************************************/
nexusPublishing {
repositoryDescription = "${project.group}:${rootProject.name}:${project.version}"
useStaging = !isBuildSnapshot
repositories {
sonatype {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}

jar {
manifest {
attributes(
"X-Kestra-Title": project.name,
"X-Kestra-Group": project.group,
"X-Kestra-Group": project.group + ".serdes",
"X-Kestra-Description": project.description,
"X-Kestra-Version": project.version
)
}
}

pom {
developers {
developer {
id "tchiotludo"
name "Ludovic Dehon"
}
}
}

signing {
sign publishing.publications.maven
}

shadowJar {
archiveClassifier.set(null)
mergeServiceFiles()
Expand All @@ -111,53 +138,6 @@ github {
license 'Apache'
}

publishing {
publications {
BintrayMavenPublication(MavenPublication) {
version publishVersion

groupId project.group
artifactId project.name

artifact shadowJar
artifact sourcesJar
artifact javadocJar

pom.withXml {
def dependenciesNode = asNode().getAt('dependencies')[0] ?: asNode().appendNode('dependencies')

configurations.api.allDependencies.each {
if (it.name != 'unspecified') {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}

bintray {
user = System.getenv('BINTRAY_USER')
key = System.getenv('BINTRAY_KEY')
publications = ['BintrayMavenPublication']
publish = true
override = isBuildSnapshot
pkg {
userOrg = 'kestra'
name = project.name
repo = isBuildSnapshot ? 'maven-snapshot' : 'maven'
publicDownloadNumbers = true
version {
name = publishVersion
released = new Date().format("yyyy-MM-dd'T'HH:mm:ss.SSSZ")
vcsTag = "v" + publishVersion
}
}
}

/**********************************************************************************************************************\
* Version
**********************************************************************************************************************/
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.1.25-SNAPSHOT
kestraVersion=0.1.+
version=0.2.0-SNAPSHOT
kestraVersion=0.2.+
micronautVersion=2.3.4
lombokVersion=1.18.18
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'task-serdes'
rootProject.name = 'plugin-serdes'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kestra.task.serdes.avro;
package io.kestra.plugin.serdes.avro;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
Expand All @@ -11,7 +11,7 @@
import org.apache.avro.generic.GenericData;
import org.apache.avro.util.Utf8;
import org.apache.commons.lang3.StringUtils;
import org.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.annotations.PluginProperty;

import java.math.BigDecimal;
import java.math.BigInteger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kestra.task.serdes.avro;
package io.kestra.plugin.serdes.avro;

import javax.validation.Constraint;
import java.lang.annotation.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kestra.task.serdes.avro;
package io.kestra.plugin.serdes.avro;

import io.reactivex.BackpressureStrategy;
import io.reactivex.Flowable;
Expand All @@ -12,12 +12,12 @@
import org.apache.avro.generic.GenericDatumWriter;
import org.apache.avro.generic.GenericRecord;
import org.apache.avro.io.DatumWriter;
import org.kestra.core.models.annotations.PluginProperty;
import org.kestra.core.models.executions.metrics.Counter;
import org.kestra.core.models.tasks.RunnableTask;
import org.kestra.core.models.tasks.Task;
import org.kestra.core.runners.RunContext;
import org.kestra.core.serializers.FileSerde;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.executions.metrics.Counter;
import io.kestra.core.models.tasks.RunnableTask;
import io.kestra.core.models.tasks.Task;
import io.kestra.core.runners.RunContext;
import io.kestra.core.serializers.FileSerde;

import javax.validation.constraints.NotNull;
import java.io.*;
Expand Down Expand Up @@ -178,7 +178,7 @@ public Output run(RunContext runContext) throws Exception {

@Builder
@Getter
public static class Output implements org.kestra.core.models.tasks.Output {
public static class Output implements io.kestra.core.models.tasks.Output {
@io.swagger.v3.oas.annotations.media.Schema(
title = "URI of a temporary result file"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kestra.task.serdes.avro;
package io.kestra.plugin.serdes.avro;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kestra.task.serdes.avro;
package io.kestra.plugin.serdes.avro;

import io.micronaut.context.annotation.Factory;
import io.micronaut.validation.validator.constraints.ConstraintValidator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kestra.task.serdes.csv;
package io.kestra.plugin.serdes.csv;

import de.siegmar.fastcsv.reader.CsvParser;
import de.siegmar.fastcsv.reader.CsvRow;
Expand All @@ -9,12 +9,12 @@
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.kestra.core.models.annotations.PluginProperty;
import org.kestra.core.models.executions.metrics.Counter;
import org.kestra.core.models.tasks.RunnableTask;
import org.kestra.core.models.tasks.Task;
import org.kestra.core.runners.RunContext;
import org.kestra.core.serializers.FileSerde;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.executions.metrics.Counter;
import io.kestra.core.models.tasks.RunnableTask;
import io.kestra.core.models.tasks.Task;
import io.kestra.core.runners.RunContext;
import io.kestra.core.serializers.FileSerde;

import java.io.File;
import java.io.FileOutputStream;
Expand Down Expand Up @@ -134,7 +134,7 @@ public Output run(RunContext runContext) throws Exception {

@Builder
@Getter
public static class Output implements org.kestra.core.models.tasks.Output {
public static class Output implements io.kestra.core.models.tasks.Output {
@Schema(
title = "URI of a temporary result file"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kestra.task.serdes.csv;
package io.kestra.plugin.serdes.csv;

import de.siegmar.fastcsv.writer.CsvAppender;
import io.reactivex.BackpressureStrategy;
Expand All @@ -9,12 +9,12 @@
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.apache.commons.lang3.ArrayUtils;
import org.kestra.core.models.annotations.PluginProperty;
import org.kestra.core.models.executions.metrics.Counter;
import org.kestra.core.models.tasks.RunnableTask;
import org.kestra.core.models.tasks.Task;
import org.kestra.core.runners.RunContext;
import org.kestra.core.serializers.FileSerde;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.executions.metrics.Counter;
import io.kestra.core.models.tasks.RunnableTask;
import io.kestra.core.models.tasks.Task;
import io.kestra.core.runners.RunContext;
import io.kestra.core.serializers.FileSerde;

import java.io.BufferedReader;
import java.io.File;
Expand Down Expand Up @@ -151,7 +151,7 @@ public void accept(Object row) throws Exception {

@Builder
@Getter
public static class Output implements org.kestra.core.models.tasks.Output {
public static class Output implements io.kestra.core.models.tasks.Output {
@Schema(
title = "URI of a temporary result file"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.kestra.task.serdes.json;
package io.kestra.plugin.serdes.json;

import com.fasterxml.jackson.databind.ObjectMapper;
import io.reactivex.BackpressureStrategy;
Expand All @@ -8,12 +8,12 @@
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.SuperBuilder;
import org.kestra.core.models.annotations.PluginProperty;
import org.kestra.core.models.executions.metrics.Counter;
import org.kestra.core.models.tasks.RunnableTask;
import org.kestra.core.models.tasks.Task;
import org.kestra.core.runners.RunContext;
import org.kestra.core.serializers.FileSerde;
import io.kestra.core.models.annotations.PluginProperty;
import io.kestra.core.models.executions.metrics.Counter;
import io.kestra.core.models.tasks.RunnableTask;
import io.kestra.core.models.tasks.Task;
import io.kestra.core.runners.RunContext;
import io.kestra.core.serializers.FileSerde;

import java.io.*;
import java.net.URI;
Expand Down Expand Up @@ -84,7 +84,7 @@ public Output run(RunContext runContext) throws Exception {

@Builder
@Getter
public static class Output implements org.kestra.core.models.tasks.Output {
public static class Output implements io.kestra.core.models.tasks.Output {
@Schema(
title = "URI of a temporary result file"
)
Expand Down
Loading

0 comments on commit 5d6f7f4

Please sign in to comment.