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
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are welcome, Jason. Please feel free to reach out if you ever need anything else!
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.