- [travis-ci](.travis.yml) Debug errors on Travis-CI

master
mlan 2020-11-16 09:45:35 +01:00
parent 230e6953fd
commit c92a4c0b68
4 changed files with 34 additions and 22 deletions

View File

@ -4,4 +4,6 @@ dist: bionic
services: docker services: docker
install: make build-all install: make build-all
before_script: sudo apt-get install -y ldap-utils openssl jq before_script: sudo apt-get install -y ldap-utils openssl jq
script: make test-all script:
- make test-pull
- make test-all

View File

@ -10,7 +10,7 @@ SRC_VER ?= $(shell $(SRC_CMD))
IMG_REPO ?= $(BLD_REPO) IMG_REPO ?= $(BLD_REPO)
IMG_VER ?= $(BLD_VER) IMG_VER ?= $(BLD_VER)
TST_ENV ?= -C test TST_ENV ?= -C test
TST_TGTE ?= $(addprefix test-,all diff down env htop imap lmtp logs mail pop3 sh sv up) TST_TGTE ?= $(addprefix test-,all diff down env htop imap lmtp logs mail pop3 pull sh sv up)
TST_TGTI ?= test_% test-up_% TST_TGTI ?= test_% test-up_%
_version = $(if $(findstring $(BLD_TGT),$(1)),\ _version = $(if $(findstring $(BLD_TGT),$(1)),\
$(if $(findstring latest,$(2)),latest $(1) $(SRC_VER) $(1)-$(SRC_VER),$(2) $(1)-$(2)),\ $(if $(findstring latest,$(2)),latest $(1) $(SRC_VER) $(1)-$(SRC_VER),$(2) $(1)-$(2)),\

View File

@ -6,7 +6,7 @@
![docker stars](https://img.shields.io/docker/stars/mlan/kopano.svg?label=stars&style=popout-square&logo=docker) ![docker stars](https://img.shields.io/docker/stars/mlan/kopano.svg?label=stars&style=popout-square&logo=docker)
![docker pulls](https://img.shields.io/docker/pulls/mlan/kopano.svg?label=pulls&style=popout-square&logo=docker) ![docker pulls](https://img.shields.io/docker/pulls/mlan/kopano.svg?label=pulls&style=popout-square&logo=docker)
This (non official) repository provides dockerized web mail service as well as Exchange ActiveSync (EAS), ICAL, IMAP and POP3 service. It is based on [Kopano](https://kopano.com) core components, as well as the Kopano WebApp and [Z-Push](http://z-push.org/). The image uses [nightly built packages](https://download.kopano.io/community/) which are provided by the Kopano community. This (non official) repository provides dockerized web mail service as well as Exchange ActiveSync (EAS), IMAP, POP3 and ICAL service (and their secure variants IMAPS, POP3S and ICALS). It is based on [Kopano](https://kopano.com) core components, as well as the Kopano WebApp and [Z-Push](http://z-push.org/). The image uses [nightly built packages](https://download.kopano.io/community/) which are provided by the Kopano community.
Hopefully this repository can be retired once the Kopano community make official images available. To learn more about this activity see [zokradonh/kopano-docker](https://github.com/zokradonh/kopano-docker). Hopefully this repository can be retired once the Kopano community make official images available. To learn more about this activity see [zokradonh/kopano-docker](https://github.com/zokradonh/kopano-docker).
@ -14,10 +14,13 @@ Hopefully this repository can be retired once the Kopano community make official
- Groupware server [Kopano WebApp](https://kopano.io/) - Groupware server [Kopano WebApp](https://kopano.io/)
- [Exchange ActiveSync (EAS)](https://en.wikipedia.org/wiki/Exchange_ActiveSync) server [Z-Push](http://z-push.org/) - [Exchange ActiveSync (EAS)](https://en.wikipedia.org/wiki/Exchange_ActiveSync) server [Z-Push](http://z-push.org/)
- Multi-staged build providing the images `full`, `debugtools` and `core` - IMAP, POP3 and ICAL service Kopano
- Secure protocols IMAPS, POP3S and ICALS.
- Hooks for integrating [Lets Encrypt](https://letsencrypt.org/) LTS certificates using the reverse proxy [Traefik](https://docs.traefik.io/)
- Multi-staged build providing the images `full` and `core`
- Configuration using environment variables - Configuration using environment variables
- Log directed to docker daemon with configurable level - Log directed to docker daemon with configurable level
- Built in utility script [conf](src/docker/bin/conf) helping configuring Kopano components, WebApp and Z-Push - Built in utility script [run](src/docker/bin/run) helping configuring Kopano components, WebApp and Z-Push
- Health check - Health check
- Hook for theming - Hook for theming
- Demo based on `docker-compose.yml` and `Makefile` files - Demo based on `docker-compose.yml` and `Makefile` files

View File

@ -7,8 +7,6 @@ _ip = $(shell docker inspect -f \
'{{range .NetworkSettings.Networks}}{{println .IPAddress}}{{end}}' \ '{{range .NetworkSettings.Networks}}{{println .IPAddress}}{{end}}' \
$(1) | head -n1) $(1) | head -n1)
CURL_DBG ?=
TST_NAME ?= test TST_NAME ?= test
SSL_KEYF ?= priv_key.pem SSL_KEYF ?= priv_key.pem
SSL_CRTF ?= cert.pem SSL_CRTF ?= cert.pem
@ -48,7 +46,7 @@ SQL_ENV ?= \
-e MYSQL_PASSWORD=$(SQL_PASS) \ -e MYSQL_PASSWORD=$(SQL_PASS) \
APP_NAME ?= app APP_NAME ?= app
APP_IMAG ?= APP_IMG ?=
APP_FQDN ?= $(APP_NAME).$(MAIL_DOM) APP_FQDN ?= $(APP_NAME).$(MAIL_DOM)
APP_VOL ?= APP_VOL ?=
APP_SSLD ?= /etc/kopano/ssl APP_SSLD ?= /etc/kopano/ssl
@ -74,6 +72,19 @@ APPF_ENV ?= $(APPS_ENV) \
APPA_ENV ?= $(APPS_ENV) \ APPA_ENV ?= $(APPS_ENV) \
-v $(shell pwd)/$(TST_ACMD):/$(TST_ACMD) -v $(shell pwd)/$(TST_ACMD):/$(TST_ACMD)
AUT_NAME ?= auth
AUT_IMG ?= mlan/openldap
AUT_FQDN ?= $(AUT_NAME).$(MAIL_DOM)
AUT_VOL ?=
AUT_ENV ?= $(NET_ENV) \
--name $(AUT_NAME) \
--hostname $(AUT_FQDN) \
CURL_OPT ?= -s -v
CURL_IMG ?= curlimages/curl
CURL_ENV ?= $(NET_ENV) \
-i --rm
DB_NAME ?= db DB_NAME ?= db
DB_IMG ?= mariadb DB_IMG ?= mariadb
DB_FQDN ?= $(DB_NAME).$(MAIL_DOM) DB_FQDN ?= $(DB_NAME).$(MAIL_DOM)
@ -83,13 +94,7 @@ DB_ENV ?= $(NET_ENV) $(SQL_ENV) \
--hostname $(DB_FQDN) \ --hostname $(DB_FQDN) \
-e MYSQL_ROOT_PASSWORD=$(SQL_PASS) -e MYSQL_ROOT_PASSWORD=$(SQL_PASS)
AUT_NAME ?= auth #GREP_ENV ?= --color=always
AUT_IMG ?= mlan/openldap
AUT_FQDN ?= $(AUT_NAME).$(MAIL_DOM)
AUT_VOL ?=
AUT_ENV ?= $(NET_ENV) \
--name $(AUT_NAME) \
--hostname $(AUT_FQDN) \
TST_W8S1 ?= 1 TST_W8S1 ?= 1
TST_W8S2 ?= 80 TST_W8S2 ?= 80
@ -107,6 +112,8 @@ test-all: test-up_0 test_1 test_2 test_3
test_%: test-up_% test-waitl_% test-logs_% test-service_% test-down_% test_%: test-up_% test-waitl_% test-logs_% test-service_% test-down_%
test-pull:
$(addprefix docker pull -q ,$(CURL_IMG); $(AUT_IMG); $(DB_IMG))
test-up_0: test-up-net test-up_0: test-up-net
# #
@ -185,7 +192,7 @@ test-service_%: test-pop3_% test-imap_% test-http_%
# #
test-logs_%: test-logs_%:
-docker container logs $(APP_NAME) | grep 'docker-entrypoint.sh' -docker container logs $(APP_NAME) # | grep 'docker-entrypoint.sh'
test-waits_%: test-waits_%:
case $* in [1-4]) sleep $(TST_W8S1);; *) sleep $(TST_W8S2);; esac case $* in [1-4]) sleep $(TST_W8S1);; *) sleep $(TST_W8S2);; esac
@ -215,7 +222,7 @@ test-up-auth_%:
test-lmtp: test-lmtp_0 test-lmtp: test-lmtp_0
test-lmtp_%: test-lmtp_%:
printf "LHLO mx\nMAIL FROM: <test@example.biz>\nRCPT TO: <$(MAIL_US1)@$(MAIL_DOM)>\nDATA\nFrom: A tester <test@example.biz>\nTo: <$(MAIL_US1)@$(MAIL_DOM)>\nDate: $$(date)\nSubject: $(MAIL_SUB)$*\n$(MAIL_MSG)$*\n.\nQUIT\n"\ printf "LHLO mx\nMAIL FROM: <test@example.biz>\nRCPT TO: <$(MAIL_US1)@$(MAIL_DOM)>\nDATA\nFrom: A tester <test@example.biz>\nTo: <$(MAIL_US1)@$(MAIL_DOM)>\nDate: $$(date)\nSubject: $(MAIL_SUB)$*\n$(MAIL_MSG)$*\n.\nQUIT\n"\
| nc -C $(call _ip,$(APP_NAME)) 2003 > /dev/null | nc -C $(call _ip,$(APP_NAME)) 2003 # > /dev/null
case $* in [1-3]) sleep $(TST_W8S1);; [4-9]) sleep $(TST_W8S2);; esac case $* in [1-3]) sleep $(TST_W8S1);; [4-9]) sleep $(TST_W8S2);; esac
test-cfg_%: test-cfg_%:
@ -227,19 +234,19 @@ test-cfg_%:
test-imap: test-imap_0 test-imap: test-imap_0
test-imaps: test-imap_9 test-imaps: test-imap_9
test-imap_%: test-cfg_% test-lmtp_% test-imap_%: test-cfg_% test-lmtp_%
docker run -i --rm $(NET_ENV) curlimages/curl imap$(cfg_s)://$(APP_NAME)/inbox \ docker run $(CURL_ENV) $(CURL_IMG) $(CURL_OPT) imap$(cfg_s)://$(APP_NAME)/inbox \
-s --ssl --anyauth -k -X "fetch 1 all" -u $(MAIL_US1):$(MAIL_PW1) | grep --color=always $(MAIL_SUB)$* --ssl --anyauth -k -X "fetch 1 all" -u $(MAIL_US1):$(MAIL_PW1) | grep $(GREP_ENV) $(MAIL_SUB)$*
test-pop3: test-pop3_0 test-pop3: test-pop3_0
test-pop3s: test-pop3_9 test-pop3s: test-pop3_9
test-pop3_%: test-cfg_% test-lmtp_% test-pop3_%: test-cfg_% test-lmtp_%
docker run -i --rm $(NET_ENV) curlimages/curl pop3$(cfg_s)://$(APP_NAME)/1 \ docker run $(CURL_ENV) $(CURL_IMG) $(CURL_OPT) pop3$(cfg_s)://$(APP_NAME)/1 \
-s --ssl --anyauth -k -u $(MAIL_US1):$(MAIL_PW1) | grep --color=always $(MAIL_SUB)$* --ssl --anyauth -k -u $(MAIL_US1):$(MAIL_PW1) | grep $(GREP_ENV) $(MAIL_SUB)$*
test-http: test-http_9 test-http: test-http_9
test-http_%: test-cfg_% test-http_%: test-cfg_%
if [ $* -ge 3 ]; then \ if [ $* -ge 3 ]; then \
docker run -i --rm $(NET_ENV) curlimages/curl http://$(APP_NAME) -s | grep --color=always $(WEB_TIT) \ docker run $(CURL_ENV) $(CURL_IMG) $(CURL_OPT) http://$(APP_NAME) | grep $(GREP_ENV) $(WEB_TIT) \
; fi ; fi
test-env: test-env: