Trigger job with HTTP request #8917
-
|
Hi, I looked around but I didn't find a proper answer. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
I think the time resource would make a good trigger. 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: supers3cretAssmuming this pipeline was set as $ fly --target example set-pipeline --pipeline manual-trigger --config manual-trigger.ymlthen 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'Edit: I made a gist as the canonical source for the example above |
Beta Was this translation helpful? Give feedback.
I think the time resource would make a good trigger.
Assmuming this pipeline was set as