Skip to content

Commit f92b752

Browse files
committed
[Build] Remove check for SWT native binary rebuild commit
Currently the build is aborted if the branch tip is at a commit, which was committed with the email of the 'Eclipse Platform Bot'. This was done with the intention to prevent (endless) rebuilds after a commit for a SWT native binary rebuild was pushed by the bot. But because that bot is also used for other kind of commits, this test leads to false positives. An in-depth analysis showed that the pipeline does in fact not get into an endless native rebuild loop in case that check is removed. Only one new build is triggered, when a commit for a SWT native binary rebuild is pushed (as usual for a push), which does not rebuild the native binaries again, because the latest SWT-native-binary tag points to the then HEAD commit. So this reworks the pipeline to just remove that check. This implicitly also fixes the currently not working check if a native rebuild is enforced, when testing if the build can be skipped.
1 parent b339485 commit f92b752

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

Jenkinsfile

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -113,28 +113,18 @@ pipeline {
113113
steps {
114114
dir('eclipse.platform.swt') {
115115
checkout scm
116-
script {
117-
def authorMail = sh(script: 'git log -1 --pretty=format:"%ce" HEAD', returnStdout: true)
118-
echo 'HEAD commit author: ' + authorMail
119-
def buildBotMail = '[email protected]'
120-
if (buildBotMail.equals(authorMail) && !params.forceNativeBuilds) {
121-
// Prevent endless build-loops due to self triggering because of a previous automated build of natives and the associated updates.
122-
currentBuild.result = 'ABORTED'
123-
error('Abort build only triggered by automated SWT-natives update.')
124-
}
125-
sh """
116+
sh '''
126117
java -version
127118
git version
128119
git lfs version
129-
git config --global user.email '${buildBotMail}'
120+
git config --global user.email '[email protected]'
130121
git config --global user.name 'Eclipse Platform Bot'
131122
git config --unset core.hooksPath # Jenkins disables hooks by default as security feature, but we need the hooks for LFS
132123
git lfs update # Install Git LFS hooks in repository, which has been skipped due to the initially nulled hookspath
133124
git lfs pull
134125
git fetch --all --tags --quiet
135126
git remote set-url --push origin [email protected]:eclipse-platform/eclipse.platform.swt.git
136-
"""
137-
}
127+
'''
138128
}
139129
}
140130
}

0 commit comments

Comments
 (0)