Skip to content

Commit 8e220ad

Browse files
committed
[Build] Use Eclipse Platform Bot to commit built SWT binaries
Use the Eclipse Platform Bot to commit built SWT binaries with its correct email as recorded in the EF-API (https://api.eclipse.org/bots ) and that is also associated with it's Github account. Before the Eclipse Releng Bot was used for that, but with an incorrect email. Fixes - https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/6227
1 parent e5142d3 commit 8e220ad

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

Jenkinsfile

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -116,32 +116,31 @@ pipeline {
116116
script {
117117
def authorMail = sh(script: 'git log -1 --pretty=format:"%ce" HEAD', returnStdout: true)
118118
echo 'HEAD commit author: ' + authorMail
119-
if ('[email protected]'.equals(authorMail) && !params.forceNativeBuilds) {
119+
def buildBotMail = '[email protected]'
120+
if (buildBotMail.equals(authorMail) && !params.forceNativeBuilds) {
120121
// Prevent endless build-loops due to self triggering because of a previous automated build of natives and the associated updates.
121122
currentBuild.result = 'ABORTED'
122123
error('Abort build only triggered by automated SWT-natives update.')
123124
}
124-
}
125-
sh '''
125+
sh """
126+
java -version
126127
git version
127128
git lfs version
129+
git config --global user.email '${buildBotMail}'
130+
git config --global user.name 'Eclipse Platform Bot'
128131
git config --unset core.hooksPath # Jenkins disables hooks by default as security feature, but we need the hooks for LFS
129132
git lfs update # Install Git LFS hooks in repository, which has been skipped due to the initially nulled hookspath
130133
git lfs pull
131134
git fetch --all --tags --quiet
132135
git remote set-url --push origin [email protected]:eclipse-platform/eclipse.platform.swt.git
133-
'''
136+
"""
137+
}
134138
}
135139
}
136140
}
137141
stage('Check if SWT-binaries build is needed') {
138142
steps {
139143
dir('eclipse.platform.swt') {
140-
sh'''
141-
java -version
142-
git config --global user.email '[email protected]'
143-
git config --global user.name 'Eclipse Releng Bot'
144-
'''
145144
script {
146145
def allWS = ['cocoa', 'gtk', 'win32']
147146
def libraryFilePattern = [ 'cocoa' : 'libswt-*.jnilib', 'gtk' : 'libswt-*.so', 'win32' : 'swt-*.dll' ]

0 commit comments

Comments
 (0)