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 @@ ...@@ -6,3 +6,4 @@
.idea/ .idea/
.gradle/ .gradle/
build/ build/
/gradle.properties
...@@ -3,6 +3,7 @@ variables: ...@@ -3,6 +3,7 @@ variables:
stages: stages:
- build - build
- publish
- deploy - deploy
before_script: before_script:
...@@ -14,7 +15,7 @@ cache: ...@@ -14,7 +15,7 @@ cache:
- .gradle/caches - .gradle/caches
build: build:
image: openjdk:8 image: openjdk:11
stage: build stage: build
script: script:
- ./gradlew --console=plain --no-daemon assemble jar - ./gradlew --console=plain --no-daemon assemble jar
...@@ -22,6 +23,14 @@ build: ...@@ -22,6 +23,14 @@ build:
paths: paths:
- "/builds/jastadd/ragconnect/build/libs/ragconnect-*.jar" - "/builds/jastadd/ragconnect/build/libs/ragconnect-*.jar"
publish:
image: openjdk:11
stage: publish
script:
- "./gradlew publish"
# only:
# - master
pages: pages:
image: python:3.7-alpine image: python:3.7-alpine
stage: deploy stage: deploy
......
...@@ -2,6 +2,7 @@ apply plugin: 'java-library' ...@@ -2,6 +2,7 @@ apply plugin: 'java-library'
apply plugin: 'idea' apply plugin: 'idea'
apply plugin: 'jastadd' apply plugin: 'jastadd'
apply plugin: 'application' apply plugin: 'application'
apply plugin: 'maven-publish'
group = 'de.tudresden.inf.st' group = 'de.tudresden.inf.st'
...@@ -178,3 +179,44 @@ jastadd { ...@@ -178,3 +179,44 @@ jastadd {
} }
generateAst.dependsOn relast 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