Description
Describe the bug
Concourse extension (in vscode) doesn't allow on_error
in Steps
, although it's allowed in Jobs
. I get the validation error: Unknown property 'on_error' for type 'TaskStep'
Regarding the docs (https://concourse-ci.org/on-error-hook.html and https://concourse-ci.org/jobs.html#schema.job.on_error) on_error
is valid for both and it actually works in our environment. It seems, that the fix for the issue #383 is only for the hook in Jobs
.
To Reproduce
pipeline.yml
jobs:
- name: myjob
serial: false
plan:
- task: build-app
params:
STAGE: dev
APP: app
file: build.xml
on_success:
put: buildstatus
params:
context: build
repo: src
state: SUCCESSFUL
on_error:
put: buildstatus
params:
context: build
repo: src
state: FAILED
Sample
The original issue had been fixed with this commit #10d1e620ad15f5add13526341e41a394e6c6bad3. In best case, It's a "quick win" and there is just one line addProp(step, subStep, "on_error", step);
to be added in line 424:
https://github.com/spring-projects/sts4/blob/9ef209da74b16a6d28fee3748d55711e5e55a292/headless-services/concourse-language-server/src/main/java/org/springframework/ide/vscode/concourse/PipelineYmlSchema.java#L420-L430
Because my java skills are way outdated and I assume, that some additional test cases should be added here, I would be happy, if someone could take over this one 😉