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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Shell commands show as error status in the build log

Edited

Hi, bit of an odd one.

Running a plan with a task of type Interpreter as Shell. Our script body for a simple test is;

#!/usr/bin/env bash
set -euxo pipefail

export
echo $?

which bash
echo $?

...

The log for for the above commands shows as error and for the life of us we cant work out why? We run bash in strict mode, but we've altered the set statement too, but no avail.

The above throws;

...

error 01-Nov-2019 10:56:07 + export
build 01-Nov-2019 10:56:07 declare -x IMAGE_ID="xxxxxxxxxxxxxx/something/someimage:sometag"
error 01-Nov-2019 10:56:07 + echo 0
build 01-Nov-2019 10:56:07 declare -x JAVA_HOME="/usr/lib/jvm/java-8-oracle"
error 01-Nov-2019 10:56:07 + which bash
build 01-Nov-2019 10:56:07 0
build 
01-Nov-2019 10:56:07 /bin/bash
build 01-Nov-2019 10:56:07 0

...

Any ideas why it's a status of error, even through exit codes are of value 0 and the export command and which bash command return valid values?

 

1 answer

I'm having the same issue... i have some echo lines, most are black but when stopping a docker container, that line appear in red color and Bamboo thinks it's error but it's not

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events