You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

65 lines
1.3 KiB

---
task-config: &task-config
platform: linux
image_resource:
type: registry-image
source: { repository: busybox }
jobs:
- name: job
public: true
plan:
- task: successful-task
config:
<< : *task-config
run:
path: sh
args: ["-lc", "exit 0"]
on_success:
task: task-success
config:
<< : *task-config
run:
path: echo
args: ["This task succeeded!"]
on_abort:
task: task-aborted
config:
<< : *task-config
run:
path: echo
args: ["This task was aborted!"]
- task: failing-task
config:
<< : *task-config
run:
path: sh
args: ["-lc", "exit 1"]
on_failure:
task: task-failure
config:
<< : *task-config
run:
path: echo
args: ["This task failed!"]
on_success:
task: job-success
config:
<< : *task-config
run:
path: echo
args: ["This job succeeded!"]
on_failure:
task: job-failure
config:
<< : *task-config
run:
path: echo
args: ["This job failed!"]
on_abort:
task: job-aborted
config:
<< : *task-config
run:
path: echo
args: ["This job was aborted!"]