Display custom information as tab in Deployments preview and summary

Issue #17049 open
Carl Pettersson
created an issue

We would like to post "status updates" from pipelines to both pull requests and the deployment screen.

For a pull request, this could be something like how some metric is changed by the PR, or our infrastructure-as-code use case of calculating the diff with current running systems.
These status updates would hopefully be shown above the comments section, and would be updated on every pipeline run.
It would be sufficient if it could just capture the output of a specific step in the pipeline and post it verbatim.

For deployments, we'd like a similar mechanism that could replace/augument the diff screen shown before promoting a build.
We currently run a pipeline step between our deployments that calculates the changes that will be made by running the deploy, but this requires some back-and-forth between screens. Having a new tab alongside commits/issues/diffs would be perfect.

Comments (4)

  1. Aneita Yang staff

    Hi @Carl Pettersson,

    Thanks for reaching out.

    I'd love to get a better understanding for what you'd like to see in the Deployments dashboard (preview and summary screen) that isn't already covered. We currently show the diff which calculates the changes for you. Can you elaborate on why this isn't sufficient and how we can make the content shown in the preview and summary more useful?

    As for posting updates to your PR, you can use the comments API to add a comment to your pull request. The caveat to using this is that you cannot update the comment. Instead, every update will be posted as a new comment. Does this suit your use case?


  2. Carl Pettersson reporter

    Hi @Aneita Yang,
    Our use-case is that we can calculate a "better/domain-specific diff" than the git diff, which we'd like to show. For example, we manage our cloud infrastructure with Terraform via pipeline deployments. We can then ask Terraform for what changes it would do, given the current state of the infrastructure (eg create these virtual machines, update that DNS record, delete this netwrk, etc). This is not always obvious directly from the git diff, and in case someone made a manual change in the infrastucture, the correcting change Terraform does would not be reflected in the git diff.
    So, what we currently do is that we have a pipeline step before each environment deployment which outputs this change plan. The ergonomics of this isn't that good though, and it happens that unexpected changes happen when someone didn't check this diff before running the deployment because of the extra clicks to see it. So it'd be great if we could have this output available in the deployment preview!

    Posting comments would work, we'll see if we can do some workaround to delete the previous comments if it is not possible to update them or such. Are the PR pipelines automatically authorized to post comments, or do we need to manage a service account for this?

  3. Aneita Yang staff
    • changed status to open

    Thanks for elaborating @Carl Pettersson.

    We currently don't have plans to support posting custom information to the deployment preview/summary. I'll rename this issue and open it up in the meantime to gauge the interest of other users in seeing the same thing.

    In terms of using the API to post comments to your PR, pipelines is not automatically authorised to do this. We are working on some changes to make this simpler but in the meantime, you can set up an app-specific password and make it available as a variable in your pipeline to use the API.

    Hope this helps.

  4. Log in to comment