Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 0666e0e1 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

Merge branch 'feature-s/fix-failed-ci-mysql-loading' into 'dev'

Fix loading of server review environment

See merge request !657
parents 8190bd6c 7b5c52a7
Pipeline #138534 failed with stages
in 2 minutes and 34 seconds
......@@ -410,17 +410,16 @@ deploy_review_server:
- TMP_DOCKER=$(tempfile)
- cp docker-compose.yml $TMP_DOCKER
- awk -f ci/for-review.awk $TMP_DOCKER > docker-compose.yml
- sed -i '$e cat ci/fuse-entrypoint.sh' vidjil-server/scripts/fuse-entrypoint.sh
- rm -f $TMP_DOCKER
- sed -i -r "s/WEB2PY_ADMIN_PASSWORD=/WEB2PY_ADMIN_PASSWORD=$REVIEW_SERVER_ADMIN_PASSWORD/" docker-compose.yml
- cd ..
- rsync -av --exclude .git . $REVIEW_SERVER:$REVIEW_SERVER_PATH_SERVER$CI_BUILD_REF_SLUG || $(case "$?" in 0|23) exit 0 ;; *) exit $?; esac)
- ssh $REVIEW_SERVER "cd $REVIEW_SERVER_PATH_SERVER; ./install_certs.sh ${CI_BUILD_REF_SLUG}; cd ${CI_BUILD_REF_SLUG}/docker_${CI_BUILD_REF_SLUG}; ls -lnd ../browser | cut -d ' ' -f 3 > ../uid; docker-compose up -d mysql fuse uwsgi nginx workers"
- ssh $REVIEW_SERVER "cd $REVIEW_SERVER_PATH_SERVER; ./install_certs.sh ${CI_BUILD_REF_SLUG}; cd ${CI_BUILD_REF_SLUG}/docker_${CI_BUILD_REF_SLUG}; docker-compose up -d mysql fuse uwsgi nginx workers"
environment:
name: review_server/$CI_BUILD_REF_NAME
url: http://$CI_BUILD_REF_SLUG.server.ci.vidjil.org/browser/
on_stop: stop_deploy_review_server
when: manual
auto_stop_in: 2 months
only:
- /^feature-.*s.*\/.*$/
- /^hotfix-.*s.*\/.*$/
......
......@@ -60,6 +60,11 @@ after_volumes2{
after_volumes2=0
}
}
after_workers {
print " restart: always"
after_workers=0
}
/volumes:/{
after_volumes=1
after_volumes2=1
......@@ -74,6 +79,9 @@ after_volumes2{
after_ports=1
next
}
/workers:$/ {
after_workers=1
}
/^\s{3,6}(nginx|fuse|uwsgi|workers|mysql):$/{
after_service=1
}
......
......@@ -11,15 +11,12 @@ if [[ -n "$WEB2PY_ADMIN_PASSWORD" ]]; then
python -c "from gluon.main import save_password; save_password('${WEB2PY_ADMIN_PASSWORD}', 443)"
fi
/usr/local/bin/gosu $user /usr/bin/uwsgi --ini /etc/uwsgi/apps-enabled/web2py.ini &
if [ "$1" == "--ci" ]; then
cd /usr/share/vidjil/server/web2py/applications/vidjil/scripts
sleep 20
echo "Loading SQL"
/usr/local/bin/gosu $user bash launch_python_script.sh load-sql.py -n /usr/share/vidjil/docker/ci/ci.sql
echo "SQL loaded"
python /usr/share/vidjil/tools/fuse.py --output /mnt/result/results/fused.vidjil /usr/share/vidjil/doc/analysis-example.vidjil /usr/share/vidjil/doc/analysis-example.vidjil /usr/share/vidjil/doc/analysis-example.vidjil
fi
wait
/usr/local/bin/gosu $user /usr/bin/uwsgi --ini /etc/uwsgi/apps-enabled/web2py.ini
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