Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Pipeline depth specification in YAML file seems to be ignored

Hi,

I am trying to get the BitBucket pipeline to shallow clone my repository. My file looks like this:

 

image:
<snip>

clone:
depth: 1

pipelines:
<snip>

 When I look at the pipeline build log, the git clone command does not include "--depth 1". Have I got the YAML layout above wrong?

1 answer

0 votes

Hi @James Hume,

I believe you are facing some edge case or bug.
I was not able to reproduce this scenario.

When I browse the pipelines logs I see this in the first part of it:

Build setup (section)

+ umask 000
+ GIT_LFS_SKIP_SMUDGE=1 git clone --branch="master" --depth 1 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...

As you can see the "--depth 1" is there.

We'll probably need to create a ticket for you to allow us to investigate this case deeper and understand what is happening there.

Some questions to narrow down this one:

  • Are you manually running the git commands from a script task or are you talking about the automatic checkout that happens in the build setup section?
  • Is this feature working as expected for other repositories with different bitbucket-pipelines.yml (in case you have them)?

Hi @Daniel Santos , thanks for your reply.

To answer your questions:

* The git clone is being run automatically by the build setup section.

* We haven't used this feature before, so couldn't say.

 

Any ideas would be much appreciated, thanks.

Hey @James Hume

I've opened a ticket in the Bitbucket Cloud support to allow us investigating this one deeply. We will need to check your repository to understand what is causing this issue. You should receive an email with the support ticket soon.

Once the issue is resolved, please share your findings here. This will allow other users to learn from your experience. 

Thank you!

Sabith KS I'm New Here Apr 16, 2021

Not sure if this helps:

 

It seems that the `depth` flag is also not honoured in pull-requests pipelines.

Suggest an answer

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

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

762 views 15 10
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