Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Proposal: --detailed-exitcode option #75

Open
ryansb opened this issue Dec 18, 2017 · 2 comments
Open

Proposal: --detailed-exitcode option #75

ryansb opened this issue Dec 18, 2017 · 2 comments

Comments

@ryansb
Copy link
Contributor

ryansb commented Dec 18, 2017

For scripting use cases where I've got a CI system that I want to raise a status for different changeset states.

Example:

formica change -c dev-env.config.yml
STATE=$(aws cloudformation describe-change-set --stack-name ${STACK} --change-set-name ${STACK}-change-set --query ExecutionStatus --output=text)
if [[ $STATE == "AVAILABLE" ]] ; then formica deploy -c dev-env.config.yml ; fi

Really what I want is a structured output that I can jp or jq into telling me: how many resources have changed, whether the changeset has any changes, and the state of the changeset. The awscli command above only does the latter, and I don't want to blindly formica deploy and have it fail if there are no changes in the changeset.

@flomotlik
Copy link
Collaborator

Hmm so I assume the use case is you have template files in a repo with app code, you want to first go through deploying the templates and once those pass deploy the app code. If there are no changes in the template though you want to go through change and deploy successfully so the app deployment steps can run successfully.

To solve this we could simply add an argument to change that makes it succeed if there are no changes in the changeset. Then in deploy another argument that ignores unavailable change sets but doesn't fail.

Or is there are more comprehensive use case for this? I don't want to add any machine readable output, the awscli does that already (also gives you the List of Changes).

@flomotlik
Copy link
Collaborator

But I definitely want something like this in, otherwise its not usable for the use case I described in CI, which is bad.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants