diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..f79fae7 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,23 @@ +--- +kind: pipeline +name: default +type: docker + +steps: + - name: test + image: eclipse-temurin:8-jdk + commands: + - ./gradlew test + - name: build + image: eclipse-temurin:8-jdk + environment: + AUTH_TOKEN: # Gitea access token ENV variable + from_secret: auth # Name of DroneCI secret exposed above + commands: + - ./gradlew build packages + - for file in build/libs/*-all.jar ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done + - for file in build/distributions/*.deb ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done + - for file in build/distributions/*.rpm ; do curl --user "${DRONE_REPO_OWNER}:$${AUTH_TOKEN}" --upload-file "$${file}" "https://git.data.coop/api/packages/${DRONE_REPO_OWNER}/generic/${DRONE_REPO_NAME}/${DRONE_TAG}/$(basename $file)" ; done + when: + event: + - tag diff --git a/build.gradle b/build.gradle index 45afe49..c4f9b7a 100644 --- a/build.gradle +++ b/build.gradle @@ -6,9 +6,9 @@ plugins { // Code coverage of tests id 'jacoco' - id "com.github.johnrengelman.shadow" version "7.1.2" id "net.nemerosa.versioning" version "2.15.1" - id "nebula.ospackage" version "9.1.1" + id "com.netflix.nebula.ospackage" version "10.0.0" + id "com.github.johnrengelman.shadow" version "7.1.2" } repositories { @@ -24,8 +24,8 @@ dependencies { implementation 'info.picocli:picocli:4.7.0' implementation 'org.influxdb:influxdb-java:2.23' //implementation 'com.influxdb:influxdb-client-java:6.7.0' - implementation 'org.slf4j:slf4j-api:2.0.4' - implementation 'org.slf4j:slf4j-simple:2.0.4' + implementation 'org.slf4j:slf4j-api:2.0.6' + implementation 'org.slf4j:slf4j-simple:2.0.6' implementation 'com.squareup.okhttp3:okhttp:4.10.0' // Also used by InfluxDB Client implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.1' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.14.1' @@ -51,7 +51,6 @@ test { } -apply plugin: 'nebula.ospackage' ospackage { packageName = 'hmci' release = '1' @@ -127,7 +126,7 @@ jar { } } -tasks.create("packages") { +tasks.register("packages") { group "build" dependsOn ":build" dependsOn ":buildDeb"