-
Notifications
You must be signed in to change notification settings - Fork 23
/
.travis.yml
72 lines (66 loc) · 5.63 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
sudo: required
language: cpp
services:
- docker
env:
- DOVECOT="master-2.3"
before_install:
- docker volume create --name ceph_config
- docker network create --driver=bridge --subnet=192.168.100.0/24 --gateway=192.168.100.1 ceph_network
- travis_wait 30 docker run -d --net=ceph_network --name ceph_demo --mount type=tmpfs,destination=/etc/ceph -v ceph_config:/root/cfg -e MON_IP=192.168.100.2 -e CEPH_PUBLIC_NETWORK=192.168.100.0/24 -e CEPH_DEMO_UID=$DOVECOT ceph/daemon:latest demo
- travis_wait 30 docker run -itd --name build --net=ceph_network -e SOURCE_VERSION=$DOVECOT -v ceph_config:/etc/ceph -v $(pwd):/repo cephdovecot/travis-build-$DOVECOT:latest sh
- docker exec build sh -c 'printf "nameserver 8.8.8.8\n" > /etc/resolv.conf'
- docker exec build apt-get -qq update
- docker exec build apt-get -qq upgrade
before_script:
- docker exec build sh -c 'cd /usr/local/src/dovecot; git pull origin $SOURCE_VERSION'
- docker exec build sh -c 'cd /usr/local/src/dovecot; make install'
script:
- docker exec build sh -c 'cd repo; ./autogen.sh'
- docker exec build sh -c 'cd repo; ./configure --with-dovecot=/usr/local/lib/dovecot --enable-maintainer-mode --enable-debug --with-integration-tests --enable-valgrind --enable-debug'
- docker exec build sh -c 'cd repo; make clean install'
- docker logs ceph_demo
- docker exec ceph_demo sh -c 'cp -r /etc/ceph/* /root/cfg'
- docker exec build sh -c 'chmod 777 /etc/ceph/*'
- docker exec ceph_demo sh -c 'ceph tell mon.\* injectargs "--mon-allow-pool-delete=true"'
- travis_wait 30 docker exec build sh -c 'cd repo/src/tests; make check-valgrind'
- docker exec build sh -c 'cd repo; cat src/tests/test-suite-memcheck.log'
#- travis_wait 30 docker exec build sh -c 'cd repo/src/tests; make check'
- docker exec build sh -c 'ldconfig'
- docker exec build sh -c 'chmod -R 777 /usr/local/var/'
- docker exec --detach build sh -c 'service dovecot.service start'
- docker exec build sh -c 'cd /usr/local/bin; ./imaptest user=t%d pass=t port=10143 users=100 clients=25 error_quit secs=15 output=/var/log/imaptest.log'
- docker exec build sh -c 'smtp-source -v -L -s 1 -m 1 -c -F /root/lmtp_test_mail.tld -f test@example.com -t t1 inet:127.0.0.1:1024'
- docker exec build sh -c 'doveadm -D altmove -u t2 ALL'
- docker exec build sh -c 'doveadm -D altmove -r -u t2 ALL'
- docker exec build sh -c 'doveadm -Dv backup -u t1 -m INBOX mdbox:/usr/local/var/mail/mdbox/t1'
- docker exec build sh -c 'doveadm -D fetch -u t1 "guid date.received date.sent flags pop3.uidl seq size.virtual uid user mailbox-guid mailbox" ALL > /root/rbox.t1.mails'
- docker exec build sh -c 'doveadm -D -c /usr/local/etc/dovecot_mdbox/dovecot.conf fetch -u t1 "guid date.received date.sent flags pop3.uidl seq size.virtual uid user mailbox-guid mailbox" ALL > /root/mdbox.t1.mails'
- docker exec build sh -c 'cd repo/src/scripts; ./sort.sh /root/rbox.t1.mails /root/rbox.t1.mails.sorted'
- docker exec build sh -c 'cd repo/src/scripts; ./sort.sh /root/mdbox.t1.mails /root/mdbox.t1.mails.sorted'
- docker exec build sh -c 'diff -y -W 1500 /root/rbox.t1.mails.sorted /root/mdbox.t1.mails.sorted'
- docker exec build sh -c 'rm -r /usr/local/var/mail/rbox/t1'
- docker exec build sh -c 'doveadm -Dv -c /usr/local/etc/dovecot_mdbox/dovecot.conf backup -u t1 -m INBOX rbox:/usr/local/var/mail/rbox/t1'
- docker exec build sh -c 'doveadm -D fetch -u t1 "guid date.received date.sent flags pop3.uidl seq size.virtual uid user mailbox-guid mailbox" ALL > /root/rbox.t1.mails'
- docker exec build sh -c 'cd repo/src/scripts; ./sort.sh /root/rbox.t1.mails /root/rbox.t1.mails.sorted'
- docker exec build sh -c 'diff -y -W 1500 /root/rbox.t1.mails.sorted /root/mdbox.t1.mails.sorted'
- docker exec build sh -c 'rm -r /usr/local/var/mail/rbox'
- docker exec build sh -c 'cd /usr/local/bin; ./imaptest user=t%d pass=t port=10110 profile=/root/pop3-profile.conf users=100 clients=10 error_quit secs=15 output=/var/log/imaptest.log'
- docker exec build sh -c 'rm -r /usr/local/var/mail/rbox'
- docker exec build sh -c 'cd /usr/local/bin; ./imaptest user=t%d pass=t port=10143 error_quit secs=15 copybox=INBOX.Drafts output=/var/log/imaptest.log'
- docker exec build sh -c 'doveadm -D force-resync -u t1 INBOX'
- docker exec build bash -c '/usr/local/bin/exec.sh "cat /var/log/dovecot.log | grep \"Error:\""'
- docker exec build bash -c '/usr/local/bin/exec.sh "cat /var/log/dovecot.log | grep \"failed:\""'
- docker exec build bash -c '/usr/local/bin/exec.sh "cat /var/log/dovecot.log | grep \"Internal error\""'
- docker exec build bash -c '/usr/local/bin/exec.sh "cat /var/log/dovecot.log | grep \"killed\""'
- docker exec build bash -c '/usr/local/bin/exec.sh "cat /var/log/dovecot.log | grep \"Panic:\""'
- docker exec build bash -c '/usr/local/bin/exec.sh "cat /var/log/dovecot.log | grep \"Fatal:\""'
- docker exec build bash -c '/usr/local/bin/exec.sh "cat /var/log/imaptest.log | grep \"BUG:\""'
after_script:
- docker stop build ceph_demo
- docker rm build ceph_demo
- docker network rm ceph_network
- docker volume rm ceph_config
notifications:
slack:
secure: CZ4/u+Hl2K2/YIsjwJoghhO3zm5XkJffiXk7voppIBFSLTUHPEgSSsZCdcBgNUSh/gjMI23geQb5PgTcfuVjuexDuX5RH43pRLHKJoFPK4UHkUEucebUY1O5K0Czvw0s1Y5YWWBWoJCsYf540kIA7hi4PoyPQ+dUC0bUItYs8APLrsz2BssEnbWR9W0mo7v4N43+KSDUObxnpNGTUVhepogrw4/cmcpUeqJU0c+lt9QpV4wMkoiRgBVfX696SCegPTOq/CtOhTzHJ5R65Bv+7zImA+/AYpRtIvkJMoHY5brRNm3bYz7an0QnFJq5B+K52Q/1CU7qhH6iED/Do35HvhW7DWJ3NBnV49vD4hR8Gam0nhHsqgd8zDpA4pIYHpC2GjXKnKk5GETIz+Ju0aepccheyLzxEK1wZKM4heMVdizA4KMyYDSGyAkElWuJhCQ0SXO8NVwH5onpQtU9rWWgGAXAV4qnHoxXzsqexw6bE7sik2h/SVUdXYmhKDT4gGUlFH+RN/5xGnMOaaYYduYi4z2ueMANw6PfROT64arsRKyFaCby9MT1YgOGtDyXee2o1RfyI1FbOTEzb+q/yOrUnk0eExBzSBi8dYjJwccY2A57bYfTNYtNLDXbsQmuVjeBiZuc1RujOsnfPpklgcWAj59OwcmkjlCzrU9uC7/vzKI=