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

Creating a tag during build does not trigger the tag pipeline

Creating a tag during build does not trigger the tag pipeline

I do use semantic-release in on my master

as per my bitbucket-pipelines.yml I added a tags section for build (which can be triggered when the tag is created manually)

I would like that my semantic-release trigger the second pipeline.

Any ideas ? 

1 answer

0 votes

Hi @Meher Gara,

I assume that you don't have a command to create a tag in the bitbucket-pipelines.yml file, but the tag is created by semantic-release?

I suggest checking two things first:

1) After the tag gets created, does the Pipelines build push back to the Bitbucket repo?

When a Pipelines build runs on a certain branch, then a Docker container starts, this specific branch of the Bitbucket repo gets cloned inside the Docker container and then the script of the yaml file runs.

If a tag gets created during the build, it will get created in the clone of the repo inside the Docker container, and not in the Bitbucket repo.

I am not familiar with semantic-release and I'm not sure if it can be configured to push tags to the Bitbucket repo.

However, you can add the following command in your bitbucket-pipelines.yml file, in the script of the step where the tag gets created (after the command that creates the tag), and the tag will get pushed to the Bitbucket repo:

git push origin --tags

2) Assuming that the tag gets created by semantic-release, do the tag names follow a certain pattern?

And does that pattern match the pattern you specified in the tags definition in the bitbucket-pipelines.yml file?

Kind regards,

Indeed the tag is created but it's not pushed.

Thanks for the support ! 

Like Theodora Boudale likes this

You are very welcome, I'm glad to have helped!

Please feel free to reach out if you ever need anything else.

Kind regards,

Suggest an answer

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

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

74 views 2 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