2022-04-04 17:21:20 -05:00
|
|
|
pipeline {
|
|
|
|
agent any
|
2022-04-22 02:42:28 -05:00
|
|
|
environment {
|
2022-04-22 03:09:31 -05:00
|
|
|
GITHUB_BRANCH = "${BRANCH_NAME}"
|
2022-04-22 02:42:28 -05:00
|
|
|
}
|
2022-06-13 22:40:10 -05:00
|
|
|
stages {
|
2022-04-07 16:07:56 -05:00
|
|
|
stage('applyPatches') {
|
2022-04-04 17:21:20 -05:00
|
|
|
steps {
|
2023-03-16 00:12:59 -05:00
|
|
|
scmSkip(deleteBuild: true)
|
2022-04-07 00:05:56 -05:00
|
|
|
withGradle {
|
2022-06-13 22:37:50 -05:00
|
|
|
sh './gradlew applyPatches --no-daemon --refresh-dependencies'
|
2022-04-07 16:07:56 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('paperclipJar') {
|
|
|
|
steps {
|
|
|
|
withGradle {
|
2022-06-13 22:37:50 -05:00
|
|
|
sh './gradlew createReobfPaperclipJar --no-daemon --refresh-dependencies'
|
2022-04-07 00:05:56 -05:00
|
|
|
}
|
2022-04-04 17:21:20 -05:00
|
|
|
}
|
|
|
|
}
|
2022-04-14 20:32:26 -05:00
|
|
|
stage('test') {
|
|
|
|
steps {
|
|
|
|
withGradle {
|
2022-06-13 22:37:50 -05:00
|
|
|
sh './gradlew test --no-daemon'
|
2022-04-14 20:32:26 -05:00
|
|
|
}
|
|
|
|
}
|
2022-07-05 17:11:25 -05:00
|
|
|
}
|
2022-07-05 17:07:53 -05:00
|
|
|
stage('publish') {
|
|
|
|
when {
|
2023-03-15 23:46:12 -05:00
|
|
|
branch "1.19.4"
|
2022-07-05 17:07:53 -05:00
|
|
|
}
|
|
|
|
steps {
|
2023-03-16 00:12:59 -05:00
|
|
|
script {
|
|
|
|
try {
|
|
|
|
withCredentials([usernamePassword(credentialsId: 'scissors-ci', passwordVariable: 'scissorsPassword', usernameVariable: 'scissorsUser')]) {
|
|
|
|
withGradle {
|
|
|
|
sh "./gradlew :Scissors-API:publish --no-daemon"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
true
|
|
|
|
} catch (_) {
|
|
|
|
false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-04-14 20:32:26 -05:00
|
|
|
}
|
2022-04-04 17:21:20 -05:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2023-03-19 16:09:47 -05:00
|
|
|
archiveArtifacts artifacts: 'build/libs/Scissors-paperclip-*.jar', fingerprint: true
|
2022-04-14 20:32:26 -05:00
|
|
|
junit 'Scissors-Server/build/test-results/test/*.xml'
|
|
|
|
junit 'Scissors-API/build/test-results/test/*.xml'
|
2022-04-14 20:40:24 -05:00
|
|
|
cleanWs()
|
2022-04-04 17:21:20 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|