2024-09-06 02:56:22 -07:00
|
|
|
pipeline {
|
2024-09-06 03:13:09 -07:00
|
|
|
agent any
|
2024-09-06 02:56:22 -07:00
|
|
|
|
|
|
|
options {
|
|
|
|
buildDiscarder(
|
|
|
|
logRotator(
|
|
|
|
numToKeepStr: '5'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
stages {
|
|
|
|
stage("Build on Linux") {
|
|
|
|
agent {
|
|
|
|
label 'linux'
|
|
|
|
}
|
|
|
|
|
2024-09-06 03:13:09 -07:00
|
|
|
tools {
|
2024-09-06 23:35:21 -07:00
|
|
|
jdk "jdk8"
|
2024-09-06 03:13:09 -07:00
|
|
|
}
|
2024-09-06 23:29:58 -07:00
|
|
|
|
2024-09-06 02:56:22 -07:00
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
sh '''
|
|
|
|
#!/bin/bash
|
|
|
|
|
2024-09-06 23:59:44 -07:00
|
|
|
chmod +x /acmvn
|
|
|
|
/acmvn
|
2024-09-06 23:55:58 -07:00
|
|
|
echo "MVN USERNAME : $MVN_USER"
|
|
|
|
|
2024-09-06 12:09:59 -07:00
|
|
|
git clean -xfd
|
|
|
|
git reset --hard
|
|
|
|
git fetch
|
|
|
|
|
|
|
|
java -version
|
2024-09-06 03:01:10 -07:00
|
|
|
|
2024-09-06 02:56:22 -07:00
|
|
|
chmod +x gradlew
|
2024-09-06 23:35:21 -07:00
|
|
|
./gradlew -Dorg.gradle.java.home="$JAVA_HOME" build publish
|
2024-09-06 02:56:22 -07:00
|
|
|
|
|
|
|
'''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
archiveArtifacts artifacts: "build/libs/*.jar"
|
|
|
|
deleteDir()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|