Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-13518

Show comments / grouping commands in Bitbucket Pipelines logs

    XMLWordPrintable

Details

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

    Description

      When setting up more complex pipelines, I think it is useful to add some comments so it is possible to document what is happening. However, when putting comments inside of the build execution unit they get ignored and do not show up in the pipeline's result log.

      E.g, a script that requires SSH access to servers (taken from the Pipelines docs:

      #!yml
      
      - step:
          script:
              - # Set up SSH so we can access bitbucket
              - mkdir -p ~/.ssh
              - cat my_known_hosts >> ~/.ssh/known_hosts
              - (umask  077 ; echo $MY_SSH_KEY | base64 --decode > ~/.ssh/id_rsa)
              # Clone some repo we need
              - git clone git @bitbucket.org:<account_name>/<repo_name>.git
              ## Do stuff with the repo we need ##
              - cd repo_name
              - do stuff
      

      The log will show something like:

      > Build setup
      > mkdir -p ~/.ssh
      > cat my_known_hosts >> ~/.ssh/known_hosts
      > (umask  077 ; echo $MY_SSH_KEY | base64 --decode > ~/.ssh/id_rsa)
      > git clone git @bitbucket.org:<account_name>/<repo_name>.git
      > cd repo_name
      > do stuff
      

      Completely ignoring the (IMO useful) comments. The only way to display "comments" inside the logs is by using e.g an echo command, like echo Do stuff with the repo we need.

      It would be handy to have some way to document what is being done inside the log, e.g by printing commented commands. Some way to add some extra info here, like making the comments appear differently than commands in the logs or the option to group commands, would make this feature even better.

      Attachments

        Activity

          People

            Unassigned Unassigned
            48f00a7333f7 Seppe Stas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: