Details
-
Suggestion
-
Resolution: Duplicate
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.