I'm new to pipelines. I have an application which I am trying to write a pipeline for which has client files in another repository. I already have a step working which can download and install dependencies, which takes some time so I want to cache the built client files after npm install.
It seems to be pulling from cache just fine, but it still runs the step which causes an error because the files already exist. How do I skip this step if it's already been cached?
Here is my pipeline only with the step I'm caching:
name: client setup
- cd ../
- git clone firstname.lastname@example.org:myorg/client-repo.git
- cd client-repo
- git checkout staging
- npm install
The client setup step works the first time I try it, but the clone fails the second time because the client repo folder already exists. How do I make it skip this entire step if it's been pulled from cache?
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