2024-08-08 18:43:06 +08:00
|
|
|
pipeline {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'openjdk:21'
|
|
|
|
args '-v /root/.gradle:/root/.gradle'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
2024-08-08 18:58:19 +08:00
|
|
|
sh './gradlew :ts-gradle:publish'
|
2024-08-08 18:48:46 +08:00
|
|
|
sh './gradlew publish'
|
2024-08-08 18:43:06 +08:00
|
|
|
script {
|
|
|
|
try {
|
|
|
|
archiveArtifacts artifacts: "**/build/libs/*.jar",fingerprint: true, followSymlinks: false, onlyIfSuccessful: true
|
|
|
|
} catch (Exception err) {
|
|
|
|
echo err.toString() /* hudson.AbortException: Couldn't find any revision to build. Verify the repository and branch configuration for this job. */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|