• Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      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.

          Form Name

            [BCLOUD-13260] Support Configurable/Non-Shallow Git Clone Depth

            ZenobiusJ added a comment -

            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.

            ZenobiusJ added a comment - 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.

            I've updated this page to mention the full keyword:

            https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html

            (I changed the phrase 'any positive number greater than zero' too...)

            paulwatson (Inactive) added a comment - I've updated this page to mention the full keyword: https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html (I changed the phrase 'any positive number greater than zero' too...)

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

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

            Ok it's the string full. Is it possible to do a PR to the documentation?

            despairblue added a comment - Ok it's the string full . Is it possible to do a PR to the documentation?

            The documentation does not mention what to put there for a full clone? 0?

            despairblue added a comment - The documentation does not mention what to put there for a full clone? 0?

            Hi Walter,

            We have just added support for configurable git clone depth. All you need to do is add the clone section as specified in our What's new documentation.

            Hope this helps!

            Thanks, Davina

            davina (Inactive) added a comment - Hi Walter, We have just added support for configurable git clone depth. All you need to do is add the clone section as specified in our What's new documentation . Hope this helps! Thanks, Davina

            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.

            seanfarley added a comment - 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.

              Unassigned Unassigned
              Anonymous Anonymous
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: