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?
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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.