HexCasting/Jenkinsfile
2022-05-21 16:11:38 -05:00

39 lines
No EOL
887 B
Groovy

#!/usr/bin/env groovy
pipeline {
agent any
tools {
jdk "jdk-17.0.1"
}
environment {
discordWebhook = credentials('discordWebhook')
}
stages {
stage('Clean') {
steps {
echo 'Cleaning Project'
sh 'chmod +x gradlew'
sh './gradlew clean'
}
}
stage('Build') {
steps {
echo 'Building'
sh './gradlew :Forge:build :Fabric:build'
}
}
stage('Publish') {
when { branch 'main' }
steps {
echo 'Deploying to Maven'
sh './gradlew publish sendWebhook'
}
}
}
post {
always {
archiveArtifacts 'Forge/build/libs/**.jar'
archiveArtifacts 'Fabric/build/libs/**.jar'
}
}
}