Jenkins Test #12

This commit is contained in:
2025-10-08 18:10:28 +02:00
parent 2f5a970a4e
commit 14c07f8750

17
Jenkinsfile vendored
View File

@@ -89,17 +89,20 @@ pipeline {
post { post {
success { success {
script { script {
def urls = [] // Construit une liste de chaînes JSON manuellement
def urlsList = []
if (params.BUILD_TYPE in ['Both','Debug']) { if (params.BUILD_TYPE in ['Both','Debug']) {
urls << "${env.BUILD_URL}artifact/builds/KhaoticEngineReborn_Debug.zip" urlsList << "\"${env.BUILD_URL}artifact/builds/KhaoticEngineReborn_Debug.zip\""
}
if (params.BUILD_TYPE in ['Both','Release']) { if (params.BUILD_TYPE in ['Both','Release']) {
urls << "${env.BUILD_URL}artifact/builds/KhaoticEngineReborn_Release.zip" urlsList << "\"${env.BUILD_URL}artifact/builds/KhaoticEngineReborn_Release.zip\""
} }
def urlsJson = "[${urlsList.join(',')}]"
bat """ bat """
curl -X POST http://192.168.1.131:2500/ci-notify ^ curl -X POST http://192.168.1.131:2500/ci-notify ^
-H "Content-Type: application/json" ^ -H "Content-Type: application/json" ^
-d "{\\"userId\\": \\"${params.DISCORD_USER_ID}\\",\\"status\\": \\"success\\",\\"urls\\":${groovy.json.JsonOutput.toJson(urls)}}" -d "{\\"userId\\": \\"${params.DISCORD_USER_ID}\\",\\"status\\": \\"success\\",\\"urls\\":${urlsJson}}"
""" """
} }
} }
@@ -112,8 +115,6 @@ pipeline {
""" """
} }
} }
always {
cleanWs(deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true)
}
} }
} }