Scissors/Jenkinsfile

43 lines
1.2 KiB
Plaintext
Raw Normal View History

2022-04-04 22:21:20 +00:00
pipeline {
agent any
2022-04-22 08:26:08 +00:00
environment {
GITHUB_BRANCH = "${BRANCH_NAME}"
}
2022-04-04 22:21:20 +00:00
stages {
stage('applyPatches') {
2022-04-04 22:21:20 +00:00
steps {
2022-04-07 05:05:56 +00:00
withGradle {
2022-06-27 03:47:49 +00:00
sh './gradlew applyPatches --no-daemon --refresh-dependencies'
}
}
}
stage('paperclipJar') {
steps {
withGradle {
2022-06-27 03:47:49 +00:00
sh './gradlew paperclipJar --no-daemon --refresh-dependencies'
2022-04-07 05:05:56 +00:00
}
2023-06-05 02:38:37 +00:00
sh """
#!/bin/sh
2023-07-01 20:34:20 +00:00
BRANCH=\$(echo "\${BRANCH_NAME}" | sed 's/\\//_/g')
mv \${WORKSPACE}/build/libs/Scissors-*.jar \${WORKSPACE}/build/libs/scissors-\${BRANCH}-\${BUILD_NUMBER}.jar
2023-06-05 02:38:37 +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'
}
}
}
2023-03-16 02:06:41 +00:00
}
post {
2022-04-04 22:21:20 +00:00
always {
2023-03-16 02:46:37 +00:00
archiveArtifacts artifacts: 'build/libs/*.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-03-15 21:06:03 +00:00
}