From a871192ce45aef7538c134d8c209e94fdc932e51 Mon Sep 17 00:00:00 2001 From: zontreck Date: Wed, 25 Dec 2024 01:56:30 -0700 Subject: [PATCH] Put if statement into script block --- Jenkinsfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f123277..1ee5cfc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,8 +42,12 @@ pipeline { always { archiveArtifacts artifacts: "Releases/*.zip" cleanWs() - if(env.DISCORD_URL != '') - discordSend customAvatarUrl: '', customFile: '', customUsername: '', description: 'This is an automated build of the modification for Vintage Story.', enableArtifactsList: true, footer: '', image: '', link: '', result: '', scmWebUrl: '', thumbnail: '', title: 'Vintage Storage Build Results', webhookURL: env.DISCORD_URL + script { + + if(env.DISCORD_URL != '') { + discordSend customAvatarUrl: '', customFile: '', customUsername: '', description: 'This is an automated build of the modification for Vintage Story.', enableArtifactsList: true, footer: '', image: '', link: '', result: '', scmWebUrl: '', thumbnail: '', title: 'Vintage Storage Build Results', webhookURL: env.DISCORD_URL + } + } } } }