2

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?

Nils Langner
  • 313
  • 2
  • 9

2 Answers2

1

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.

renefritze
  • 2,167
  • 14
  • 25
0

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.

SilentGuy
  • 1,867
  • 17
  • 27