Commit b5b05e79 authored by Lukas Matt's avatar Lukas Matt

Merge branch 'update_ganggo_entrypoint' into 'master'

Update entrypoint in ganggo docker image

See merge request feneas/federation-testsuite!5
parents 11f7491e e6dbd6a0
Pipeline #816 passed with stage
in 6 minutes and 44 seconds
#!/bin/bash
repo=$GOPATH/src/git.feneas.org/ganggo/ganggo
root=$GOPATH/src/git.feneas.org/ganggo/ganggo
# parse and replace configuration values
sed -i "s/NAME/$DATABASE/g" $repo/conf/app.conf \
&& sed -i "s/PORT/$PORT/g" $repo/conf/app.conf \
&& sed -i "s/CIP/$(hostname -i)/g" $repo/conf/app.conf || exit 1;
sed -i "s/NAME/$DATABASE/g" $root/conf/app.conf \
&& sed -i "s/PORT/$PORT/g" $root/conf/app.conf \
&& sed -i "s/CIP/$(hostname -i)/g" $root/conf/app.conf || exit 1;
if [ "$PROJECT" == "ganggo" ]; then
if [ "$(basename $PRREPO)" == "federation.git" ]; then
repo=$repo/vendor/git.feneas.org/ganggo/federation
# go-dep prunes git-directory from vendor folder
rm -r $repo && git clone \
https://git.feneas.org/ganggo/federation.git $repo
fi
cd $repo && git checkout . \
if [ "$(basename $PRREPO)" == "ganggo.git" ]; then
# Use custom application server
git checkout . \
&& git remote add custom $PRREPO \
&& git fetch custom \
&& git merge -m merge $PRSHA \
&& git log -1 || {
echo "Cannot find $PRREPO $PRSHA"
echo "Cannot pull from repo=$PRREPO sha=$PRSHA"
exit 1
}
else
# Update ganggo application server
git pull origin master && git log -1 || {
echo "Cannot pull from origin"
exit 1
}
fi
# install new dependencies
# and compile assets
make install precompile
dep ensure
# install new dependencies
# and compile assets
make install precompile
dep ensure
# update federation lib if necessary
if [ "$(basename $PRREPO)" == "federation.git" ]; then
repo=$root/vendor/git.feneas.org/ganggo/federation
# go-dep prunes git-directory from vendor folder
rm -rf $repo && git clone $PRREPO $repo
cd $repo && git checkout $PRSHA
fi
# start the application server
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment