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

bash: jq:command not found

I am working on bitbucket pipelines using javascript/nodejs as the language.

I need 'jq' command in my script but it throws error of jq: command not found

Below is my bitbucket pipelines.yml file

 

jq.JPG

2 answers

0 votes

 

image: node:10.15.3
pipelines:
default:
- step:
name: "prova default"
script:
- echo "Deploying version is $VERSIONRELEASE"
- ls
- mkdir build
- touch build/test.json
- ls build
- apt-get install -y jq
- declare -x VERSION=$(jq -r '.version' package.json)
- echo "package.json version is $VERSION"



+ apt-get install -y jq
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package jq

 

sorry, but does not work

Hi Luca,

I had the same issue.

Before you can install jq, you have to make an "apt-get update"

Example:

- apt-get update 
- apt-get -y install jq
0 votes

Hi @nazia_akhtar ,

Thank you for your question!

You can add it with the next command before using jq:

apt-get install -y jq

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,710 views 10 16
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