Skip to content

Commit

Permalink
[Build] Deploy RelEng scripts in master branch build
Browse files Browse the repository at this point in the history
This ensures that releng scripts are always updated on the
download-server as soon as they change in the git repository.
Furthermore this avoids the need for the separate Jenkins job to deploy
the scripts.
  • Loading branch information
HannesWell committed Dec 11, 2024
1 parent 59eb150 commit 8f88aef
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pipeline {
sh 'git submodule foreach "git fetch origin master; git checkout FETCH_HEAD"'
}
}
stage('Deploy eclipse-platform-parent pom and eclipse-sdk target') {
stage('Deploy parent-pom and SDK-target') {
when {
anyOf {
branch 'master'
Expand All @@ -31,6 +31,45 @@ pipeline {
sh 'mvn clean deploy -f eclipse.platform.releng.prereqs.sdk/pom.xml'
}
}
stage('Deploy RelEng scripts') {
when {
branch 'master'
}
steps {
sshagent(['projects-storage.eclipse.org-bot-ssh']) {
sh '''
serverBase='/home/data/httpd/download.eclipse.org/eclipse/'
serverStaging="${serverBase}/relengScripts-staging"
ssh [email protected] rm -rf ${serverStaging}
ssh [email protected] mkdir -p ${serverStaging}
scp -r production [email protected]:${serverStaging}
scp -r scripts [email protected]:${serverStaging}
scp -r cje-production [email protected]:${serverStaging}
pushd eclipse.platform.releng.tychoeclipsebuilder/eclipse
scp -r buildScripts [email protected]:${serverStaging}
popd
pushd eclipse.platform.releng.tychoeclipsebuilder
scp -r entitlement [email protected]:${serverStaging}
popd
#To minimize 'downtime', all files are first transfered to a staging folder on the server,
# then the existing folder is moved to 'disposal' and the 'staging' to the desired target.
# Eventually the previously existing content is deleted with the 'disposal'-folder.
serverTarget="${serverBase}/relengScripts"
serverDisposal="${serverBase}/relengScripts-disposal"
ssh [email protected] "\
mv -f ${serverTarget} ${serverDisposal} ;\
mv -f ${serverStaging} ${serverTarget} &&\
rm -rf ${serverDisposal}"
'''
}
}
}
stage('Build') {
when { not { branch pattern: "prepare_R.*", comparator: "REGEXP" } }
steps {
Expand Down

0 comments on commit 8f88aef

Please sign in to comment.