5.6 Resources
Resources are the objects that are going to be used for jobs in the pipeline. They are listed under the resources
key in the pipeline configuration.
Resources are fetched via get
steps and pushed to via put
steps.
Each configured resource consists of the following attributes:
name: string
Required. The name of the resource. This should be short and simple. This name will be referenced by build plans of jobs in the pipeline.
type: string
Required. The type of the resource. Each worker advertises a mapping of resource-type -> container-image
; type
corresponds to the key in the map.
To see what resource types your deployment supports, check the status of your worker pool via the /api/v1/workers
API endpoint.
source: object
Optional. The location of the resource. This varies by resource type, and is a black box to Concourse; it is blindly passed to the resource at runtime.
To use git
as an example, the source may contain the repo URI, the branch of the repo to track, and a private key to use when pushing/pulling.
By convention, documentation for each resource type's configuration is in each implementation's README
.
You can find the source for the resource types provided with Concourse at the Concourse GitHub organization.
version: object
check_every: string
Optional. Default 1m
. The interval on which to check for new versions of the resource. Acceptable interval options are defined by the time.ParseDuration function.
tags: [string]
Optional. Default []
. A list of tags to determine which workers the checks will be performed on. You'll want to specify this if the source is internal to a worker's network, for example. See also tags
step modifier.
webhook_token: string
Optional. If specified, web hooks can be sent to trigger an immediate check of the resource, specifying this value as a primitive form of authentication via query params.
After configuring this value, you would then configure your hook sender with the following painfully long path appended to your external URL:
/api/v1/teams/TEAM_NAME/pipelines/PIPELINE_NAME/resources/RESOURCE_NAME/check/webhook?webhook_token=WEBHOOK_TOKEN
Note that the request payload sent to this API endpoint is entirely ignored. You should configure the resource as if you're not using web hooks, as the resource config is still the "source of truth."