2.8 Manually triggered job example
A job can be triggered by a resource. After it's complete, the next job can run automatically or manually.
Pipeline Configuration
---
resources:
- name: every-30s
type: time
icon: clock-outline
source:
interval: 30s
jobs:
- name: triggered-first
public: true
build_log_retention:
builds: 20
plan:
- get: every-30s
trigger: true
- task: simple-task
config:
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
run:
path: echo
args: ["Hello, world!"]
- name: not-triggered
public: true
plan:
- get: every-30s
passed: [triggered-first]
- task: simple-task
config:
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
run:
path: echo
args: ["Hello, world!"]
- name: triggered-second
public: true
build_log_retention:
builds: 20
plan:
- get: every-30s
passed: [triggered-first]
trigger: true
- task: simple-task
config:
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
run:
path: echo
args: ["Hello, world!"]