I’m trying to set up the slack notification for Travis cron job. The purpose is to receive notification on slack only when the build is triggered as cron job.
.travis.yml
I’m not able to receive the notification on slack however the cron job is running perfectly on travis.
On Travis, it is showing that the $TRAVIS_EVENT_TYPE = cron
condition is invalid. In the docs it is mentioned to check for $TRAVIS_EVENT_TYPE = cron
if the build is triggered as cron job.
Travis config output:
notifications.slack.if
: invalid condition$TRAVIS_EVENT_TYPE = cron
notifications.slack
: skipping notification slack because its condition does not match:$TRAVIS_EVENT_TYPE = cron
Can anyone point out/suggest what is being done wrong here and also what should be the suitable position to place notification in .travis.yml
( top or bottom)? Thanks.