Skip to content

Commit

Permalink
jenkinsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonArp committed Aug 17, 2022
1 parent 3d7153e commit 41c5bf8
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 17 deletions.
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

58 changes: 58 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
pipeline {
agent {
kubernetes {
defaultContainer 'ubuntu'
activeDeadlineSeconds 3600
idleMinutes 15
}
}
stages {
stage('Init') {
steps {
checkout scm
script {
def m = (env.GIT_URL =~ /(\/|:)(([^\/]+)\/)?(([^\/]+?)(\.git)?)$/)
if (m) {
org = m.group(3)
repo = m.group(5)
}
}
}
}
stage('Setup build') {
when { not { buildingTag() } }
steps {
script {
target = "verify"
}
}
}
stage('Setup release') {
when { buildingTag(); not { changeRequest() } }
steps {
script {
target = "deploy -P release --settings settings.xml"
}
sh 'gpg --batch --import arpnetworking.key'
}
}
stage('Build') {
steps {
withCredentials([usernamePassword(credentialsId: 'jenkins-dockerhub', usernameVariable: 'DOCKER_USERNAME', passwordVariable: 'DOCKER_PASSWORD'),
usernamePassword(credentialsId: 'jenkins-ossrh', usernameVariable: 'OSSRH_USER', passwordVariable: 'OSSRH_PASS'),
string(credentialsId: 'jenkins-gpg', variable: 'GPG_PASS')]) {
withMaven {
sh "./jdk-wrapper.sh ./mvnw $target -U -B -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Ddocker.verbose=true"
}
}
}
}
}
post('Analysis') {
always {
recordIssues(
enabledForFailure: true, aggregatingResults: true,
tools: [java(), checkStyle(reportEncoding: 'UTF-8'), spotBugs()])
}
}
}

0 comments on commit 41c5bf8

Please sign in to comment.