Scissors/Jenkinsfile

44 lines
1.3 KiB
Plaintext
Raw Normal View History

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