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

proxy support #39

Closed
toaler opened this issue Jan 13, 2017 · 1 comment
Closed

proxy support #39

toaler opened this issue Jan 13, 2017 · 1 comment

Comments

@toaler
Copy link

toaler commented Jan 13, 2017

The hosts that drone run's requires the use of proxies in order to communicate externally. I've setup the following .drone.yml file where the proxy environment variables are set as well as the configuration for the slack plugin. We have no issues using curl to post to the slack webhook while running from the drone host, so the proxy is working. Should this plugin support my use case?

environment:
HTTPS_PROXY: http://proxy:8080
HTTP_PROXY: http://proxy:8080
...

slack:
webhook_url: https://hooks.slack.com/services/XXX/YYY/ZZZ
channel: #build_health
username: drone
on_started: true
on_success: true
on_failure: true

@bradrydzewski
Copy link
Member

This is already supported at the Drone level.

If you are using drone:0.4 you pass these variables to the server:

docker run -e HTTPS_PROXY=... -e HTTP_PROXY=... drone/drone:0.4

If you are using drone:0.5 you pass these variables to the agent:

docker run -e HTTPS_PROXY=... -e HTTP_PROXY=... drone/drone:0.5 agent

Drone will then automatically pass these variables to each plugin and Docker container in your build. You can follow the implementation at https://github.com/drone/drone/blob/master/yaml/transform/environ.go

Note that if you do not want to use a global setting, you can set these values directly in your yaml file using the following notation (drone:0.5):

pipeline:
  slack:
    image: plugins/slack
    environment:
      HTTPS_PROXY: http://proxy:8080
      HTTP_PROXY: http://proxy:8080

If you have any further usage questions feel free to use one of our support forums:
http://stackoverflow.com/questions/tagged/drone.io
https://gitter.im/drone/drone
http://discourse.drone.io/

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

2 participants