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: 

Error parsing column (":") in script row

DragosC
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 25, 2020

I have a pipeline for a nodejs and I need to pick up the version and add it as a tag to my newly built docker. To do this, I have a script something like this:

 

- step: &build-docker-and-push
name: Build docker image and repo upload
services:
- docker
caches:
- node
- docker
script:
- IMAGE="333333333333.dkr.ecr.af-xxxxxxx-1.amazonaws.com/node-js-repo"
- VERSION="$( cat package.json | grep version | head -1 | aws -F: '{ print $2 }' | sed 's/[",]//g' | tr -d '[[:space:]]' )"
- TAG="${VERSION}-${BITBUCKET_COMMIT}"

 

The error I receive when I want to start the pipeline is something like this:

There is a YAML syntax error in your bitbucket-pipelines.yml at [line 44, column 94]. To be precise: expected a comment or a line break, but found s(115)

and the line 45 is the `VERSION=...` - column may differ as this is a cleanned line. However, no matter how I format it, how I am trying to build the line, it always complains at my column (`-F:` sequence). I tried to build the line with `` and is the same.

If I randomly put a ":" sign in - let's say - next line, or whatever other similar line, is fine. 

Not sure what I am doing wrong here. I tried to escape it, the ":" is inside the quota so it should not be considered as part of key ... 

Can someone please point me where I should look at?

Thanks. 

 

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events