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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

BITBUCKET_REPO_OWNER_UUID must be of type string

Hi all,

i'm testing the use of this

to clear caches but i'm getting the said error when the pipeline runs.

Documentation says nothing about this as being needed, maybe i'm using it in the wrong way?

I've put the suggested code inside a "branch" triggered step that takes care of deployment to kubernetes clusters:

- step:
image: google/cloud-sdk:latest
name: Deploy to development
deployment: develop
- pipe: atlassian/bitbucket-clear-cache:2.0.5
CACHES: ["docker"]

 NOTE: i'm a beginner :)

3 answers

@michele_zangari Welcome!

Maybe you're doing it wrong but sometimes there are just integration/configuration issues so one thing to do first is to look into this.

Before the `- pipe: ....`  line, add another `- echo ...` line:

- pipe: atlassian/bitbucket-clear-cache:2.0.5

Running the pipeline with these changes should at least reveal what the value of the variable is. It should be automatically set IIRC which I think is the reason why this is not specifically documented with the pipe.

To further debug, you can expand the pipe entry in the pipeline output and it should show all the environment variables passed to the pipe (by name) in the command line arguments of the underlying `docker run` command.

Hi @ktomk and thanks for your reply.

I've added the echo instruction as suggested, and it actually outputs a valid UUID4 string in this form (note: this not the "real" UUID) :


so is there any chance that the script might fail in recognizing this as a correct output?

Thanks for your help :)

Well, from the error message I would say so that there is such kind of what is going on but on the other hand this does not match well b/c of the error message itself:

BITBUCKET_REPO_OWNER_UUID must be of type string

As your output shows, that is a string, perfectly fine.

Which triggers the question in me: Where exactly is that error message come from? Where is it displayed? That might shed some light.

Hey @ktomk , here it is the full stack trace when running the pipeline:

+ docker container run \
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/bitbucket-clear-cache:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/bitbucket-clear-cache \
--workdir=$(pwd) \
--label=org.bitbucket.pipelines.system=true \
--env=CI="$CI" \
--env=DOCKER_HOST="tcp://host.docker.internal:2375" \
--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/atlassian/bitbucket-clear-cache" \
--env=CACHES_0="docker" \
--env=CACHES_COUNT="1" \
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
Unable to find image 'bitbucketpipelines/bitbucket-clear-cache:2.0.5' locally
2.0.5: Pulling from bitbucketpipelines/bitbucket-clear-cache
c499e6d256d6: Pulling fs layer
62b0f1bf7919: Pulling fs layer
30b7b8e6b50d: Pulling fs layer
f4947adccc3c: Pulling fs layer
219c07faa520: Pulling fs layer
20a186827ace: Pulling fs layer
8c9fd7ce3052: Pulling fs layer
1ad4a842aa57: Pulling fs layer
449b51ac1cb3: Pulling fs layer
f4947adccc3c: Waiting
219c07faa520: Waiting
20a186827ace: Waiting
8c9fd7ce3052: Waiting
1ad4a842aa57: Waiting
449b51ac1cb3: Waiting
62b0f1bf7919: Verifying Checksum
62b0f1bf7919: Download complete
f4947adccc3c: Verifying Checksum
f4947adccc3c: Download complete
219c07faa520: Verifying Checksum
219c07faa520: Download complete
30b7b8e6b50d: Verifying Checksum
30b7b8e6b50d: Download complete
20a186827ace: Verifying Checksum
20a186827ace: Download complete
c499e6d256d6: Verifying Checksum
c499e6d256d6: Download complete
1ad4a842aa57: Verifying Checksum
1ad4a842aa57: Download complete
8c9fd7ce3052: Verifying Checksum
8c9fd7ce3052: Download complete
449b51ac1cb3: Verifying Checksum
449b51ac1cb3: Download complete
c499e6d256d6: Pull complete
62b0f1bf7919: Pull complete
30b7b8e6b50d: Pull complete
f4947adccc3c: Pull complete
219c07faa520: Pull complete
20a186827ace: Pull complete
8c9fd7ce3052: Pull complete
1ad4a842aa57: Pull complete
449b51ac1cb3: Pull complete
Digest: sha256:8292a9277531772b4eab382a710881914e3d0fde9efd5ebf22a6174f46988fc5
Status: Downloaded newer image for bitbucketpipelines/bitbucket-clear-cache:2.0.5
[31m✖ Validation errors:
- must be of string type

@michele_zangari Thanks for positing more information, in my eyes this looks more like a problem in the pipe than with your pipelines. Probably with version 2.0.1 it works and if it still does not work try with 1.0.1.

If you find a version that works, please post the version number.

Thanks @ktomk for the help, i'll try to test this in the next few days and get back with the results of using a different version.

Hi @michele_zangari and @ktomk ,

I am facing the same issue. Tried with v2.0.1 but same error and for v1.0.1 it just fails at the start.

Any updates/fixes for successful build?

Summon @Galyna Zholtkevych : Can you take a look, the bitbucket-clear-cache pipe appears to cause some usability problems at least. The variable (?) in the error seems undocumented.

@Md_ Farhan Memon Please also try with 2.0.5 if not yet. Just for double-checking with the latest release.

Thanks @ktomk for the prompt response.

I started with v2.0.5 itself, it didn't work and landed on this question after some google search.

I tried other versions as you mentioned here but in vain.

Hi @Md_ Farhan Memon  and @ktomk 

unfortunately i wasn't able to succeed in using the clear cache pipe. Ended up discarding it for now since it is not vital to my needs. Hopefully this gets fixed though :) 

Thanks for help.

@ktomk @Md_ Farhan Memon  @michele_zangari !

We did not release this pipe yet.

But we do have plans to work on that in near future.

Regards, Galyna

I got it to work by removing the beginning and ending braces from the BITBUCKET_REPO_OWNER_UUID and manually adding that variable to the pipe.

This ultimately did not fix my problem as it's still installing a composer dependencies from cache.

@dlurth we are going to release fixed version next week. I will update you as soon as we release it.

Regards, Galyna

Besides that, I want to say that it was not maintainable before, because it was not released :

Regards, Galyna

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,323 views 0 3
Read article

Community Events

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

Events near you