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