mirror of
https://github.com/shadowfacts/jinput-arm64.git
synced 2026-01-01 14:29:58 +01:00
93 lines
3.2 KiB
Groovy
93 lines
3.2 KiB
Groovy
pipeline {
|
|
agent none
|
|
triggers { pollSCM('H/15 * * * *') }
|
|
tools {
|
|
maven 'Maven 3.5.3'
|
|
jdk 'OpenJDK 9'
|
|
}
|
|
options { buildDiscarder(logRotator(numToKeepStr: '5')) }
|
|
stages {
|
|
stage('Build') {
|
|
parallel {
|
|
stage('Build on Windows') {
|
|
agent {
|
|
label "windows"
|
|
}
|
|
steps {
|
|
bat 'echo %JAVA_HOME%'
|
|
bat 'mvn -B -DskipTests clean package'
|
|
}
|
|
post {
|
|
success {
|
|
stash includes: 'plugins/**/target/*.jar*', name: 'windows-artifacts'
|
|
}
|
|
}
|
|
}
|
|
stage('Build on Linux') {
|
|
agent {
|
|
label "linux"
|
|
}
|
|
steps {
|
|
sh 'echo $JAVA_HOME'
|
|
sh 'mvn -B -DskipTests clean package'
|
|
}
|
|
post {
|
|
success {
|
|
stash includes: 'plugins/**/target/*.jar*', name: 'linux-artifacts'
|
|
stash includes: '**/target/*.jar*', excludes: 'plugins/**/target/*.jar*', name: 'core-artifacts'
|
|
}
|
|
}
|
|
}
|
|
stage('Build on OSX') {
|
|
agent {
|
|
label "osx"
|
|
}
|
|
steps {
|
|
sh 'echo $JAVA_HOME'
|
|
sh 'mvn -B -DskipTests clean package'
|
|
}
|
|
post {
|
|
success {
|
|
stash includes: 'plugins/**/target/*.jar*', name: 'osx-artifacts'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
stage('Archive artifacts') {
|
|
agent any
|
|
steps {
|
|
unstash 'core-artifacts'
|
|
unstash 'windows-artifacts'
|
|
unstash 'osx-artifacts'
|
|
unstash 'linux-artifacts'
|
|
}
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: '**/target/*.jar*', fingerprint: true
|
|
}
|
|
}
|
|
}
|
|
stage('Deploy artifacts') {
|
|
agent {
|
|
label "linux"
|
|
}
|
|
steps {
|
|
unstash 'core-artifacts'
|
|
unstash 'windows-artifacts'
|
|
unstash 'osx-artifacts'
|
|
unstash 'linux-artifacts'
|
|
sh 'echo $GPG_SECRET_KEYS | base64 --decode | gpg --batch --import'
|
|
sh 'echo $GPG_OWNERTRUST | base64 --decode | gpg --import-ownertrust'
|
|
withMaven(
|
|
maven: 'Maven 3.5.3',
|
|
jdk: 'OpenJDK 9',
|
|
globalMavenSettingsConfig: 'global-maven-settings-ossrh',
|
|
mavenOpts: '-Djavax.net.ssl.trustStore=/etc/ssl/certs/java/cacerts' //Work around for JDK9 missing cacerts
|
|
) {
|
|
sh "mvn -P linux,windows,osx,wintab deploy:deploy"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |