This repository has been archived by the owner on Mar 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading templates from external repository (#18)
* remove books from mail templates * add en.docs.sensebox.de link to hackair mail * update luftdaten url * change books to docs link * use go modules * Update package name * update to go 1.15 * Update Docker base image to go 1.15 * Load templates from external repository (#14) * pull images from github * update dockerfile and install git * just pull main branch * add github actions stuff stub * restructure ci * remove v * seems there is no GOPATH * debug * GOPATH?! * Add /bin to PATH * debug * more ci? * Remove Gopkg files * use templates from remote git repo * install git in builder container image * install ca-certificates correctly * fix clone * set global templates after slurping * expand testing * use main branch of templates * update go mod templates * Cleanup (#16) * remove honeybadger * add env variables for templater * add prefixes * print logs in actions * oops removed to much stuff Co-authored-by: Matthias Pfeil <matthias.pfeil@wwu.de> * move js testing into test directory (#15) * document stuff (#17) * document templater variables * add optional flags Co-authored-by: Gerald Pape <ubergesundheit@users.noreply.github.com> * Fix logging from templating * Forgot this in e98b956 * Add error for template length * Update mailer/templates/templates.go Co-authored-by: Matthias Pfeil <matthias.pfeil@wwu.de> Co-authored-by: umut0 <umut08152@gmail.com> Co-authored-by: Mario <mario.pesch@uni-muenster.de> Co-authored-by: umut <u.tas@reedu.de> Co-authored-by: Matthias Pfeil <matthias.pfeil@wwu.de> Co-authored-by: Gerald Pape <ubergesundheit@users.noreply.github.com>
- Loading branch information
1 parent
e43088c
commit 54ad4f8
Showing
585 changed files
with
396 additions
and
183,713 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Build and test mailer | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- development | ||
- cleanup | ||
pull_request: | ||
branches: | ||
- master | ||
- development | ||
- ci-stuff | ||
|
||
jobs: | ||
test-mailer: | ||
name: Test sensebox-mailer | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: webiny/action-post-run@1.0.0 | ||
id: docker-logs | ||
with: | ||
command: docker logs mailer | ||
|
||
# no need to setup go or docker, ubuntu-20.04 has | ||
# reasonable versions installed ok for our use case | ||
- run: | | ||
set -e | ||
export GOPATH=${HOME}/go | ||
GO111MODULE=on go get github.com/mailhog/MailHog@v1.0.1 | ||
GO111MODULE=on go get github.com/square/certstrap@7cda9d4 | ||
export PATH=${PATH}:${GOPATH}/bin | ||
docker build -t ci-mailer . | ||
./genCerts.sh | ||
MailHog & | ||
MAILHOG_PID=$! | ||
export SENSEBOX_MAILER_SERVER_CERT=$(cat out/mailer_server.crt) | ||
export SENSEBOX_MAILER_SERVER_KEY=$(cat out/mailer_server.key) | ||
export SENSEBOX_MAILER_CA_CERT=$(cat out/openSenseMapCA.crt) | ||
export SENSEBOX_MAILER_SMTP_SERVER=localhost | ||
export SENSEBOX_MAILER_SMTP_PORT=1025 | ||
export SENSEBOX_MAILER_SMTP_USER=smtpuser | ||
export SENSEBOX_MAILER_SMTP_PASSWORD=smtppassword | ||
export SENSEBOX_MAILER_FROM_DOMAIN=sensebox.de | ||
export SENSEBOX_MAILER_FROM_NAME_PREFIX=senseBox | ||
export SENSEBOX_MAILER_TEMPLATES_FETCH_INTERVAL=5s | ||
docker run \ | ||
--detach \ | ||
--name=mailer \ | ||
--network=host \ | ||
-e SENSEBOX_MAILER_SERVER_CERT \ | ||
-e SENSEBOX_MAILER_SERVER_KEY \ | ||
-e SENSEBOX_MAILER_CA_CERT \ | ||
-e SENSEBOX_MAILER_SMTP_SERVER \ | ||
-e SENSEBOX_MAILER_SMTP_PORT \ | ||
-e SENSEBOX_MAILER_SMTP_USER \ | ||
-e SENSEBOX_MAILER_SMTP_PASSWORD \ | ||
-e SENSEBOX_MAILER_FROM_DOMAIN \ | ||
-e SENSEBOX_MAILER_FROM_NAME_PREFIX \ | ||
-e SENSEBOX_MAILER_TEMPLATES_FETCH_INTERVAL \ | ||
ci-mailer | ||
echo "Sleeping 15 seconds to test git pull" | ||
sleep 15 | ||
node test/ | ||
docker stop mailer | ||
docker rm mailer | ||
kill $MAILHOG_PID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
function cleanup() { | ||
echo 'cleanup!' | ||
sudo docker stop mailer | ||
sudo docker rm mailer | ||
} | ||
trap cleanup EXIT | ||
|
||
sudo docker run \ | ||
--name=mailer \ | ||
--network=host \ | ||
-e "SENSEBOX_MAILER_SERVER_CERT=$(cat out/mailer_server.crt)" \ | ||
-e "SENSEBOX_MAILER_SERVER_KEY=$(cat out/mailer_server.key)" \ | ||
-e "SENSEBOX_MAILER_CA_CERT=$(cat out/openSenseMapCA.crt)" \ | ||
-e "SENSEBOX_MAILER_SMTP_SERVER=localhost" \ | ||
-e "SENSEBOX_MAILER_SMTP_PORT=1025" \ | ||
-e "SENSEBOX_MAILER_SMTP_USER=smtpuser" \ | ||
-e "SENSEBOX_MAILER_SMTP_PASSWORD=smtppassword" \ | ||
-e "SENSEBOX_MAILER_FROM_DOMAIN=sensebox.de" \ | ||
-e "SENSEBOX_MAILER_FROM_NAME_PREFIX=senseBox" \ | ||
mailer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module github.com/sensebox/sensebox-mailer | ||
|
||
go 1.15 | ||
|
||
require ( | ||
github.com/lovego/email v0.0.0-20171113032818-f4db5d7e012a | ||
github.com/sensebox/sensebox-mailer-templates v0.0.0-20210117123008-cba07d01969c | ||
) |
Oops, something went wrong.