Skip to content

Commit

Permalink
travis
Browse files Browse the repository at this point in the history
  • Loading branch information
kklein33 committed Apr 3, 2018
1 parent f260a97 commit 156c0b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ci/ci.sh
Expand Up @@ -12,14 +12,14 @@ set -e -x

sudo cp samples/server.conf bootstrap/bootstrap.conf

sudo ./launcher -v bootstrap
sudo ./launcher -v start && sleep 10
sudo ./launcher stop --skip-prereqs
sudo ./launcher start --docker-args "--memory 1g" && sleep 10
sudo ./launcher restart
sudo ./launcher -v rebuild
sudo ./launcher -v rebuild --docker-args "--memory 1g"


if [[ $TRAVIS_TAG != "" ]]; then
ci/publish-image.sh
else
Expand Down
16 changes: 5 additions & 11 deletions launcher
Expand Up @@ -86,8 +86,7 @@ set_envs() {

set_ports() {
ports=$(docker run $user_args --rm -it \
-v ${dockerdir}/scripts:/scripts \
-v ${dockerdir}/bootstrap:/bootstrap:ro \
-v ${dockerdir}/shared:/shared \
$image \
/scripts/bootstrap.py --parse-ports)
}
Expand Down Expand Up @@ -119,9 +118,6 @@ set_volumes() {

mounts=(
$sharedir:/shared
$sharedir/logs/var-log:/var/log
$sharedir/db:/var/lib/mysql
$sharedir/.bash_history:/root/.bash_history
)
volumes=""
local m
Expand Down Expand Up @@ -166,11 +162,9 @@ start() {
exit 0
fi

check_version_match

chmod 0700 $dockerdir/bootstrap $sharedir/seafile/conf

set_existing_container
set_volumes
if [[ $existing != "" ]]; then
loginfo "starting up existing container"
(
Expand All @@ -181,7 +175,6 @@ start() {
fi

set_envs
set_volumes
set_ports

local restart_policy attach_on_run
Expand All @@ -195,7 +188,7 @@ start() {
loginfo "Starting up new seafile server container"
(
set -x
docker run $user_args $attach_on_run $restart_policy --name seafile -h seafile $envs $volumes $ports $local_image
docker run $user_args $attach_on_run $restart_policy --name seafile -h seafile $envs $volumes $ports $image
)
}

Expand Down Expand Up @@ -376,7 +369,8 @@ rebuild() {
)
fi

bootstrap
cd image/seafile
docker build -t local_seafile/server:latest . >/dev/null
loginfo "Rebuilt successfully."

if [[ $existing != "" ]]; then
Expand Down

0 comments on commit 156c0b0

Please sign in to comment.