Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【BUG】the setting variable not work #92

Open
yozman opened this issue Jun 20, 2016 · 4 comments
Open

【BUG】the setting variable not work #92

yozman opened this issue Jun 20, 2016 · 4 comments

Comments

@yozman
Copy link

yozman commented Jun 20, 2016

heyguys,

when I try to use webhook as string it works like this:

notifications:
  webhooks:
    urls:
      - https://hooks.pubu.im/services/whatthefly
    on_start: always

but when I try to replace the token whatthefly,
use Environment Variables like this:

notifications:
  webhooks:
    urls:
      - https://hooks.pubu.im/services/$TOKEN
    on_start: always

it doesn't work, I'm sure I have the right setting.

could you tell me what should I do to let it work?

@huan
Copy link

huan commented Aug 5, 2016

I have the same issue, webhooks does not work with urls include ENVIRONMENT VARIABLES ?
my travis.yml here: https://github.com/zixia/wechaty/blob/master/.travis.yml

@BanzaiMan
Copy link
Contributor

Notifications don't have access to the environment variables.

@huan
Copy link

huan commented Aug 6, 2016

@BanzaiMan thanks for point this out. It seems the document seems not clear enough, and lots of project use environment variables in notifications, like those:

  1. https://github.com/meanjs/mean/blob/master/.travis.yml#L45
  2. https://github.com/machinekit/machinekit/blob/master/.travis.yml#L3

I have 1 more question:

if I want to use gitter & docker hub webhooks in notifications, how could I protect my webhook key? or I must write plain text url in travis.yml?

--- update
I use after_success with curl -X POST $URL now, it looks better.

@rohngonnarock
Copy link

When I try to use Travis Environment variable which has url in it then it breaks the build.

databaseURL = "https://example.com"

  The command "sed -i "s/EnvdatabaseURL/$databaseURL/g" src/app/config/config.ts" failed and exited with 1 during .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants