I am using NX in my angular projected, and I would like to deploy/test only affected items during my PRs.
I created the following pipeline :
# This is an example Starter pipeline configuration
# Use a skeleton to build, test and deploy using manual and parallel steps
# You can specify a custom docker image from Docker Hub as your build environment.
- npm install
- npm run affected:test -- --base=origin/develop
- npm run affected:lint -- --base=origin/develop
- npm run affected:stylelint -- --base=origin/develop
name: 'Deploy Staging'
- npm run affected:build -- --base=origin/develop
Now, the last line don't work because, when the pipeline execute, the branch is already merged in develop so
npm run affected:build -- --base=origin/develop
Will do nothing as it is comparing to itself.
I would like to replace the --base=origin/develop with --base=$previousBuildSHA. But I am quite confused on how to retrieve it.
Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events