Flywheel/Jenkinsfile
Jozufozu 0288b37b22 There's always another secret
- Parse a build_secrets.properties file provided by CI
- Expand archive glob to include api artifacts
2025-01-26 17:09:37 -08:00

51 lines
1.3 KiB
Groovy

#!/usr/bin/env groovy
pipeline {
agent any
tools {
jdk "jdk-17.0.1"
}
stages {
stage('Setup') {
steps {
echo 'Setup Project'
sh 'chmod +x gradlew'
sh './gradlew clean'
}
}
stage('Build') {
steps {
withCredentials([
// build_secrets is parsed in SubprojectExtension#loadSecrets
file(credentialsId: 'build_secrets', variable: 'ORG_GRADLE_PROJECT_secretFile'),
]) {
echo 'Building project.'
sh './gradlew build publish --stacktrace --warn'
}
}
}
}
post {
always {
archiveArtifacts artifacts: '**/build/libs/**/*.jar', fingerprint: true
withCredentials([
string(credentialsId: 'discord_webhook_url', variable: 'DISCORD_URL')
]) {
echo 'Notifying Discord..'
discordSend description: "Build: #${currentBuild.number}", link: env.BUILD_URL, result: currentBuild.currentResult, title: env.JOB_NAME, webhookURL: env.DISCORD_URL, showChangeset: true, enableArtifactsList: true
}
}
}
}