Scissors/Jenkinsfile

43 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2022-04-04 17:21:20 -05:00
pipeline {
agent any
environment {
2022-04-22 03:09:31 -05:00
GITHUB_BRANCH = "${BRANCH_NAME}"
}
2022-06-13 22:40:10 -05:00
stages {
stage('applyPatches') {
2022-04-04 17:21:20 -05:00
steps {
2022-04-07 00:05:56 -05:00
withGradle {
sh './gradlew applyPatches --no-daemon --refresh-dependencies'
}
}
}
stage('paperclipJar') {
steps {
withGradle {
sh './gradlew createReobfPaperclipJar --no-daemon --refresh-dependencies'
2022-04-07 00:05:56 -05:00
}
2023-06-04 19:29:41 -05:00
sh """
#!/bin/sh
2023-06-13 12:45:38 -05:00
BRANCH=\$(echo "\${BRANCH_NAME}" | sed 's/\\//_/g')
mv \${WORKSPACE}/build/libs/Scissors-paperclip-*.jar \${WORKSPACE}/build/libs/scissors-\${BRANCH}-\${BUILD_NUMBER}.jar
2023-06-04 19:37:57 -05:00
rm \${WORKSPACE}/build/libs/Scissors-bundler-*.jar
2023-06-04 19:29:41 -05:00
"""
2022-04-04 17:21:20 -05:00
}
}
2022-04-14 20:32:26 -05:00
stage('test') {
steps {
withGradle {
sh './gradlew test --no-daemon'
2022-04-14 20:32:26 -05:00
}
}
2022-07-05 17:11:25 -05:00
}
2022-04-04 17:21:20 -05:00
}
post {
always {
2023-06-04 19:34:49 -05:00
archiveArtifacts artifacts: 'build/libs/scissors-*.jar', fingerprint: true
2023-09-25 19:06:18 -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
}
}
}