-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Searching for pre-existing feature requests helps us consolidate datapoints for identical requirements into a single place, thank you!
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
- I'd be willing to implement this feature (contributing guide)
Describe the user story
When executing tools or scripts in Custom Workflow, there are situations where you may want to confirm that they are “running in Atlantis.”
For example, other CI services provide environment variables such as the following, which can be used to determine the execution environment.
However, it does not exist in Atlantis.
https://www.runatlantis.io/docs/custom-workflows#native-environment-variables
The github-comment tool identifies the execution environment based on these environment variables.
https://suzuki-shunsuke.github.io/github-comment/complement
Describe the solution you'd like
This can be resolved by providing the environment variables CI=true and ATLANTIS=true as Native Environment Variables.
https://www.runatlantis.io/docs/custom-workflows#native-environment-variables
Describe the drawbacks of your solution
Currently, we are using ATLANTIS_TERRAFORM_VERSION for determination, but I don't think it's very appropriate. Because this variable is intended to store the Terraform version.
Describe alternatives you've considered
related issue: suzuki-shunsuke/go-ci-env#583 (comment)