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.
Editted question
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.