Our query is regrading Bitbucket pipeline.
We have defined steps(install,build,test and deply) in a stage under definition. Now under pipelines -> branches we want it to be called/re-use. But seems branches requires steps only because we are getting following error while triggering the pipeline:
# Default base image : pipeline wide
image: node:15.1.0-alpine
# pipeline wide definations
definitions:
# stage - to group different steps of process
stage: &install-test-build-deploy
name: install-test-build-deploy
runs-on:
- self.hosted
- linux.shell
caches:
- node
artifacts:
- build/**
steps:
- parallel:
steps:
- step: &lint
name: Lint
script:
# Run your linter of choice here
- npm install eslint
- step: &install
name: install
script:
- npm install
- step: &build
name: build
script:
- npm run build
- step: &test
name: test
script:
- npm run test
- step: &deploy
name: deploy
script:
# update s3 bucket with latest changes via sync command
- aws s3 sync --delete build s3://${BUCKET}
# update cdn content by creating invalidation
- aws cloudfront create-invalidation --distribution-id ${DIST} --paths "/*"
# Pipeline workflow Configuration
pipelines:
default:
- step:
<<: *lint
branches:
'{staging}':
- step:
<<: *install-test-build-deploy
deployment: staging
'{qa}':
- stage:
<<: *install-test-build-deploy
deployment: qa
'{production}':
- stage:
<<: *install-test-build-deploy
deployment: production
# trigger: manual
Please guide...