Commit 7d371af1 authored by Florian Schäfer's avatar Florian Schäfer

Also build with Java 13 in GitLab CI, but allow failure. Publish releases to GitLab packages

parent e9617b03
Pipeline #48994498 passed with stages
in 24 minutes
......@@ -47,6 +47,17 @@ assemble with java 12:
artifacts:
paths:
- build/
allow_failure: true
assemble with java 13:
stage: build
image: registry.gitlab.com/josm/docker-library/openjdk-13-josmplugin:latest
script:
- ./gradlew assemble --stacktrace
artifacts:
paths:
- build/
allow_failure: true
##############
......@@ -100,6 +111,16 @@ build with java 12:
- ./gradlew build --stacktrace
dependencies:
- assemble with java 12
allow_failure: true
build with java 13:
stage: test
image: registry.gitlab.com/josm/docker-library/openjdk-13-josmplugin:latest
script:
- ./gradlew build --stacktrace
dependencies:
- assemble with java 13
allow_failure: true
################
......@@ -173,3 +194,15 @@ publish master update site:
- build
only:
- master@JOSM/wikipedia
publish to / GitLab.com packages:
stage: deploy
environment:
name: GitLab.com / JOSM-wikipedia packages
url: https://gitlab.com/JOSM/wikipedia/-/packages
script:
- ./gradlew publishPluginPublicationToGitlabRepository
dependencies:
- build
only:
- tags@JOSM/wikipedia
......@@ -9,6 +9,7 @@ plugins {
id "java"
id "eclipse"
id "jacoco"
id "maven-publish"
id "pmd"
id "com.github.ben-manes.versions" version "0.20.0"
id "com.github.spotbugs" version "1.6.10"
......@@ -158,3 +159,33 @@ task generateSnapshotUpdateSite(type: GeneratePluginList) {
it.addPlugin("$archivesBaseName-dev.jar", project.josm.manifest.createJosmPluginJarManifest(), new URL(pluginDownloadUrl))
}
}
project.afterEvaluate {
publishing {
publications {
plugin(MavenPublication) {
groupId = "org.openstreetmap.josm.plugins"
artifactId = archivesBaseName
version = project.version
from components.java
}
}
}
}
def ciJobToken = System.getenv("CI_JOB_TOKEN")
def projectId = System.getenv("CI_PROJECT_ID")
if (ciJobToken != null && projectId!= null) {
publishing.repositories.maven {
url = "https://gitlab.com/api/v4/projects/$projectId/packages/maven"
name = "gitlab"
credentials(HttpHeaderCredentials.class) {
name = "Job-Token"
value = ciJobToken
}
authentication {
create("auth", HttpHeaderAuthentication.class)
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment