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

Notify failing with slack plugin #64

Closed
vishal24tuniki opened this issue Sep 24, 2017 · 6 comments
Closed

Notify failing with slack plugin #64

vishal24tuniki opened this issue Sep 24, 2017 · 6 comments

Comments

@vishal24tuniki
Copy link

vishal24tuniki commented Sep 24, 2017

Pipeline failing in notify when the event is Pull request with following error
Post : unsupported protocol scheme ""

workspace:
  base: /go
  path: src/github.com/xxx/xxx

pipeline:
  backend:
    image: golang:1.8.3
    commands:
      - go get github.com/tools/godep
      - go get -d ./...
      - godep restore ./...
      - export GOBIN=$GOPATH/bin
      - go vet ./...
      - go install

  notify:
    image: plugins/slack
    secrets: [ slack_webhook ]
    when:
      status: [ success, failure ]
    template: >
      {{#success build.status}}
        {{repo.name}} ({{build.branch}}) <{{ build.link }}|{{ repo.owner }}/{{ repo.name }}#{{truncate build.commit 8}}> build succeeded on {{uppercasefirst build.event}}. Good job {{ build.author }}.
      {{else}}
        {{repo.name}} ({{build.branch}}) <{{ build.link }}|{{ repo.owner }}/{{ repo.name }}#{{truncate build.commit 8}}> build failed on {{uppercasefirst build.event}}. Fix me please {{ build.author }}.
      {{/success}}


@bradrydzewski
Copy link
Member

bradrydzewski commented Sep 24, 2017

Post : unsupported protocol scheme ""

This happens when your webhook secret is not configured properly and therefore is not being passed to the plugin.

@tboerger
Copy link
Contributor

Maybe you have limited the secret to specific events which doesn't work for this case?

@gtaylor
Copy link

gtaylor commented Sep 24, 2017

This lack of error message confused us at the time as well. May be worth a separate issue to improve the feedback.

@vishal24tuniki
Copy link
Author

Thanks @tboerger event pull_request got missed out for the secret. I've added it using the update cli command of drone secret.

@tboerger
Copy link
Contributor

@gtaylor would make sense to add an empty check for this variable, than it gets more obvious where it comes from.

@vishal24tuniki
Copy link
Author

I am closing the issue

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