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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Error parsing column (":") in script row Edited

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,215 views 0 3
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