hashicorp / hashicorp/nomad

[feature] Automate run after plan (with check-index)

Open
#4,402 0 comments 0 reactions 0 assignees View on GitHub
theme/cli type/enhancement
Dominant language
Go
Stars
17k
Forks
2.1k
Avg merge
1d 9h
Merged PRs (30d)
105

Description

As life is all about doing as less repetitive work as possible, automation is key.
If Nomad job descriptor files are to be templated, the first thought is using `consul-template`. But then: why not automate the execution of `run` and `plan` too?

The beauty of the Nomad 2 stage `plan` -> `run` idea, is that the `check-index` returned by `plan`, should give enough confidence to automatically go on with the `run`.
But.... I don't see any option (without any stdout scraping hacks) to automatically pass the `check-index` from `plan` to `run`.

Would it be an idea to either add for instance a `-run-on-success` parameter to the `plan` command?
Anther option would be to give the `run` command an option to write the `check-index` to a state file, which can be used as input to the `run` command (thinking that this can be enhanced to remote plan/run state management like in Terraform).

Any thoughts?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.