diff options
author | Quentin Le Menez | 2017-06-29 20:40:44 +0000 |
---|---|---|
committer | Quentin Le Menez | 2017-06-29 20:44:12 +0000 |
commit | 737eddd9e51ba820d2e6afce4392f41425c77c80 (patch) | |
tree | 97119482da03678cc3c85e7d875f9f87a5fff1d8 /releng | |
parent | b6bb47768e8e15cc9f737cdae5cb939e530c634f (diff) | |
download | org.eclipse.papyrus-737eddd9e51ba820d2e6afce4392f41425c77c80.tar.gz org.eclipse.papyrus-737eddd9e51ba820d2e6afce4392f41425c77c80.tar.xz org.eclipse.papyrus-737eddd9e51ba820d2e6afce4392f41425c77c80.zip |
[releng] Avoid pointing to the hudson repositories for nightlies
- Add a new promote script to publish nightlies
Change-Id: Ife143d46faa2fd6d87f4ccd430999abd1d84c1eb
Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'releng')
-rwxr-xr-x | releng/toolkit/server/nightly.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/releng/toolkit/server/nightly.sh b/releng/toolkit/server/nightly.sh new file mode 100755 index 00000000000..0c7a1409fb0 --- /dev/null +++ b/releng/toolkit/server/nightly.sh @@ -0,0 +1,60 @@ +# This script is made to promote nightly builds of Papyrus + +########### Job parameters ########### +#The specific localization +remoteRoot="/home/data/httpd/download.eclipse.org" +papyrusRoot="modeling/mdt/papyrus" +nightlyRoot="updates/nightly" +jobName=$1 +#jobName="Papyrus-Oxygen" +eclipseTarget=$2 +#eclipseTarget="oxygen" + +#The localization of the local build target +targetResults="archive/repository" +echo "targetResults: $targetResults" + + +########### Compute local build results using buildNumber ########### +cd ~/.hudson/jobs/$jobName/lastSuccessful +jobDir=$(pwd -P) + +echo "last successful build: $jobDir" + +localResults=${jobDir}/${targetResults} +echo "localResults: ${localResults}" + + +########### Promote Nightly ########### +destination=$remoteRoot/$papyrusRoot/$nightlyRoot/$eclipseTarget +echo "Destination: $destination" + +#Clean the destination folder if exists, make it if does not +if [ -d $destination ]; + then + echo "Cleaning the $destination folder" + rm -rf ${destination}/* + else + mkdir -p $destination +fi + +#Go to the artifact directory +cd $localResults +echo "Promoting the Nightly to $destination" + +#Copy the contents onto the temp folder and change the permissions +cp -a * $destination + + +########### Set Access Rights ########### + +# This function sets the acess rights to allow all members of the group to edit the published files +function setAccessRights() { + chmod -R 775 "$1" + chgrp -hR modeling.mdt.papyrus "$1" +} +echo "Set access right -R: $destination" +setAccessRights $destination + + +echo "publishing done."
\ No newline at end of file |