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

How do you run pipeline against latest tag on schedule?

chris.quibell
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 13, 2023

We tend to have a tag created near the end of the day then at 2 in the morning, we want to run regression tests. Our issue is that where we want to run our regression tests may get updated and tweaked so we cannot rely on trigging a pipeline when tag is created because it may get blown away. So I was curious if there was any way to run a scheduled pipeline where the pipeline clones the repo and uses the latest tag available in the repo to do the builds and deployments to our regression site?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 14, 2023

Hi Chris,

Schedules can only be created for branches at the moment, I'm afraid that it is not possible to create a schedule for a tag.

It should be possible to add Git commands in the script of the bitbucket-pipelines.yml file that find the latest tag and then check out this tag. However, if the build is scheduled to run for a certain branch, then it will still be associated with the latest commit of this branch. So, it will run in the source code of the tag, as you want, but it will be associated with the latest commit of the branch in the schedule, which will be confusing.

What you could do instead is create locally a new branch out of the tag's commit, push it to the Bitbucket Cloud repo, and then create a schedule for this branch. In this case, you would need to remember to delete the branch and recreate it for the newer tag the next day, so that the next build runs for the tag you want.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events