-
Stefan E. Funk authoredStefan E. Funk authored
Jenkinsfile 1.48 KiB
node {
def mvnHome
stage('Preparation') {
mvnHome = tool 'Maven 3.5.0'
checkout scm
}
stage('Build') {
// Ignoring (online) tests
sh "'${mvnHome}/bin/mvn' -DskipTests=true -U clean verify deploy"
echo "-- Creating package --"
def pom = readMavenPom file: './pom.xml'
def pVersion = pom.version
sh """
fpm -t deb -a noarch -s dir --name tgauth \
--description='TextGrid Auth' \
--maintainer='DARIAH-DE <info@de.dariah.eu>' \
--vendor='DARIAH-DE' \
--url='https://textgrid.de' \
--iteration $BUILD_NUMBER \
--version ${pVersion} \
-x '.git**' \
-x '**/.git**' \
-x '**/.hg**' \
-x '**/.svn**' \
-x '.buildinfo' \
-x '**/*.deb' \
--prefix /var/www \
info.textgrid.middleware.tgauth.rbac \
info.textgrid.middleware.tgauth.webauth
"""
}
stage('Publish') {
def pom = readMavenPom file: './pom.xml'
def pName = pom.artifactId
def pVersion = pom.version
def snapshot = pVersion.contains("SNAPSHOT")
if (snapshot) {
doDebSnapshot(pName, '', pVersion, 'trusty')
}
else {
doDebRelease(pName, '', pVersion, 'trusty')
}
}
}