Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Documentation for combined-infracost-comment/README.md might have a config error #81

Open
atilasantos opened this issue Dec 1, 2023 · 5 comments

Comments

@atilasantos
Copy link

Within the bitbucket subsection we should remove the 261 line and put it right after the line 257. In the way it is, all apply workflows will be considered as failed because there'll be no files there when the run is executed.

See images with my tests.
With the config provided in repo
With the config provided in repo
With the config changed
With the config changed

@atilasantos
Copy link
Author

I can myself work on this fix

@alikhajeh1
Copy link
Member

@atilasantos thanks! It seems ok to combine them but maybe handle the error case where infracost comment bitbucket does an exit 1 and fails; in that case I think the second run command should still run, right?

@atilasantos
Copy link
Author

Yes, you are right!
We can add a ';' at the end of infracost command and either it is successfully executed or not, the rm command will be executed.

What'd you think?

@alikhajeh1
Copy link
Member

alikhajeh1 commented Dec 6, 2023

yeah or first_command_here || echo "Always run the next cleanup step even if this command fails"

@alikhajeh1
Copy link
Member

@atilasantos I'm curious if you're still using https://github.com/infracost/infracost-atlantis/blob/master/examples/infracost-comment/README.md#running-with-bitbucket ? If so, can you please share your yaml steps so we can review and update that doc if needed?

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

No branches or pull requests

2 participants