Commit 3d2a2911 authored by René Schöne's avatar René Schöne
Browse files

Activate publishing using CI.

parent b570122a
Pipeline #8591 passed with stages
in 2 minutes and 45 seconds
......@@ -6,3 +6,4 @@
.idea/
.gradle/
build/
/gradle.properties
......@@ -3,6 +3,7 @@ variables:
stages:
- build
- publish
- deploy
before_script:
......@@ -14,7 +15,7 @@ cache:
- .gradle/caches
build:
image: openjdk:8
image: openjdk:11
stage: build
script:
- ./gradlew --console=plain --no-daemon assemble jar
......@@ -22,6 +23,14 @@ build:
paths:
- "/builds/jastadd/ragconnect/build/libs/ragconnect-*.jar"
publish:
image: openjdk:11
stage: publish
script:
- "./gradlew publish"
# only:
# - master
pages:
image: python:3.7-alpine
stage: deploy
......
......@@ -2,6 +2,7 @@ apply plugin: 'java-library'
apply plugin: 'idea'
apply plugin: 'jastadd'
apply plugin: 'application'
apply plugin: 'maven-publish'
group = 'de.tudresden.inf.st'
......@@ -178,3 +179,44 @@ jastadd {
}
generateAst.dependsOn relast
//708
publishing {
publications {
maven(MavenPublication) {
artifactId = 'ragconnect'
from components.java
// artifact("build/libs/ragconnect-${version}.jar") {
// extension 'jar'
// }
}
}
repositories {
// maven {
// name 'nexus'
// url "http://172.22.1.152:8081/repository/" + (project.hasProperty('asSnapshot') ? "maven-snapshots" : "maven-releases/")
// credentials {
// username project.ext.properties.repoUser
// password project.ext.properties.repoPassword
// }
// }
maven {
url "https://git-st.inf.tu-dresden.de/api/v4/projects/708/packages/maven"
// Uncomment the following lines to publish manually (and comment out the other credentials section)
// credentials(HttpHeaderCredentials) {
// name = "Private-Token"
// value = gitLabPrivateToken // the variable resides in ~/.gradle/gradle.properties
// }
credentials(HttpHeaderCredentials) {
name = 'Job-Token'
value = System.getenv("CI_JOB_TOKEN")
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}
publish.dependsOn jar
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