From 3463e1fc932bc4e36a3014a084af0459a9cd9af7 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Fri, 22 Sep 2017 19:38:46 +0100 Subject: Run file tests on Minio and local drivers. (#7482) --- Makefile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 72bcf76a1..409b39b9c 100644 --- a/Makefile +++ b/Makefile @@ -120,6 +120,16 @@ start-docker: docker start mattermost-inbucket > /dev/null; \ fi + @if [ $(shell docker ps -a | grep -ci mattermost-minio) -eq 0 ]; then \ + echo starting mattermost-minio; \ + docker run --name mattermost-minio -p 9001:9000 -e "MINIO_ACCESS_KEY=minioaccesskey" \ + -e "MINIO_SECRET_KEY=miniosecretkey" -d minio/minio:latest server /data > /dev/null; \ + docker exec -it mattermost-minio /bin/sh -c "mkdir /data/mattermost-test" > /dev/null; \ + elif [ $(shell docker ps | grep -ci mattermost-minio) -eq 0 ]; then \ + echo restarting mattermost-minio; \ + docker start mattermost-minio > /dev/null; \ + fi + ifeq ($(BUILD_ENTERPRISE_READY),true) @echo Ldap test user test.one @if [ $(shell docker ps -a | grep -ci mattermost-openldap) -eq 0 ]; then \ @@ -183,6 +193,11 @@ stop-docker: docker stop mattermost-inbucket > /dev/null; \ fi + @if [ $(shell docker ps -a | grep -ci mattermost-minio) -eq 1 ]; then \ + echo stopping mattermost-minio; \ + docker stop mattermost-minio > /dev/null; \ + fi + @if [ $(shell docker ps -a | grep -ci mattermost-elasticsearch) -eq 1 ]; then \ echo stopping mattermost-elasticsearch; \ docker stop mattermost-elasticsearch > /dev/null; \ @@ -215,6 +230,12 @@ clean-docker: docker rm -v mattermost-inbucket > /dev/null; \ fi + @if [ $(shell docker ps -a | grep -ci mattermost-minio) -eq 1 ]; then \ + echo removing mattermost-minio; \ + docker stop mattermost-minio > /dev/null; \ + docker rm -v mattermost-minio > /dev/null; \ + fi + @if [ $(shell docker ps -a | grep -ci mattermost-elasticsearch) -eq 1 ]; then \ echo removing mattermost-elasticsearch; \ docker stop mattermost-elasticsearch > /dev/null; \ -- cgit v1.2.3-1-g7c22