cloudfoundry-community / slack-notification-resource

Concourse CI resource for sending notifications to Slack.
MIT License
75 stars 81 forks source link

docker-image / registry-image cause different error, but both don't work #68

Closed kwladyka closed 5 years ago

kwladyka commented 5 years ago

Issue: send slack notification doesn't work for me. What is interesting depend on type docker-image / registry-image it returns different error.

1)

resource_types:
  - name: slack-notification
    type: docker-image
    source:
      repository: cfcommunity/slack-notification-resource

resources:
  - name: channel:ops
    type: slack-notification
    icon: slack
    source: {url: (slack.logs-hook)}
    on_failure:
      put: channel:ops
      params:
        attachments: [{color: warning, text: $BUILD_PIPELINE_NAME $BUILD_JOB_NAME $BUILD_NAME}]

logs output:

file not found

2) If I change type for resource definition:

resource_types:
  - name: slack-notification
    type: registry-image
    source:
      repository: cfcommunity/slack-notification-resource

logs output:

* Rebuilt URL to: ***WEBHOOK URL REDACTED***/
* getaddrinfo(3) failed for ***WEBHOOK URL REDACTED***:80
* Couldn't resolve host '***WEBHOOK URL REDACTED***'
* Closing connection 0
curl: (6) Couldn't resolve host '***WEBHOOK URL REDACTED***'

Summary

I have correct URL in secret. Also file not found doesn't make sense here. Not sure if it is concourse bug or this resource. I don't know how to fix it.

cocnourse 5.1.0

kwladyka commented 5 years ago

It was concourse bug.