-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Build] Deploy RelEng scripts in master branch build
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
1 parent
59eb150
commit 8f88aef
Showing
1 changed file
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' | ||
|
@@ -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 { | ||
|