47 lines
No EOL
797 B
Groovy
47 lines
No EOL
797 B
Groovy
pipeline {
|
|
agent any {
|
|
tools {
|
|
jdk 'jdk8'
|
|
}
|
|
}
|
|
|
|
options {
|
|
buildDiscarder(
|
|
logRotator(
|
|
numToKeepStr: '5'
|
|
)
|
|
)
|
|
}
|
|
|
|
stages {
|
|
stage("Build on Linux") {
|
|
agent {
|
|
label 'linux'
|
|
}
|
|
|
|
|
|
steps {
|
|
script {
|
|
sh '''
|
|
#!/bin/bash
|
|
|
|
java --version
|
|
|
|
chmod +x gradlew
|
|
./gradlew build publish
|
|
|
|
'''
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
archiveArtifacts artifacts: "build/libs/*.jar"
|
|
deleteDir()
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
} |