Reputation: 303
I am using travis-ci to test my project Smoke (https://github.com/phmLabs/Smoke). When the test ran I want to report the result to a different system via webhook. The problem is that the webhook url contains a secret key I don't want to put inside my travis.yml file. So I tried using an environment var:
notifications:
webhooks: http://monitor.koalamon.com/webhook/travis/?api_key=$KOALAMON_API_KEY
unfortunateli the environment variable gets escaped and I can see
127.0.0.1 - - [26/May/2016:21:28:25 +0200] "POST /webhook/travis/?api_key=%24KOALAMON_API_KEY HTTP/1.1" 200 278 "-" "Faraday v0.9.2"
in my apache logs. Does anybody know how to solve this problem?
Upvotes: 2
Views: 501
Reputation: 2203
Environment variable is not supported in notifications. There is a bug in github: https://github.com/travis-ci/travis-ci/issues/6387
Devs are saying that it is not in their roadmap.
Upvotes: 0
Reputation: 2243
A workaround could be using a custom script in the after_script
section. Those get executed in both fail and success cases of the script
section. Ofc you'd need a way to re-discover the results of your test.
Upvotes: 1