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

Option to override comment content from custom workflow #2602

Open
1 task
askoriy opened this issue Oct 19, 2022 · 0 comments
Open
1 task

Option to override comment content from custom workflow #2602

askoriy opened this issue Oct 19, 2022 · 0 comments
Labels
feature New functionality/enhancement Stale

Comments

@askoriy
Copy link

askoriy commented Oct 19, 2022

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.

Describe the user story

We have Terragrunt, so use a custom workflow. We want to see only terraform plan output in the comment, but all pipeline output in the status detail or live console output. Currently, all output is printed to the comment, and it's not possible to separately control the comment content from the custom workflow.

Describe the solution you'd like

Special environment variable, that if pointed to file, then Atlantis publishes its content to the comment instead of pipeline output; or another way to form custom comment content.
Print all output to the comment if the variable is not defined, or file not exists or pipeline failed.

Describe the drawbacks of your solution

To show only the plan if ran successfully we use a trick in workflow steps:

...
workflows:
  terragrunt:
    plan:
      steps:
      - env:
          name: TERRAGRUNT_TFPATH
          command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
      - run: terragrunt init -no-color &> ${PLANFILE}.log || (cat ${PLANFILE}.log; false)
      - run: terragrunt plan -no-color -out ${PLANFILE} >> ${PLANFILE}.log 2>&1 || (cat ${PLANFILE}.log; false)
      - run: terragrunt show -no-color ${PLANFILE}
...

But it has a few drawbacks:

  • no live console logs during running the commands
  • if run is success, then additional output is the log from link in the status detail

Describe alternatives you've considered

None

@askoriy askoriy added the feature New functionality/enhancement label Oct 19, 2022
@dosubot dosubot bot added the Stale label Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement Stale
Projects
None yet
Development

No branches or pull requests

1 participant