spring-projects / sts4

The next generation of tooling for Spring Boot, including support for Cloud Foundry manifest files, Concourse CI pipeline definitions, BOSH deployment manifests, and more... - Available for Eclipse, Visual Studio Code, and Theia
https://spring.io/tools
Eclipse Public License 1.0
870 stars 203 forks source link

Concourse extension doesn't know about on_error for jobs #383

Closed marco-m closed 4 years ago

marco-m commented 4 years ago

Consider the following pipeline:

resource_types:

- name: cogito
  type: registry-image
  check_every: 24h
  source:
    repository: ((docker-registry))/cogito

resources:

- name: gh-status
  type: cogito
  check_every: 24h

- name: repo.git
  type: git
  source:
    uri: git@github.com:((github-owner))/((repo-name)).git

jobs:

  - name: autocat
    on_error:                     # <== problem reported here
      put: gh-status
      inputs: [repo.git]
    plan:
      - get: repo.git
        trigger: true
      - put: gh-status
        inputs: [repo.git]

The extension wrongly reports for on_error:

Unknown property 'on_error' for type 'Job'.

The documentation for on_error is: https://concourse-ci.org/on-error-step-hook.html#on_error

kdvolder commented 4 years ago

The doc that you linked to seems to be about a 'step' hook. And it is really not clear from that doc that it is something you can put on a job directly.

There is similar docs on jobs, but it doesn't make mention of on_error. Only on_success, on_failure and on_abort are mentioned there: https://concourse-ci.org/jobs.html (scroll down to the bottom).

Are you sure that 'on_error' works on job (rather than step)? If so I can certainly add support for this, but since its not mentioned in the doc, maybe it is on oversight in the docs, and we should also raise a ticket with concourse docs as well.

marco-m commented 4 years ago

Ah, you were faster than me with upstream documentation, thanks!

kdvolder commented 4 years ago

Noticed another missing attribute while looking at the docs for Job. Created ticket here: https://github.com/spring-projects/sts4/issues/389