Skip to content

Instantly share code, notes, and snippets.

@suhlig
Created February 20, 2024 21:58
Show Gist options
  • Save suhlig/cdcbe6b69b6f19bcfd4819f676d67264 to your computer and use it in GitHub Desktop.
Save suhlig/cdcbe6b69b6f19bcfd4819f676d67264 to your computer and use it in GitHub Desktop.

Example for a Concourse pipeline triggered my a webhook

Assmuming this pipeline was set as

$ fly --target example set-pipeline --pipeline manual-trigger --config manual-trigger.yml

then you can trigger a new build with

$ curl --request POST 'https://example.com/api/v1/teams/main/pipelines/manual-trigger/resources/manual/check/webhook?webhook_token=supers3cret'
jobs:
- name: manually-triggered-job
plan:
- get: manual
trigger: true
- task: some-task
config:
platform: linux
image_resource:
type: registry-image
source: { repository: alpine }
inputs: [ name: manual ]
run:
path: sh
args:
- -ec
- |
cat manual/input
resources:
- name: manual
type: time
source: { interval: 1s } # ensure there is a new version each time we check manually
check_every: never
webhook_token: supers3cret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment