[BUG] Fix 1.21 jenkins config
This commit is contained in:
@@ -26,25 +26,33 @@ pipeline {
|
|||||||
}
|
}
|
||||||
stage("Prepare") {
|
stage("Prepare") {
|
||||||
steps {
|
steps {
|
||||||
sh "chmod +x ./gradlew"
|
dir("${WORKSPACE}/${majorMc}") {
|
||||||
sh "./gradlew clean"
|
sh "chmod +x ./gradlew"
|
||||||
|
sh "./gradlew clean"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("Publish to Modrinth/Curseforge") {
|
stage("Publish to Modrinth/Curseforge") {
|
||||||
steps {
|
steps {
|
||||||
sh "./gradlew publishMod -Prelease=true"
|
dir("${WORKSPACE}/${majorMc}") {
|
||||||
|
sh "./gradlew publishMod -Prelease=true"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("Publish to Maven") {
|
stage("Publish to Maven") {
|
||||||
steps {
|
steps {
|
||||||
sh "./gradlew publish -Prelease=true"
|
dir("${WORKSPACE}/${majorMc}") {
|
||||||
|
sh "./gradlew publish -Prelease=true"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
sh "./gradlew --stop"
|
dir("${WORKSPACE}/${majorMc}") {
|
||||||
deleteDir()
|
sh "./gradlew --stop"
|
||||||
|
deleteDir()
|
||||||
|
}
|
||||||
|
|
||||||
discordSend webhookURL: env.FDD_WH_ADMIN,
|
discordSend webhookURL: env.FDD_WH_ADMIN,
|
||||||
title: "CraterLib Port Deploy #${BUILD_NUMBER}",
|
title: "CraterLib Port Deploy #${BUILD_NUMBER}",
|
||||||
|
@@ -32,15 +32,19 @@ pipeline {
|
|||||||
|
|
||||||
stage("Prepare") {
|
stage("Prepare") {
|
||||||
steps {
|
steps {
|
||||||
sh "chmod +x ./gradlew"
|
dir("${WORKSPACE}/${majorMc}") {
|
||||||
sh "./gradlew build -PreleaseType=${reltype}"
|
sh "chmod +x ./gradlew"
|
||||||
|
sh "./gradlew build -PreleaseType=${reltype}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage("Publish to Maven") {
|
stage("Publish to Maven") {
|
||||||
steps {
|
steps {
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
dir ("${WORKSPACE}/${majorMc}") {
|
||||||
sh "./gradlew publish -PreleaseType=${reltype}"
|
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
sh "./gradlew publish -PreleaseType=${reltype}"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,19 +52,21 @@ pipeline {
|
|||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
sh "./gradlew --stop"
|
dir("${WORKSPACE}/${majorMc}") {
|
||||||
archiveArtifacts artifacts: 'artifacts/*.jar'
|
sh "./gradlew --stop"
|
||||||
|
archiveArtifacts artifacts: 'artifacts/*.jar'
|
||||||
|
|
||||||
fddsnapshotter apiKey: env.PLATFORM_KEY,
|
fddsnapshotter apiKey: env.PLATFORM_KEY,
|
||||||
projectSlug: "craterlib",
|
projectSlug: "craterlib",
|
||||||
projectName: "${projectName}",
|
projectName: "${projectName}",
|
||||||
projectIcon: "${projectIcon}",
|
projectIcon: "${projectIcon}",
|
||||||
modLoaders: "${modLoaders}",
|
modLoaders: "${modLoaders}",
|
||||||
minecraftVersions: "${supportedMc}",
|
minecraftVersions: "${supportedMc}",
|
||||||
failWebhook: env.SSS_WEBHOOK,
|
failWebhook: env.SSS_WEBHOOK,
|
||||||
publishWebhooks: "${env.SSS_WEBHOOK}|${env.FDD_WH}"
|
publishWebhooks: "${env.SSS_WEBHOOK}|${env.FDD_WH}"
|
||||||
|
|
||||||
deleteDir()
|
deleteDir()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
42
patches/1.21/.jenkins/Jenkinsfile.deploy.patch
Normal file
42
patches/1.21/.jenkins/Jenkinsfile.deploy.patch
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
--- a/.jenkins/Jenkinsfile.deploy
|
||||||
|
+++ b/.jenkins/Jenkinsfile.deploy
|
||||||
|
@@ -26,25 +26,33 @@
|
||||||
|
}
|
||||||
|
stage("Prepare") {
|
||||||
|
steps {
|
||||||
|
- sh "chmod +x ./gradlew"
|
||||||
|
- sh "./gradlew clean"
|
||||||
|
+ dir("${WORKSPACE}/${majorMc}") {
|
||||||
|
+ sh "chmod +x ./gradlew"
|
||||||
|
+ sh "./gradlew clean"
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("Publish to Modrinth/Curseforge") {
|
||||||
|
steps {
|
||||||
|
- sh "./gradlew publishMod -Prelease=true"
|
||||||
|
+ dir("${WORKSPACE}/${majorMc}") {
|
||||||
|
+ sh "./gradlew publishMod -Prelease=true"
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("Publish to Maven") {
|
||||||
|
steps {
|
||||||
|
- sh "./gradlew publish -Prelease=true"
|
||||||
|
+ dir("${WORKSPACE}/${majorMc}") {
|
||||||
|
+ sh "./gradlew publish -Prelease=true"
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
- sh "./gradlew --stop"
|
||||||
|
- deleteDir()
|
||||||
|
+ dir("${WORKSPACE}/${majorMc}") {
|
||||||
|
+ sh "./gradlew --stop"
|
||||||
|
+ deleteDir()
|
||||||
|
+ }
|
||||||
|
|
||||||
|
discordSend webhookURL: env.FDD_WH_ADMIN,
|
||||||
|
title: "CraterLib Port Deploy #${BUILD_NUMBER}",
|
@@ -9,3 +9,62 @@
|
|||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
|
@@ -32,15 +32,19 @@
|
||||||
|
|
||||||
|
stage("Prepare") {
|
||||||
|
steps {
|
||||||
|
- sh "chmod +x ./gradlew"
|
||||||
|
- sh "./gradlew build -PreleaseType=${reltype}"
|
||||||
|
+ dir("${WORKSPACE}/${majorMc}") {
|
||||||
|
+ sh "chmod +x ./gradlew"
|
||||||
|
+ sh "./gradlew build -PreleaseType=${reltype}"
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage("Publish to Maven") {
|
||||||
|
steps {
|
||||||
|
- catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
- sh "./gradlew publish -PreleaseType=${reltype}"
|
||||||
|
+ dir ("${WORKSPACE}/${majorMc}") {
|
||||||
|
+ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
|
||||||
|
+ sh "./gradlew publish -PreleaseType=${reltype}"
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -48,19 +52,21 @@
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
- sh "./gradlew --stop"
|
||||||
|
- archiveArtifacts artifacts: 'artifacts/*.jar'
|
||||||
|
-
|
||||||
|
- 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()
|
||||||
|
+ dir("${WORKSPACE}/${majorMc}") {
|
||||||
|
+ sh "./gradlew --stop"
|
||||||
|
+ archiveArtifacts artifacts: 'artifacts/*.jar'
|
||||||
|
+
|
||||||
|
+ 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()
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user