Merge remote-tracking branch 'origin/mc1.20.1/feature-dev' into mc1.21.1/dev

This commit is contained in:
zelophed 2025-02-27 18:01:52 +01:00
commit 4be32acee9
2 changed files with 64 additions and 0 deletions

52
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,52 @@
#!/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([
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: false
}
}
}
}

View file

@ -263,6 +263,18 @@ publishing {
}
}
repositories {
if (project.hasProperty("mavenUsername") && project.hasProperty("mavenPassword") && project.hasProperty("mavenURL")) {
project.logger.lifecycle("Adding maven from secrets")
maven {
credentials {
username = project.property("mavenUsername") as String
password = project.property("mavenPassword") as String
}
url = URI.create(project.property("mavenURL") as String)
}
}
if (project.hasProperty('mavendir')) {
maven { url = mavendir }
}