Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

When I push a commit with a tag, why does default step also run?

Grant Pierce
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 16, 2019

I have a bitbucket-pipelines.yml set up this way:

image: node:11-alpine
definitions:
steps:
- step: &build-and-test
name: Get dependencies and test
caches:
- node
script:
- yarn
- yarn test
steps:
- step: &bump-version
trigger: manual
name: Updating version
script:
- apk add git
- yarn bumpversion
pipelines:
tags:
'v*.*.*':
- step:
name: Deploy to Test
deployment: Test
script:
- SOME DEPLOYMENT STEPS

default:
-
step: *build-and-test
- step: *bump-version

The idea is that every commit runs *build-and-test. Then *bump-version is a manual step if we want to deploy it. Bump-version pushes a new version tag. and I would expect the v*.*.* pipeline to run off that new commit, which it does. But default pipeline also runs again. Is there a way to run the tag pipeline exclusively? 

FYI yarn bumpversion is a package.json scrpt that runs 

yarn version --patch && git push --follow-tags

After that push, both steps are triggered, even with the same commit hash.

Screen Shot 2019-07-16 at 11.22.35 AM.png

 

1 answer

0 votes
Grant Pierce
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 16, 2019

Editted question

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events