concourse / time-resource

a resource for triggering on an interval
Apache License 2.0
44 stars 32 forks source link

Allow check to return empty list of versions #23

Closed JohannesRudolph closed 4 years ago

JohannesRudolph commented 6 years ago

I'm (ab)using time resources as an "OR" deployment gateway in my pipeline. Essentially, I'm running put on either one of two time-resources in my pipeline and get those two resources on another job as withtrigger: true`.

This works great, a put on either resource triggers the desired deploy job. The only nitpick is that time-resource complains about failed checks:

resource script '/opt/resource/check []' failed: exit status 1

stderr:
invalid configuration: must configure either 'interval' or 'start' and 'stop'

It would be useful if time-source could be configured to be "put-only" so that it doesn't need a interval or start/stop configuration.

jgf commented 6 years ago

I'm having the same issue.

mpwoerner commented 6 years ago

Also having this issue

vito commented 4 years ago

Sorry but I don't think this can/should be supported. Having versions that are written by put but never detected from check causes problems in other areas - notably [ci skip]. We plan to fix this in https://github.com/concourse/concourse/issues/3463 which will end up being in direct conflict with your use case, so we should probably figure out the long-term solution there.