Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -316,27 +316,35 @@ pipeline {
}
steps {
sshagent(['github-bot-ssh']) {
withAnt(installation: 'apache-ant-latest', jdk: 'openjdk-jdk11-latest') { // nashorn javascript-engine required in ant-scripts
sh '''
script {
def newSWTNativesTag = null;
dir ('eclipse.platform.swt.binaries') {
newSWTNativesTag = sh(script: 'git describe --abbrev=0 --tags --match v[0-9][0-9][0-9][0-9]*', returnStdout: true).strip()
}
echo "newSWTNativesTag: ${newSWTNativesTag}"
sh """
# Check for the master-branch as late as possible to have as much of the same behaviour as possible
if [[ "${BRANCH_NAME}" == master ]] || [[ "${BRANCH_NAME}" =~ R[0-9]+_[0-9]+(_[0-9]+)?_maintenance ]]; then
if [[ '${BRANCH_NAME}' == master ]] || [[ '${BRANCH_NAME}' =~ R[0-9]+_[0-9]+(_[0-9]+)?_maintenance ]]; then
if [[ ${skipCommit} != true ]]; then

#Don't rebase and just fail in case another commit has been pushed to the master/maintanance branch in the meantime

pushd eclipse.platform.swt
git fetch origin refs/heads/${BRANCH_NAME}:refs/remotes/origin/${BRANCH_NAME}
git push origin HEAD:refs/heads/${BRANCH_NAME}
git push origin refs/tags/${newSWTNativesTag}
popd

pushd eclipse.platform.swt.binaries
git fetch origin refs/heads/${BRANCH_NAME}:refs/remotes/origin/${BRANCH_NAME}
git push origin HEAD:refs/heads/${BRANCH_NAME}
git push origin refs/tags/${newSWTNativesTag}
popd

ant -f eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml push_remote_from_workspace
exit 0
else
echo Committing is skipped
fi
else
echo Skip pushing changes of native-binaries for branch "${BRANCH_NAME}"
echo Skip pushing changes of native-binaries for branch '${BRANCH_NAME}'
fi
# The commits are not pushed. At least list them, so one can check if the result is as expected.
pushd eclipse.platform.swt
Expand All @@ -345,7 +353,7 @@ pipeline {
pushd eclipse.platform.swt.binaries
git log -n 2
popd
'''
"""
}
}
}
Expand Down
33 changes: 0 additions & 33 deletions bundles/org.eclipse.swt/buildSWT.xml
Original file line number Diff line number Diff line change
Expand Up @@ -963,39 +963,6 @@
<!-- targets to run the builds on the Eclipse Foundation Hudson in master-slave setup -->
<!-- ******************************************************************************** -->

<target name="push_remote_from_workspace" depends="get_tag">
<exec dir="${repo.src}" executable="git" failonerror="true">
<arg line="fetch"/>
</exec>
<exec dir="${repo.src}" executable="git" failonerror="true">
<arg line="status"/>
</exec>
<exec dir="${repo.src}" executable="git" failonerror="true">
<arg line="rebase origin/${TAG}"/>
</exec>
<exec dir="${repo.src}" executable="git" failonerror="true">
<arg line="push origin HEAD:refs/heads/${TAG}"/>
</exec>
<exec dir="${repo.bin}" executable="git" failonerror="true">
<arg line="fetch"/>
</exec>
<exec dir="${repo.bin}" executable="git" failonerror="true">
<arg line="status"/>
</exec>
<exec dir="${repo.bin}" executable="git" failonerror="true">
<arg line="rebase origin/${TAG}"/>
</exec>
<exec dir="${repo.bin}" executable="git" failonerror="true">
<arg line="push origin HEAD:refs/heads/${TAG}"/>
</exec>
<exec dir="${repo.src}" executable="git" failonerror="true">
<arg line="push origin refs/tags/${swt_tag}"/>
</exec>
<exec dir="${repo.bin}" executable="git" failonerror="true">
<arg line="push origin refs/tags/${swt_tag}"/>
</exec>
</target>

<target name="new_build_with_create_file" depends="check_build_changed, check_natives_changed" if="build_changed">
<!-- Update the version files -->
<property name="increment_version_target" value="increment_version"/>
Expand Down