2022-04-04 22:21:20 +00:00
|
|
|
pipeline {
|
|
|
|
agent any
|
2022-04-22 07:42:28 +00:00
|
|
|
environment {
|
2022-04-22 08:09:31 +00:00
|
|
|
GITHUB_BRANCH = "${BRANCH_NAME}"
|
2022-04-22 07:42:28 +00:00
|
|
|
}
|
2022-06-14 03:40:10 +00:00
|
|
|
stages {
|
2022-04-07 21:07:56 +00:00
|
|
|
stage('applyPatches') {
|
2022-04-04 22:21:20 +00:00
|
|
|
steps {
|
2023-03-16 05:12:59 +00:00
|
|
|
scmSkip(deleteBuild: true)
|
2022-04-07 05:05:56 +00:00
|
|
|
withGradle {
|
2022-06-14 03:37:50 +00:00
|
|
|
sh './gradlew applyPatches --no-daemon --refresh-dependencies'
|
2022-04-07 21:07:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('paperclipJar') {
|
|
|
|
steps {
|
|
|
|
withGradle {
|
2022-06-14 03:37:50 +00:00
|
|
|
sh './gradlew createReobfPaperclipJar --no-daemon --refresh-dependencies'
|
2022-04-07 05:05:56 +00:00
|
|
|
}
|
2023-06-05 00:29:41 +00:00
|
|
|
sh """
|
|
|
|
#!/bin/sh
|
|
|
|
mv \${WORKSPACE}/build/libs/Scissors-paperclip-*.jar scissors-\${BUILD_NUMBER}.jar
|
|
|
|
"""
|
2022-04-04 22:21:20 +00:00
|
|
|
}
|
|
|
|
}
|
2022-04-15 01:32:26 +00:00
|
|
|
stage('test') {
|
|
|
|
steps {
|
|
|
|
withGradle {
|
2022-06-14 03:37:50 +00:00
|
|
|
sh './gradlew test --no-daemon'
|
2022-04-15 01:32:26 +00:00
|
|
|
}
|
|
|
|
}
|
2022-07-05 22:11:25 +00:00
|
|
|
}
|
2022-07-05 22:07:53 +00:00
|
|
|
stage('publish') {
|
|
|
|
when {
|
2023-03-16 04:46:12 +00:00
|
|
|
branch "1.19.4"
|
2022-07-05 22:07:53 +00:00
|
|
|
}
|
|
|
|
steps {
|
2023-03-16 05:12:59 +00: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-15 01:32:26 +00:00
|
|
|
}
|
2022-04-04 22:21:20 +00:00
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
2023-06-05 00:29:41 +00:00
|
|
|
archiveArtifacts artifacts: 'build/libs/scissors-${BUILD_NUMBER}.jar', fingerprint: true
|
2022-04-15 01:32:26 +00:00
|
|
|
junit 'Scissors-Server/build/test-results/test/*.xml'
|
|
|
|
junit 'Scissors-API/build/test-results/test/*.xml'
|
2022-04-15 01:40:24 +00:00
|
|
|
cleanWs()
|
2022-04-04 22:21:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|