Add Jenkinsfile for CI and update build.gradle.kts
Introduce a Jenkinsfile to automate the build, archive, and notification stages in a pipeline. Additionally, modify build.gradle.kts to standardize the shadowJar output filename and remove versioning details from the filename.
This commit is contained in:
parent
abd5578be4
commit
e8c73ead90
20
Jenkinsfile
vendored
Normal file
20
Jenkinsfile
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage('Gradle') {
|
||||||
|
steps {
|
||||||
|
sh 'bash gradlew shadowJar -x test'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,7 +7,6 @@ plugins {
|
||||||
allprojects {
|
allprojects {
|
||||||
val build = System.getenv("BUILD_NUMBER") ?: "SNAPSHOT"
|
val build = System.getenv("BUILD_NUMBER") ?: "SNAPSHOT"
|
||||||
group = "com.alttd.proxydiscordlink"
|
group = "com.alttd.proxydiscordlink"
|
||||||
version = "1.0.1-BETA-$build"
|
|
||||||
description = "A velocity plugin to link Discord and Minecraft accounts."
|
description = "A velocity plugin to link Discord and Minecraft accounts."
|
||||||
|
|
||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
|
|
@ -54,14 +53,8 @@ dependencies {
|
||||||
tasks {
|
tasks {
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
archiveFileName.set("${project.name}-${project.version}.jar")
|
archiveFileName.set("discordLink.jar")
|
||||||
// exclude("net.kyori.adventure")
|
|
||||||
// exclude("net.kyori.examination")
|
|
||||||
minimize {
|
|
||||||
//exclude(dependency("net.kyori:.*:.*"))
|
|
||||||
}
|
|
||||||
listOf(
|
listOf(
|
||||||
// "net.kyori",
|
|
||||||
"net.dv8tion.jda"
|
"net.dv8tion.jda"
|
||||||
).forEach { relocate(it, "${rootProject.group}.lib.$it") }
|
).forEach { relocate(it, "${rootProject.group}.lib.$it") }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user