65 lines
1.8 KiB
Plaintext
65 lines
1.8 KiB
Plaintext
def projectName = "CraterLib";
|
|
def projectIcon = "https://cdn.modrinth.com/data/Nn8Wasaq/a172c634683a11a2e9ae593e56eba7885743bb44.png";
|
|
def JDK = "21";
|
|
def majorMc = "Port";
|
|
def modLoaders = "neoforge|fabric|quilt";
|
|
def supportedMc = "1.21";
|
|
def reltype = "port";
|
|
|
|
pipeline {
|
|
agent {
|
|
docker {
|
|
image "registry.firstdark.dev/java${JDK}:latest"
|
|
alwaysPull true
|
|
args '-v gradle-cache:/home/gradle/.gradle'
|
|
}
|
|
}
|
|
|
|
environment {
|
|
GRADLE_USER_HOME = '/home/gradle/.gradle'
|
|
}
|
|
|
|
stages {
|
|
stage("Notify Discord") {
|
|
steps {
|
|
discordSend webhookURL: env.SSS_WEBHOOK,
|
|
title: "Deploy Started: ${projectName} ${majorMc} Deploy #${BUILD_NUMBER}",
|
|
link: env.BUILD_URL,
|
|
result: 'SUCCESS',
|
|
description: "Build: [${BUILD_NUMBER}](${env.BUILD_URL})"
|
|
}
|
|
}
|
|
|
|
stage("Prepare") {
|
|
steps {
|
|
sh "chmod +x ./gradlew"
|
|
sh "./gradlew build -PreleaseType=port"
|
|
}
|
|
}
|
|
|
|
stage("Publish to Maven") {
|
|
steps {
|
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
|
sh "./gradlew publish -PreleaseType=${reltype}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
post {
|
|
always {
|
|
sh "./gradlew --stop"
|
|
|
|
fddsnapshotter apiKey: env.PLATFORM_KEY,
|
|
projectSlug: "craterlib",
|
|
projectName: "${projectName}",
|
|
projectIcon: "${projectIcon}",
|
|
modLoaders: "${modLoaders}",
|
|
minecraftVersions: "${supportedMc}",
|
|
failWebhook: env.SSS_WEBHOOK,
|
|
publishWebhooks: "${env.SSS_WEBHOOK}|${env.FDD_WH}"
|
|
|
|
deleteDir()
|
|
}
|
|
}
|
|
} |