diff --git a/Jenkinsfile b/Jenkinsfile index 3c8fae112..61a15ce68 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -18,7 +18,7 @@ builders['Build swift Linux'] = { 'BITROCK_CUSTOMIZE=/opt/installbuilder/autoupdate/bin/customize.run']) { sh """ cp ~/vatsim.json . - python3 -u scripts/jenkins.py -w 64 -t gcc -d -j 2 -e ${getEolInMonth()} -q SWIFT_CONFIG_JSON+=vatsim.json + python3 -u scripts/jenkins.py -w 64 -t gcc -d -j 2 -e ${getEolInMonth()} ${shouldUploadSymbols()} -q SWIFT_CONFIG_JSON+=vatsim.json """ } @@ -73,7 +73,7 @@ builders['Build swift MacOS'] = { 'BITROCK_CUSTOMIZE=/Applications/BitRockInstallBuilderQt/autoupdate/bin/customize.sh']) { sh """ cp ~/vatsim.json . - python -u scripts/jenkins.py -w 64 -t clang -d -j2 -e ${getEolInMonth()} -q SWIFT_CONFIG_JSON+=vatsim.json + python -u scripts/jenkins.py -w 64 -t clang -d -j2 -e ${getEolInMonth()} ${shouldUploadSymbols()} -q SWIFT_CONFIG_JSON+=vatsim.json """ } @@ -118,7 +118,7 @@ builders['Build swift Win32'] = { stage('Win32 Build') { bat """ copy c:\\var\\vatsim.json . - python -u scripts/jenkins.py -w 32 -t msvc -d -e ${getEolInMonth()} -q SWIFT_CONFIG_JSON+=vatsim.json + python -u scripts/jenkins.py -w 32 -t msvc -d -e ${getEolInMonth()} ${shouldUploadSymbols()} -q SWIFT_CONFIG_JSON+=vatsim.json """ warnings consoleParsers: [[parserName: 'MSBuild']], unstableTotalAll: '0' @@ -163,7 +163,7 @@ builders['Build swift Win64'] = { stage('Win64 Build') { bat """ copy c:\\var\\vatsim.json . - python -u scripts/jenkins.py -w 64 -t msvc -d -e ${getEolInMonth()} -q SWIFT_CONFIG_JSON+=vatsim.json + python -u scripts/jenkins.py -w 64 -t msvc -d -e ${getEolInMonth()} ${shouldUploadSymbols()} -q SWIFT_CONFIG_JSON+=vatsim.json """ warnings consoleParsers: [[parserName: 'MSBuild']], unstableTotalAll: '0' @@ -398,6 +398,18 @@ def getEolInMonth() { } } +def shouldUploadSymbols() { + def regexDevBranch = /develop\/\d+\.\d+\.\d+/ + def regexReleaseBranch = /release\/\d+\.\d+/ + if (env.BRANCH_NAME && env.BRANCH_NAME ==~ regexDevBranch) { + return '-u' + } else if (env.BRANCH_NAME && env.BRANCH_NAME ==~ regexReleaseBranch) { + return '-u' + } else { + return '' + } +} + def killDBusDaemon() { bat ''' tasklist /FI "IMAGENAME eq dbus-daemon.exe" 2>NUL | find /I /N "dbus-daemon.exe">NUL diff --git a/scripts/jenkins.py b/scripts/jenkins.py index 7f6806811..62c0df3c2 100644 --- a/scripts/jenkins.py +++ b/scripts/jenkins.py @@ -378,7 +378,7 @@ def main(argv): tool_chain = '' dev_build = False jobs = None - upload_symbols = True + upload_symbols = False eolInMonth = 0 qmake_args = []