Skip to content

Add support for "initial_version" to allow auto-populating the first version#63

Merged
xtremerui merged 4 commits intoconcourse:masterfrom
lrstanley:feature/initial-version
Feb 15, 2022
Merged

Add support for "initial_version" to allow auto-populating the first version#63
xtremerui merged 4 commits intoconcourse:masterfrom
lrstanley:feature/initial-version

Conversation

@lrstanley
Copy link
Member

This PR adds support for optionally generating the first version initially (when using start and stop), even if it hasn't gone into the first time window yet. This is very helpful for adding the ability to manually run the job, as Concourse does not let you run a job when it has an input that's set to trigger: true and an input with no versions yet.

Does it make more sense to output something like time.Time{}, as that obviously is more obvious that it's some kind of default timestamp -- or, output the current time like I'm doing now? I.e. if the user did set initial_version, it's not inherently obvious if other people look at the pipeline and the time resource versions, that it was due to this new field.

I'm not 100% sure this is the overall best solution, but to me it seems like the most straightforward way until there are enhancements to Concourse itself.

Signed-off-by: Liam Stanley <me@liamstanley.io>
Signed-off-by: Liam Stanley <me@liamstanley.io>
Signed-off-by: Liam Stanley <me@liamstanley.io>
Signed-off-by: Liam Stanley <me@liamstanley.io>
@xtremerui
Copy link
Contributor

LGTM! Thank you for the detail documentation.

@xtremerui xtremerui merged commit fe48102 into concourse:master Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't manually trigger a pipeline outside time range Adding a zero time

2 participants