summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2017-01-17 15:01:41 +0100
committerHarrison Healey <harrisonmhealey@gmail.com>2017-01-17 09:01:41 -0500
commitdc54e640c296d50c51858fa50256b3aed9e0a46c (patch)
treeb5b9dc2b044535570cb885307de366136c2b3419 /Makefile
parent97a51b0e31692b7f86a9971ad36d62b04100fffb (diff)
downloadchat-dc54e640c296d50c51858fa50256b3aed9e0a46c.tar.gz
chat-dc54e640c296d50c51858fa50256b3aed9e0a46c.tar.bz2
chat-dc54e640c296d50c51858fa50256b3aed9e0a46c.zip
Add inbucket docker image to allow local and automated testing of emails (#4901)
* add docker container for inbucket * Add way to get the emails using inbucket and add a test for reset password * add config setting to send emails * update TestEmailTest update * add another test and fix wrong assert * update per review fix lint change senders email * Revert config.json to default values for EmailSettings section * update test * add setup to make the test run
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b4d243fdf..980a9b89d 100644
--- a/Makefile
+++ b/Makefile
@@ -85,6 +85,14 @@ start-docker:
docker start mattermost-webrtc > /dev/null; \
fi
+ @if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 0 ]; then \
+ echo starting mattermost-inbucket; \
+ docker run --name mattermost-inbucket -p 9000:10080 -p 2500:10025 -d jhillyerd/inbucket:latest > /dev/null; \
+ elif [ $(shell docker ps | grep -ci mattermost-inbucket) -eq 0 ]; then \
+ echo restarting mattermost-inbucket; \
+ docker start mattermost-inbucket > /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 \
@@ -132,6 +140,11 @@ stop-docker:
docker stop mattermost-webrtc > /dev/null; \
fi
+ @if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 1 ]; then \
+ echo stopping mattermost-inbucket; \
+ docker stop mattermost-inbucket > /dev/null; \
+ fi
+
clean-docker:
@echo Removing docker containers
@@ -159,6 +172,12 @@ clean-docker:
docker rm -v mattermost-webrtc > /dev/null; \
fi
+ @if [ $(shell docker ps -a | grep -ci mattermost-inbucket) -eq 1 ]; then \
+ echo removing mattermost-inbucket; \
+ docker stop mattermost-inbucket > /dev/null; \
+ docker rm -v mattermost-inbucket > /dev/null; \
+ fi
+
check-client-style:
@echo Checking client style
@@ -303,6 +322,12 @@ package: build build-client
@# Disable developer settings
sed -i'' -e 's|"ConsoleLevel": "DEBUG"|"ConsoleLevel": "INFO"|g' $(DIST_PATH)/config/config.json
+ @# Reset email sending to original configuration
+ sed -i'' -e 's|"SendEmailNotifications": true,|"SendEmailNotifications": false,|g' $(DIST_PATH)/config/config.json
+ sed -i'' -e 's|"FeedbackEmail": "test@example.com",|"FeedbackEmail": "",|g' $(DIST_PATH)/config/config.json
+ sed -i'' -e 's|"SMTPServer": "dockerhost",|"SMTPServer": "",|g' $(DIST_PATH)/config/config.json
+ sed -i'' -e 's|"SMTPPort": "2500",|"SMTPPort": "",|g' $(DIST_PATH)/config/config.json
+
@# Package webapp
mkdir -p $(DIST_PATH)/webapp/dist
cp -RL $(BUILD_WEBAPP_DIR)/dist $(DIST_PATH)/webapp