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: 

Creating a tag during build does not trigger the tag pipeline

Meher Gara
Contributor
August 10, 2021

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 16, 2021

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,
Theodora

Meher Gara
Contributor
August 16, 2021

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

Thanks for the support ! 

Like # people like this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 17, 2021

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

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

Kind regards,
Theodora

Like Vyacheslav Zgordan likes this
TAGS
AUG Leaders

Atlassian Community Events