Support Configurable/Non-Shallow Git Clone Depth

Issue #13260 resolved
Former user created an issue

Right now Pipelines clones a git repository to a depth of 50.

This cause an issue for us trying to push to another repo as part of our pipeline if our source and destination are too far out of sync which can happen for destinations that are not frequently updated.

Given the above it would be nice to be able to clone a repository with having a depth specified.

Comments (8)

  1. Sean Farley
    • changed status to open

    I don't know if I'd add another option but instead would suggest the Pipelines team implement a full clone + caching. Specifying a clone depth circumvents our aggressive pack file caching (e.g. see Github's similar problem with CocoaPods), so a full clone will probably be faster and cheaper for us.

    I'll forward this to the Pipelines team.

  2. Jonathan Dumaine

    I was also confused about what to put for a full clone until coming across this. Docs are lacking here.

  3. ZenobiusJ

    There really needs to be a way to control where the clone happens.

    What I really want is something like

    pipelines:
      default:
        - step:
            image: our-image-based-on-node:8-alpine
            name: setup
            script:
              - |
                 bitbucket_clone full
                 npm run prod
                 bitbucket_artifact_save ./client/build/**/* ./cilent/build/docs/**/*
    
        - step:
            image: atlassians-awscli-image
            name: publish
            script:
              - |
                 ls -al ./
                 bitbucket_artifact_restore setup
                 aws s3 sync --delete ./client/build/ s3://our-bucket/releases/$BITBUCKET_BUILD_NO/
    
        - step:
            image: cloudfoundries-concourse-ci-slack-resource-image
            name: notify
            script:
              - |
                 echo "complex json object"  | envsubst | /opt/resource/out 
    

    Notice I only invoked the clone once and restored the artifacts after another operation.

    Being able to control where these operations run would be great.

  4. Log in to comment