Add a jenkinsfile with build instructions
This commit is contained in:
parent
9c3fc3feb9
commit
eed3904d96
1 changed files with 50 additions and 0 deletions
50
Jenkinsfile
vendored
Normal file
50
Jenkinsfile
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
pipeline {
|
||||
agent any
|
||||
|
||||
options {
|
||||
buildDiscarder(
|
||||
logRotator(
|
||||
numToKeepStr: '5'
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
stages {
|
||||
stage("Build on Linux") {
|
||||
agent {
|
||||
label 'linux'
|
||||
}
|
||||
|
||||
tools {
|
||||
jdk "jdk17"
|
||||
}
|
||||
|
||||
steps {
|
||||
script {
|
||||
sh '''
|
||||
#!/bin/bash
|
||||
|
||||
git clean -xfd
|
||||
git reset --hard
|
||||
git fetch
|
||||
|
||||
java -version
|
||||
|
||||
chmod +x gradlew
|
||||
./gradlew -Dorg.gradle.java.home="$JAVA_HOME" build publish
|
||||
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts artifacts: "build/libs/*.jar"
|
||||
deleteDir()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue