A notification bot to receive Travis webhook payload and send Email notifications to builds@flink.apache.org.
- Travis CI's webhook notification delivers a POST request to the specified endpoint a JSON payload as described.
- Encrypt the webhook url in the
.travis.yml
e.g:travis encrypt "http://<ip>:9000/travis" --add notifications.webhooks.urls
.
- Where
<ip>
is the VM ip address hosts the bot service. The:9000/travis
is the port and path where the bot monitors. - Encrypting the webhoot url should address the issue of forked repos sending notifications to the mailing list.
- The Bot receives the POST request, unparses the payload, generates it into an HTML email.
- Send the email to builds@flink.apache.org using the configured email address and password.
- Prepare a VM which has a public ip address.
- Clone/Download the project in the VM.
- Add
config.properties
file underflink-notification-bot/src/main/resources
, and fill inemail.from
, andemail.password
andemail.to
. Takeconfig.properties.example
as an example. mvn clean package -DskipTests
under the root of the project to build the project.- run
./run.sh &
in background. - Checks the
bot.log
to see whether the bot service is launched successfully.
- Verifying the request signature.