forked from opencobra/cobratoolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'generate-zip' into develop
- Loading branch information
Showing
76 changed files
with
131 additions
and
161 deletions.
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/sh | ||
|
||
# script called at the end of a build on a -branches platform, | ||
# generates a .zip file of the working directory, | ||
# and puts it to the webserver. | ||
|
||
echo "-- Generation of zip of workspace directory -- " | ||
echo " > Architecture: $ARCH" | ||
echo " > MATLAB version: $MATLAB_VER" | ||
echo " > Branch: $GIT_BRANCH" | ||
|
||
if [ "$ARCH" = "Linux" ] && [ "$MATLAB_VER" = "R2016b" ] && [ "$GIT_BRANCH" = "origin/master" ]; then | ||
|
||
# make a clean local temporary release directory | ||
rm -rf /tmp/releaseCT && mkdir /tmp/releaseCT | ||
echo " > New temporary folder created: /tmp/releaseCT" | ||
|
||
# clone from local repository | ||
git clone file:///mnt/prince-data/jenkins/workspace/COBRAToolbox-branches-auto-linux/MATLAB_VER/$MATLAB_VER/label/linux /tmp/releaseCT --depth 1 | ||
echo " > Workspace cloned" | ||
|
||
# change to the local temporary release directory | ||
cd /tmp/releaseCT | ||
|
||
# set the remote URL | ||
git remote set-url origin https://github.com/opencobra/cobratoolbox.git | ||
echo " > Remote set" | ||
|
||
# clone submodules | ||
git submodule update --init --remote --depth 1 | ||
echo " > Submodules cloned" | ||
|
||
# retrieve the SHA1 of the detached head | ||
lastCommit=$(git rev-parse --short HEAD) | ||
echo " > Last commit determined as $lastCommit" | ||
|
||
# zip the entire directory | ||
zip -qr /mnt/prince-data/releases/the_COBRA_Toolbox-$lastCommit.zip . | ||
echo " > Workspace zipped" | ||
|
||
# move the zip file to /mnt/isilon-dat/releases | ||
scp -P 8022 /mnt/prince-data/releases/the_COBRA_Toolbox-$lastCommit.zip jenkins@prince-server.lcsb.uni.lux:/mnt/isilon-dat/releases | ||
echo " > .zip file sent to prince-server" | ||
|
||
# update the symbolic link | ||
ssh -p8022 jenkins@prince-server.lcsb.uni.lux -o TCPKeepAlive=no "cd /mnt/isilon-dat/releases && rm the_COBRA_Toolbox.zip && ln -s the_COBRA_Toolbox-$lastCommit.zip the_COBRA_Toolbox.zip" | ||
echo " > .zip alias set on prince-server" | ||
|
||
# remove the local zip file | ||
rm /mnt/prince-data/releases/the_COBRA_Toolbox-$lastCommit.zip | ||
|
||
# provide an output message | ||
echo " > Local .zip file removed" | ||
echo "-- Done. The zip file can be downloaded from https://prince.lcsb.uni.lu/releases/the_COBRA_Toolbox-$lastCommit.zip --" | ||
|
||
fi |
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
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
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
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
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
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
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
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
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
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
Oops, something went wrong.