Add Jenkinsfile

This commit is contained in:
Len 2024-01-17 10:05:05 +01:00
parent 366860ac55
commit 337493236e
3 changed files with 26 additions and 3 deletions

20
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,20 @@
pipeline {
agent any
stages {
stage('Gradle') {
steps {
sh './gradlew build'
}
}
stage('Archive') {
steps {
archiveArtifacts artifacts: 'build/libs/', followSymlinks: false
}
}
stage('discord') {
steps {
discordSend description: "Build: ${BUILD_NUMBER}", showChangeset: true, result: currentBuild.currentResult, title: currentBuild.fullProjectName, webhookURL: env.discordwebhook
}
}
}
}

View File

@ -10,7 +10,7 @@ plugins {
}
allprojects {
group = "com.alttd.cometskyblock"
version = System.getenv("BUILD_NUMBER") ?: gitCommit()
version = "Build-" + (System.getenv("BUILD_NUMBER") ?: gitCommit())
description = "Next generation Skyblock Adventure"
}
@ -42,7 +42,7 @@ tasks {
}
}
listOf(
"org.spongepowered.configurate"
"xyz.destro.utheo.comet"
).forEach { relocate(it, "${rootProject.group}.lib.${it.substringAfterLast(".")}") }
}
@ -85,7 +85,7 @@ fun gitCommit(): String {
commandLine = "git rev-parse --short HEAD".split(" ")
standardOutput = os
}
return String(os.toByteArray()).trim()
return "git-" + String(os.toByteArray()).trim()
}
fun download(link: String, path: String) {

View File

@ -6,6 +6,9 @@ plugins {
dependencies {
implementation(project(":api")) // API
compileOnly("com.alttd:Comet-API:1.20.4-R0.1-SNAPSHOT")
compileOnly("org.projectlombok:lombok:1.18.24")
annotationProcessor("org.projectlombok:lombok:1.18.24")
}
tasks {