The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Previously working pipeline bash now fails

Kareem Straker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 14, 2020

I'm having a strange issue with Bitbucket Pipelines, where a previously working pipeline now fails without warning.

In this particular case I am, using bash, incrementing a variable of `0`.

(( VERSION_NUMBER_LIST[1]++ )); echo "${VERSION_NUMBER_LIST[0]}.${VERSION_NUMBER_LIST[1]} list version incremented";

 

What is especially confusing is that this worked fine before, and works in my local testing:

VERSION_NUMBER_OLD=0.0

IFS='.' read -ra VERSION_NUMBER_LIST <<< "$VERSION_NUMBER_OLD"; echo "${VERSION_NUMBER_LIST[0]}.${VERSION_NUMBER_LIST[1]} list version";
0.0 list version

(( VERSION_NUMBER_LIST[1]++ )); echo "${VERSION_NUMBER_LIST[0]}.${VERSION_NUMBER_LIST[1]} list version incremented";
0.1 list version incremented

 

Has anyone else encountered this strange error, or have any idea how to resolve.

My pipeline repeatedly fails due to this.

Bitbucket_Pipelines_Failure.PNG

I'm using an Alpine 3.11 as my Docker image.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
Kareem Straker
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 14, 2020

Fixed it with:

VERSION_NUMBER_LIST[1]=$((VERSION_NUMBER_LIST[1]+1)); echo "${VERSION_NUMBER_LIST[0]}.${VERSION_NUMBER_LIST[1]} list version incremented";
0.1 list version incremented

 ¯\_(ツ)_/¯ 

TAGS
AUG Leaders

Atlassian Community Events