File tree Expand file tree Collapse file tree 2 files changed +12
-37
lines changed
Expand file tree Collapse file tree 2 files changed +12
-37
lines changed Original file line number Diff line number Diff line change @@ -316,21 +316,29 @@ pipeline {
316316 }
317317 steps {
318318 sshagent([' github-bot-ssh' ]) {
319- withAnt(installation : ' apache-ant-latest' , jdk : ' openjdk-jdk11-latest' ) { // nashorn javascript-engine required in ant-scripts
319+ script {
320+ def swtNativesTag = null ;
321+ dir (' eclipse.platform.swt.binaries' ) {
322+ swtNativesTag = sh(script : ' git describe --abbrev=0 --tags --match v[0-9][0-9][0-9][0-9]*' , returnStdout : true ). strip()
323+ }
324+ echo " swtNativesTag: ${ swtNativesTag} "
320325 sh '''
321326 # Check for the master-branch as late as possible to have as much of the same behaviour as possible
322327 if [[ "${BRANCH_NAME}" == master ]] || [[ "${BRANCH_NAME}" =~ R[0-9]+_[0-9]+(_[0-9]+)?_maintenance ]]; then
323328 if [[ ${skipCommit} != true ]]; then
324329
330+ #Don't rebase and just fail in case another commit has been pushed to the master/maintanance branch in the meantime
331+
325332 pushd eclipse.platform.swt
326- git fetch origin refs/heads/${BRANCH_NAME}:refs/remotes/origin/${BRANCH_NAME}
333+ git push origin HEAD:refs/heads/${BRANCH_NAME}
334+ git push origin refs/tags/${swtNativesTag}
327335 popd
328336
329337 pushd eclipse.platform.swt.binaries
330- git fetch origin refs/heads/${BRANCH_NAME}:refs/remotes/origin/${BRANCH_NAME}
338+ git push origin HEAD:refs/heads/${BRANCH_NAME}
339+ git push origin refs/tags/${swtNativesTag}
331340 popd
332341
333- ant -f eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml push_remote_from_workspace
334342 exit 0
335343 else
336344 echo Committing is skipped
Original file line number Diff line number Diff line change 963963 <!-- targets to run the builds on the Eclipse Foundation Hudson in master-slave setup -->
964964 <!-- ******************************************************************************** -->
965965
966- <target name =" push_remote_from_workspace" depends =" get_tag" >
967- <exec dir =" ${repo.src}" executable =" git" failonerror =" true" >
968- <arg line =" fetch" />
969- </exec >
970- <exec dir =" ${repo.src}" executable =" git" failonerror =" true" >
971- <arg line =" status" />
972- </exec >
973- <exec dir =" ${repo.src}" executable =" git" failonerror =" true" >
974- <arg line =" rebase origin/${TAG}" />
975- </exec >
976- <exec dir =" ${repo.src}" executable =" git" failonerror =" true" >
977- <arg line =" push origin HEAD:refs/heads/${TAG}" />
978- </exec >
979- <exec dir =" ${repo.bin}" executable =" git" failonerror =" true" >
980- <arg line =" fetch" />
981- </exec >
982- <exec dir =" ${repo.bin}" executable =" git" failonerror =" true" >
983- <arg line =" status" />
984- </exec >
985- <exec dir =" ${repo.bin}" executable =" git" failonerror =" true" >
986- <arg line =" rebase origin/${TAG}" />
987- </exec >
988- <exec dir =" ${repo.bin}" executable =" git" failonerror =" true" >
989- <arg line =" push origin HEAD:refs/heads/${TAG}" />
990- </exec >
991- <exec dir =" ${repo.src}" executable =" git" failonerror =" true" >
992- <arg line =" push origin refs/tags/${swt_tag}" />
993- </exec >
994- <exec dir =" ${repo.bin}" executable =" git" failonerror =" true" >
995- <arg line =" push origin refs/tags/${swt_tag}" />
996- </exec >
997- </target >
998-
999966 <target name =" new_build_with_create_file" depends =" check_build_changed, check_natives_changed" if =" build_changed" >
1000967 <!-- Update the version files -->
1001968 <property name =" increment_version_target" value =" increment_version" />
You can’t perform that action at this time.
0 commit comments