Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,620
Community Members
 
Community Events
176
Community Groups

Clear Caches Pipe does not work

We are using Clear Caches Pipe to clear the "node" cache and the "cypress" custom cache so every run we do the step with Bitbucket's Clear Caches Pipe script ends with a 404 error with the following message:

 

✖ Failed to retrieve caches: 404 {"type": "error", "error": {"message": "Resource not found"}} https://api.bitbucket.org/2.0/repositories/thebellhop/ess-front/pipelines-config/caches/?page=1&pagelen=100
The step with the script is as follows:
    - step: &clear-cache
        name: delete cache if changes in the build dependencies
        script:
        - pipe: atlassian/bitbucket-clear-cache:3.1.1
          variables:
             BITBUCKET_USERNAME: $BITBUCKET_USERNAME
              BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
             CACHES: ["cypress", "node"]
        condition:
          changesets:
            includePaths:
             - package.json
Can anyone help us?

1 answer

1 accepted

0 votes
Answer accepted
Patrik S Atlassian Team May 05, 2022

Hello @Antoni Florit ,

Thank you for reaching out to Atlassian Support.

The error you are receiving is from one of the API calls the pipe is doing behind the scenes, where it gets all the caches from the repository. A 404 response from that API either means that the repository does not exist (which is not the case here), or the credentials being used to authenticate does not have access to it.

So could you please confirm if the bitbucket username you set as the variable $BITBUCKET_USERNAME is correct, and if that user has access to the repository where the pipeline is running ? Also, make sure this is the bitbucket username of the account, not the e-mail address. You can check the username going to the account's personal settings https://bitbucket.org/account/settings/

Additionally, please make sure the App Password you are using has the required permissions. To narrow down if the issue if with the permissions of the app password you are currently using, you can try creating a new app password with full permissions checked and test if using it the pipe completes successfully.

Hope that helps! Let me know if you run into any issues.

Thank you @Antoni Florit ,

Kind regards,

Patrik S

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events