As stated in #1575, rerunning the same task even though something external to the job-spec has changed, e.g. an artifact, does not happen in between GC cycles. The currently workaround is to trigger a GC via the HTTP API and then resubmit the job. Adding a --force flag to nomad run will make this more convenient and is more intuitive to the user.
Hey guys. Now the way (with downtime) would be to stop the job and then run it again?
I did not find any explanation regarding the trigger GC in docs. Perhaps you can enlighten me :)
Thanks
Dunno about GC, but what I do is having an env var in the HCL called "CHANGE_ME" which I replace with sed with a random number (jenkins build number of the job that re-submits the nomad job) and because it's always different it re-evaluates and downloads the new docker image.
I'd pretty much like to have something like this as well, but especially for artifact{} I'd love to have nomad compare current runs artifacts checksums with remote checksums and trigger a re-run if checksums mismatch. e.g. using the same url in artifact{} source and allow to reschedule a job if the artifact had been updated.
Currently my ultimate goal is to maintain .nomad files with git and have continuous deployment with nomad without ever touching the jobspec files.
Most helpful comment
Dunno about GC, but what I do is having an env var in the HCL called "CHANGE_ME" which I replace with sed with a random number (jenkins build number of the job that re-submits the nomad job) and because it's always different it re-evaluates and downloads the new docker image.