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,299,251
Community Members
 
Community Events
165
Community Groups

repository with git lfs, and pipeline attempting to push a tag

We have a bitbucket repository with a custom pipeline to tag the repo with the current version. I have had to add steps to install git-lfs. Why is git-lfs not already installed in the pipeline image (python 3.6.9) and is there a better way to perform this installation?

 

custom: # Pipelines that can only be triggered manually 
deployment-to-prod:
- step:
name: Tag git
script:
- curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
-
apt-get -y install git-lfs zip
- package_version=$(cat VERSION)
- git_tag="v$package_version"echo "Git tag=$git_tag"
- git tag --force --annotate --message "$git_tag from ${BITBUCKET_BUILD_NUMBER}" $git_tag
- git push --tags --force

 

1 answer

0 votes

Hi Jason,

Bitbucket Pipelines supports any public and private Docker images hosted on Docker Hub, AWS, GCP, Azure, and self-hosted registries accessible on the internet. Atlassian has built a Docker image that can be used for Pipelines builds if it suits your needs (https://hub.docker.com/r/atlassian/default-image/), however, we don't own every Docker image hosted in each of the above registries, like e.g. the python one. The owner of each Docker image decides what tools/applications are pre-installed in that image.

Checking the documentation on the Git LFS repo, the instructions for installing Git LFS in Debian and Ubuntu seem to be the ones you are using in your yml file as well:

One thing you can do is look if there is a publicly available Docker image that has all the tools you need pre-installed. If you cannot find one, you can also create your own custom Docker image that has all the tools you need for your build (including Git LFS) and use that instead. If you'd be interested in that, you can check the links we have in our documentation:

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Thank you. I have copied the script into my repository to avoid foreign script execution attacks.

I will consider building a docker image. The trade offs between downloading a custom docker image vs download and installing a smaller set of code are worth exploring.

You are welcome, Jason. Please feel free to reach out if you ever need anything else!

Kind regards,
Theodora

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,239 views 2 9
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