Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Pipeline step results are truncated

I am running a step with some "aws cli" commands to pull the values from existing AWS resources and then running "aws cloudformation deploy" a template passing those parameters value.

 

However, step logs in log viewer only displaying limited number of lines and i am unable to see the full log to understand or debug anything.

 

End of logs: Even after downloading the logs:

+ dwh_iam_role="$(aws cloudformation describe-stacks --stack-name ${PROJECT_SHORT_NAME}-${ENVIRONMENT}-infra --profile ${BITBUCKET_BRANCH} | grep -A1 OutputKey | grep -A1 DWHCopyExecutionRoleArn | grep OutputValue | tr -d '"'|cut -d':' -f 2- | sed s/\"//g | sed -e 's/^[ \t]*//')"

+ dwh_elb_dns_name="$(aws cloudformation describe-stacks --stack-name ${PROJECT_SHORT_NAME}-${ENVIRONMENT}-infra --profile ${BITBUCKET_BRANCH} | grep -A1 OutputKey | grep -A1 DWHNetworkLoadBalancerDnsName | grep OutputValue | tr -d '"'|cut -d':' -f 2 | sed s/\"//g | sed -e 's/^[ \t]*//')"

1 answer

0 votes

@Anshul Shahif agter such text there are indeed no logs, it can be that something wrong with the script

dwh_iam_role="$(aws cloudformation describe-stacks --stack-name ${PROJECT_SHORT_NAME}-${ENVIRONMENT}-infra --profile ${BITBUCKET_BRANCH} | grep -A1 OutputKey | grep -A1 DWHCopyExecutionRoleArn | grep OutputValue | tr -d '"'|cut -d':' -f 2- | sed s/\"//g | sed -e 's/^[ \t]*//')"

or

dwh_elb_dns_name="$(aws cloudformation describe-stacks --stack-name ${PROJECT_SHORT_NAME}-${ENVIRONMENT}-infra --profile ${BITBUCKET_BRANCH} | grep -A1 OutputKey | grep -A1 DWHNetworkLoadBalancerDnsName | grep OutputValue | tr -d '"'|cut -d':' -f 2 | sed s/\"//g | sed -e 's/^[ \t]*//')"

Try to debug those scripts and see why they can fail (perhaps some keywords of grep command do not work. Also I recommend to use jq tool, since it parses json structure, that aws cli responds with). 

Regards, Galyna

Nothing wrong with the script. Pipeline was successful.

It is a bug in bitbucket pipelines instead, where more number of commands sometimes does not log all commands at right place.

There is an issue opened with the respective team about it.

https://jira.atlassian.com/browse/BCLOUD-18574

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira Service Management

Security Advisory for Jira Service Management

On October 20, 2021, Atlassian published a security advisory for Jira Service Management. The full advisory is available at this link.  We've seen a number of questions already asking for...

76 views 0 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you