You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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:
There is an error in your bitbucket-pipelines.yml at [pipelines > branches > {develop,staging} > 0 > stage > steps > 0]. The step section is empty or null.
Pipeline code for reference:
# Default base image : pipeline wideimage: node:15.1.0-alpine
# pipeline wide definationsdefinitions:# stage - to group different steps of processstage: &install-test-build-deployname: install-test-build-deployruns-on:- self.hosted- linux.shellcaches:- nodeartifacts:- build/**steps:- parallel:steps:- step: &lintname: Lintscript:# Run your linter of choice here- npm install eslint- step: &installname: installscript:- npm install
- step: &buildname: buildscript:- npm run build
- step: &testname: testscript:- npm run test
- step: &deployname: deployscript:# 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 Configurationpipelines:default:- step:<<: *lintbranches:'{staging}':- step:<<: *install-test-build-deploydeployment: staging'{qa}':- stage:<<: *install-test-build-deploydeployment: qa'{production}':- stage:<<: *install-test-build-deploydeployment: production# trigger: manual
Please guide...
stages:
# stage - to group different steps of process
- stage: &install-test-build-deploy
definitions:
stages:
# stage - to group different steps of process
- stage: &install-test-build-deploy
name: install-test-build-deploy
steps:
- step: &lint
name: Lint
runs-on:
- self.hosted
- linux.shell
script:
# Run your linter of choice here
- npm install eslint
caches:
- node
artifacts:
- build/**
- step: &install
name: install
runs-on:
- self.hosted
- linux.shell
script:
- npm install
- step: &build
name: build
runs-on:
- self.hosted
- linux.shell
script:
- npm run build
- step: &test
name: test
runs-on:
- self.hosted
- linux.shell
script:
- npm run test
- step: &deploy
name: deploy
runs-on:
- self.hosted
- linux.shell
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 "/*"
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.