Search code examples
jenkinscontinuous-integrationjenkins-pluginshudson

Jenkins: Trigger a future build once a job is completed


I can't seem to find the best way to do that.

I have a Jenkins job I ran manually (say a job that creates a temporary file somewhere).

I want to be able to clean this up (e.g. delete the temporary file) after 2-3 hours.

I was thinking adding a Post Deploy action that will run a job with some parameters + some delay. But I can't find anything like that.

I've noticed several schedule plugins or REST API options, but nothing that as simple as "When Succesfully Building A, Build B in X minutes".

Suggestions?

Suggestions?


Solution

  • You could exploit the Quiet period.

    job1 -> (sleep -> fake-job) -> job2

    so let job1 trigger the fake-job whch has a quiet period of 7200 seconds and this fake-job will trigger your cleanup job.