Can a job be executed exactly once per pipeline?

#1

We have a pipeline where many jobs only need to be run once, initially after the pipeline is set. Is it possible to have these jobs automatically kicked off when the pipeline is initially created and unpaused ? https://github.com/concourse/time-resource#trigger-once-within-time-range seems like one way to achieve this but apparently it keeps repeating according to https://github.com/concourse/time-resource/issues/33 and feels more like a hack. Is there a built-in way to do this without having to use an external resource for the initial trigger ?

Thanks,
David

0 Likes

#2

Use fly trigger-job

foo bar baz adding characters so i reach the minimum limit

0 Likes

#3

Thanks that’s what we’re doing now, I was hoping to avoid that.

0 Likes

#4

Its sort of a hack but you can just use a really large interval to trigger once.

- name: one-time-trigger
  type: time
  source:
    interval: 999999h
0 Likes

#5

@crsimmons haha you win points for creativity here, I never considered that approach :slight_smile:

0 Likes