Commit 197a0fad authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

430: Finalize debian package publication (OPENED)

Task-Url: #430
parent 7cfcba83
Pipeline #24330 passed with stage
in 1 minute and 21 seconds
image: java:8-jdk
image: java:11-jdk
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
......@@ -7,7 +7,7 @@ variables:
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- ./gradlew wrapper --distribution-type=bin
- ./gradlew wrapper --gradle-version=6.9 --distribution-type=bin
cache:
paths:
......@@ -33,14 +33,14 @@ build:
deploy:
stage: deploy
script:
- ./gradlew publish -x test :search-docs:publish $NEXUS_CREDENTIALS
- ./gradlew clean -x test :search-ui:publish $NEXUS_CREDENTIALS
only:
- v4.x-master
docs:
stage: deploy
script:
- ./gradlew :search-docs:publish $NEXUS_CREDENTIALS
- ./gradlew clean -x test :search-docs:publish $NEXUS_CREDENTIALS
only:
- v4.x-master
- docs
......@@ -47,7 +47,8 @@ task publishDebPackage {
def distroPath = "$buildDir/distributions/"
doLast {
if (version.endsWith('SNAPSHOT') || version.endsWith('RELEASE')) {
println "Publishing Debian package $debFile as user $repoUser";
aptRepo = version.endsWith('SNAPSHOT') ? aptTestingRepo : aptReleasesRepo
println "Publishing Debian package $debFile as user $repoUser to $aptRepo"
exec {
executable "curl"
args "-f", "-u", "$repoUser:$repoPass", "-H", "Content-Type: multipart/form-data", "--data-binary", "@$distroPath$debFile", "$aptRepo";
......
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
......@@ -54,12 +54,14 @@ ospackage {
//installUtils file('scripts/utils.sh')
//preInstall file('scripts/search.preinst')
postInstall file('scripts/search.postinst')
postInstall file('scripts/search-ui.postinst')
//preUninstall file('scripts/preUninstall.sh')
//postUninstall file('scripts/postUninstall.sh')
into "/var/dfa/webapps/$project.name/"
configurationFile "/etc/dfa/search/search.yml"
// Copy the actual .jar file
from(war.outputs.files) {
include '*.war'
......@@ -68,11 +70,7 @@ ospackage {
}
fileMode 0755
}
/*from("scripts/search.service") {
into "/etc/systemd/system/"
}*/
from("src/main/resources/application.deb.yml") {
into "/etc/dfa/search"
fileType = CONFIG | NOREPLACE
......@@ -90,10 +88,11 @@ tasks.withType(Deb) {
}
buildDeb {
requires('default-jre').or('default-jre-headless')
requires('default-jdk').or('default-jdk-headless')
requires('mongodb').or('mongodb-org')
requires('elasticsearch')
from("scripts/search.service") {
from("scripts/search-ui.service") {
into "/etc/systemd/system/"
}
}
......
Supports Markdown
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