Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Pipeline branches Edited

I'm just getting started with Pipelines, and am trying to set one up that runs when commits are merged into our develop branch (the step/script stuff is already working when it's part of the default block; I just want to target specifically develop.)

I'm editing my bitbucket-pipelines.yml file in the online editor, and am getting a warning dot with error message when I use this config:


# This is a sample build configuration for PHP.
# Check our guides at for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.1.1

- step:
name: Transition Jira ticket to done
- pipe: atlassian/jira-transition:0.1.4

The error is occurring on the "branches" and "develop" lines; the branches error says "branches requires pattern to target specific branches", and the develop error says "Unexpected property develop".

Where am I going wrong here?


UPDATE: I did get the branch pipeline to save, using this code:

echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'."
pipe: atlassian/jira-transition:0.1.4

But now when I merge a commit to develop, the pipeline fails with this error:

String "develop" does not contain issueKeys

Cannot find issue key

1 answer

0 votes

Hi @Esther Strom

I'm glad that you could already fix the first part of the issue =]

Now the problem is on understanding how the PIPE jira-transitions works. According to what is described in the link before, the ISSUE attribute should receive a Jira issue key but it is receiving the name of the branch which will be always develop.

I guess the example you see for jira-transitions (where you use the variable $BITBUCKET_BRANCH) was designed to be used in the default section to capture branches created with a Jira key name.

If, for example, you are trying to transition an issue based on issue keys present in your commit messages, you will need to parse this data using a different command and create a new variable where the affected Jira issue is present. If this is your case, you would need something like:

JIRA_ISSUE=$(git log --pretty=format:%s -1 $BITBUCKET_COMMIT | grep -E -o '\<[A-Z][A-Z0-9]+\-[0-9]+\>' | head -1)

⚠️ Please keep in mind that this is just an example. You will need to adjust it to match your needs.

I hope that helps.

Thanks, @Daniel Santos

Just to make sure I understand, I can keep the develop branch and the predefined pipe; I just need to find another way to populate the ISSUE variable that's currently using $BITBUCKET_BRANCH?

Like Daniel Santos likes this

Yes, that is right! =]

OK. Again, keeping in mind this is my first-ever pipeline, I commented out the pipe and just tried to echo out the value of what the regex should return, but it's giving me a command not found error on "git". Do I need to somehow make sure that git is installed on the docker image?


(The regex does match what I'm looking for when I test it here against some of our ticket number formats (any number of letters, a dash, any number of numbers).

Hi @Esther Strom

Yes, you need to make sure git is installed so the command can succeed. You will need it to get the commit message.

I tested this command using the default docker machine atlassian provides when you don't specify a specific image.

Suggest an answer

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

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

758 views 15 10
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