Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
b83e8a91
Commit
b83e8a91
authored
14 years ago
by
kaloyane
Browse files
Options
Downloads
Patches
Plain Diff
minor: added a script to build a sprint from an already existing tag
SVN: 20210
parent
78438a17
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis_all/source/bash/build.sh
+110
-0
110 additions, 0 deletions
openbis_all/source/bash/build.sh
with
110 additions
and
0 deletions
openbis_all/source/bash/build.sh
0 → 100755
+
110
−
0
View file @
b83e8a91
#!/bin/bash
# Builds the software components, uploads them to sprint server
# and places a copy of them on the sprint server ready for installation.
if
[
$#
-lt
1
]
;
then
echo
"Usage:
$0
<sprint number> [minor]"
exit
1
fi
TODAY
=
`
date
"+%Y-%m-%d"
`
VER
=
$1
SUBVER
=
0
if
[
$2
]
;
then
SUBVER
=
$2
fi
FULL_VER
=
S
$VER
.
$SUBVER
SPRINT_SERVER
=
sprint-openbis.ethz.ch
SPRINT_INSTALL_SCRIPT
=
sprint_install.sh
# Unset this to do a dry-run (like rsync -n) and set it to actually execute the commands
# unset EXECUTE_COMMANDS
EXECUTE_COMMANDS
=
1
function
state_start
{
echo
"----------------------------------------------------------------------"
echo
-n
"| "
echo
$1
echo
""
}
function
state_end
{
echo
"
\
-----------------------------------"
echo
""
}
function
setup
{
state_start Setup
echo
"svn checkout svn+ssh://svncisd.ethz.ch/repos/cisd/build_resources/trunk build_resources"
if
[
$EXECUTE_COMMANDS
]
;
then
svn checkout svn+ssh://svncisd.ethz.ch/repos/cisd/build_resources/trunk build_resources
fi
echo
"cd build_resources"
if
[
$EXECUTE_COMMANDS
]
;
then
cd
build_resources
fi
state_end
}
function
build
{
state_start
"Building openBIS..."
echo
"./build.sh openbis_all
$FULL_VER
"
if
[
$EXECUTE_COMMANDS
]
;
then
./build.sh openbis_all
$FULL_VER
fi
state_end
}
function
copy_to_cisd_server
{
state_start
"Copying new openBIS components to sprint-builds'..."
if
[
$EXECUTE_COMMANDS
]
;
then
OPENBIS_PATH
=
~openbis/fileserver/sprint_builds/openBIS
SPRINT_DIR
=
$OPENBIS_PATH
/
$TODAY
-
$FULL_VER
mkdir
-p
$SPRINT_DIR
cp
-p
*
.zip
$SPRINT_DIR
/
chmod
g+w
-R
$SPRINT_DIR
fi
state_end
}
function
copy_to_sprint_server
{
state_start
"Copying new openBIS components to '
$SPRINT_SERVER
'..."
if
[
$EXECUTE_COMMANDS
]
;
then
scp openBIS-server-S
*
.zip
$SPRINT_SERVER
:.
scp datastore_server-S
*
.zip
$SPRINT_SERVER
:.
scp
*
.zip
$SPRINT_SERVER
:~/sprint_builds
rm
-f
*
.zip
fi
state_end
}
function
install_sprint
{
# If sprint install script is present and executable, run it!
if
[
$EXECUTE_COMMANDS
]
;
then
if
[
-x
$SPRINT_INSTALL_SCRIPT
]
;
then
state_start
"Installing new sprint builds on '
$SPRINT_SERVER
'..."
echo
Installing server remotely...
cat
$SPRINT_INSTALL_SCRIPT
| ssh
-T
$SPRINT_SERVER
"cat > ~/
$SPRINT_INSTALL_SCRIPT
; chmod 755 ~/
$SPRINT_INSTALL_SCRIPT
; ~/
$SPRINT_INSTALL_SCRIPT
$VER
; rm -f ~/
$SPRINT_INSTALL_SCRIPT
"
state_end
fi
fi
}
if
[
$EXECUTE_COMMANDS
]
;
then
echo
-n
else
state_start
"RUNNING DRY RUN"
fi
setup
build
copy_to_cisd_server
copy_to_sprint_server
install_sprint
state_start Done!
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment