A generic resource for hitting an HTTP URL based on a small alpine base image. Useful for generic HTTP REST APIs (e.g. notifications, comments, etc..). Because this is a resource, it has access to the build metadata.
Add the following to the resource_types
section of a pipeline config:
---
resource_types:
- name: concourse-http-resource
type: docker-image
source:
repository: edtan1/concourse-http-resource
---
resources:
- name: my-http-resource
type: concourse-http-resource
source:
url: https://mattermost.com/hooks/randomhash
method: "POST"
headers:
Content-Type: "application/json"
-
url
: Required. HTTP URL to access. -
insecure
: Optional. Set totrue
to ignore SSL errors. Defaults tofalse
. -
method
: Optional. HTTP method to use. Defaults to GET. -
headers
: Optional. Map of HTTP headers to send
This resource currently does nothing for check
.
This resource currently does nothing for in
.
Access an HTTP URL using curl.
plan:
- put: my-http-resource
params:
data_text: "The build $BUILD_NAME $BUILD_ID completed"
-
data_file
: Optional. File containing data to be sent with the request. Cannot be specified at the same time asdata_text
. -
data_text
: Optional. Text to be sent with the request. Cannot be specified at the same time asdata_file
.