Commit c80902a9 authored by Gradl, Tobias's avatar Gradl, Tobias

Progess on publishing Apt/Yum Packages

parent 4391d91e
Pipeline #13346 passed with stage
in 3 minutes and 59 seconds
......@@ -17,7 +17,7 @@ plugins {
id "org.gretty" version "3.0.1"
}
apply plugin: "nebula.deb"
apply plugin: "nebula.ospackage"
group = 'de.unibamberg.minf'
version = '3.6.0'
......@@ -100,25 +100,52 @@ task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
}
task unpackFiles(type: Copy) {
from(components.web)
into "$buildDir/web"
tasks.withType(Deb) {
dependsOn(classes)
}
tasks.withType(Rpm) {
dependsOn(classes)
}
task fooDeb(type: Deb) {
release '1'
packageName 'dariah-dme'
replaces 'dme'
ospackage {
//release '1'
os = LINUX
arch = 'noarch'
packageName "dariah-$project.name"
replaces "$project.name"
maintainer 'info@de.dariah.eu'
requires('openjdk-8-jdk').or('openjdk-11-jdk')
signingKeyId('CB012F105B632B46C2A7B4918FC46DAC1BC3E238')
from("$buildDir/classes/java") {
into 'var/lib'
into "var/dfa/webapps/$project.name/"
from(configurations.runtime) {
into "WEB-INF/lib"
}
from("$buildDir/classes/java/main") {
into "WEB-INF/classes"
}
from ("src/main/resources") {
into "WEB-INF/classes"
}
from ("src/main/webapp/WEB-INF") {
into "WEB-INF"
}
from ("src/main/webapp/resources") {
into "resources"
}
from ("src/main/webapp/themes") {
into "themes"
}
from ("src/main/webapp/META-INF") {
into "META-INF"
}
}
......@@ -133,6 +160,21 @@ artifacts {
//archives javadocJar
}
task publishDebPackage {
def repo = "https://minfba.de.dariah.eu/nexus/repository/minfba-apt/"
def user = project.hasProperty('nexususer') ? project.getProperty('nexususer') : '?';
def password = project.hasProperty('nexuspass') ? project.getProperty('nexuspass') : ''
def debPackage = "$buildDir/distributions/java/main"
println "Publishing Debian package for $project.name-$project.version as user $user";
exec {
executable "curl"
//args "-u \"$user:$password\"", "-H \"Content-Type: multipart/form-data\"", "--data-binary 12", "$repo";
args "-u \"$user:$password\"", "www.google.de";
}
}
publishing {
publications {
maven(MavenPublication) {
......
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