@@ -44,7 +44,7 @@ def runOnNativeBuildAgent(String platform, Closure body) {
4444
4545/* * Returns the download URL of the JDK against whose C headers (in the 'include/' folder) and native libraries the SWT natives are compiled.*/
4646def getNativeJdkUrl (String os , String arch ) { // To update the used JDK version update the URL template below
47- if (' win32' . equals(os) && ' aarch64' . equals(arch)) {
47+ if (' win32' . equals(os) && ' aarch64' . equals(arch)) {
4848 // Temporary workaround until there are official Temurin GA releases for Windows on ARM that can be consumed through JustJ
4949 dir(" ${ WORKSPACE} /repackage-win32.aarch64-jdk" ) {
5050 sh """
@@ -86,7 +86,7 @@ def Set NATIVES_CHANGED = []
8686
8787pipeline {
8888 options {
89- skipDefaultCheckout() // Specialiced checkout is performed below
89+ skipDefaultCheckout() // Specialized checkout is performed below
9090 timestamps()
9191 timeout(time : 180 , unit : ' MINUTES' )
9292 buildDiscarder(logRotator(numToKeepStr : ' master' . equals(env. BRANCH_NAME ) ? ' 20' : ' 5' , artifactNumToKeepStr: ' master' . equals(env. BRANCH_NAME ) ? ' 3' : ' 1' ))
@@ -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 (' eclipse-releng-bot@eclipse.org' . equals(authorMail) && ! params. forceNativeBuilds) {
120- // Prevent endless build-loops due to self triggering because of a previous automated build of SWT-natives and the associated updates.
119+ def buildBotMail = ' platform-bot@eclipse.org'
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.
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 git@github.com: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 'eclipse-releng-bot@eclipse.org'
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' ]
@@ -157,7 +156,7 @@ pipeline {
157156 '''
158157 def sourceFoldersProps = readProperties(file : ' nativeSourceFolders.properties' )
159158 def sources = sourceFoldersProps. collectEntries{ k , src -> [ k, src. split(' ,' ). collect{ f -> ' \' ' + f + ' \' ' }. join(' ' ) ] }
160- for (ws in allWS) {
159+ for (ws in allWS) {
161160 def diff = sh(script : " git diff HEAD ${ swtTag} ${ sources.src_common} ${ sources['src_' + ws]} " , returnStdout : true )
162161 if (! diff. trim(). isEmpty()) {
163162 NATIVES_CHANGED + = ws
@@ -175,7 +174,7 @@ pipeline {
175174 sed -i -e "s/rev=${ versions.rev} /rev=${ versions.new_rev} /g" \
176175 'bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak'
177176 """
178- for (ws in allWS) {
177+ for (ws in allWS) {
179178 if (NATIVES_CHANGED . contains(ws)) {
180179 sh """
181180 # Delete native binaries to be replaced by subsequent binaries build
@@ -239,7 +238,7 @@ pipeline {
239238 script {
240239 def (ws, os, arch) = env. PLATFORM . split(' \\ .' )
241240 dir(" jdk-download-${ ws} .${ arch} " ) {
242- // Fetch the JDK, which provides the C header- files and shared native libraries, against which the natives are build .
241+ // Fetch the JDK, which provides the C header files and shared native libraries against which the native code is built .
243242 sh " curl ${ getNativeJdkUrl(os, arch)} | tar -xzf - include/ lib/"
244243 stash name :" jdk.resources.${ ws} .${ arch} " , includes : " include/,lib/"
245244 deleteDir()
@@ -382,11 +381,11 @@ pipeline {
382381 sshagent([' github-bot-ssh' ]) {
383382 dir(' eclipse.platform.swt' ) {
384383 sh """
385- # Check for the master-branch as late as possible to have as much of the same behaviour as possible
384+ # Check for the master-branch as late as possible to have as much of the same behavior as possible
386385 if [[ '${ BRANCH_NAME} ' == master ]] || [[ '${ BRANCH_NAME} ' =~ R[0-9]+_[0-9]+(_[0-9]+)?_maintenance ]]; then
387386 if [[ ${ params.skipCommit} != true ]]; then
388387
389- # Don't rebase and just fail in case another commit has been pushed to the master/maintanance branch in the meantime
388+ # Don't rebase and just fail in case another commit has been pushed to the master/maintenance branch in the meantime
390389 git push origin HEAD:refs/heads/${ BRANCH_NAME}
391390 git push origin refs/tags/${ getLatestGitTag()}
392391
0 commit comments