Commit d26edd8d authored by Winnie Hellmann's avatar Winnie Hellmann Committed by Marin Jankovski

Add Git LFS

parent 2999f222
......@@ -64,10 +64,12 @@ ruby-2.6-golang-1.13-git-2.24 test: *test_custom
# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml
ruby-2.6.3-golang-1.12-git-2.22-chrome-73.0-node-12.x-yarn-1.16-postgresql-9.6-graphicsmagick-1.3.33 test: *test_custom
ruby-2.6.3-golang-1.12-git-2.22-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33 test: *test_custom
ruby-2.6.3-golang-1.12-git-2.22-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33 test: *test_custom
ruby-2.6.3-golang-1.12-git-2.22-chrome-73.0-node-12.x-yarn-1.16-postgresql-11-graphicsmagick-1.3.33 test: *test_custom
# gitlab:assets:compile step
ruby-2.6.3-git-2.22-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-19.03.1 test: *test_custom
ruby-2.6.3-git-2.22-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-19.03.1 test: *test_custom
# Used by www-gitlab-com's rspec job: https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/.gitlab-ci.yml
ruby-2.6.3-git-2.22-chrome-74.0-node-12.x-yarn-1.16-docker-19.03.1 test: *test_custom
......@@ -120,12 +122,14 @@ ruby-2.6-golang-1.13-git-2.24: *build_and_deploy_custom
ruby-2.6.3-golang-1.12-git-2.22-chrome-73.0-node-12.x-yarn-1.16-postgresql-9.6-graphicsmagick-1.3.33: *build_and_deploy_custom
ruby-2.6.3-golang-1.12-git-2.22-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33: *build_and_deploy_custom
ruby-2.6.3-golang-1.12-git-2.22-chrome-73.0-node-12.x-yarn-1.16-postgresql-11-graphicsmagick-1.3.33: *build_and_deploy_custom
ruby-2.6.3-golang-1.12-git-2.22-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-11-graphicsmagick-1.3.33: *build_and_deploy_custom
ruby-2.6.3-golang-1.12-git-2.24-chrome-73.0-node-12.x-yarn-1.16-postgresql-9.6-graphicsmagick-1.3.33: *build_and_deploy_custom
ruby-2.6.3-golang-1.12-git-2.24-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33: *build_and_deploy_custom
ruby-2.6.3-golang-1.12-git-2.24-chrome-73.0-node-12.x-yarn-1.16-postgresql-11-graphicsmagick-1.3.33: *build_and_deploy_custom
# gitlab:assets:compile step
ruby-2.6.3-git-2.22-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-19.03.1: *build_and_deploy_custom
ruby-2.6.3-git-2.22-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-19.03.1: *build_and_deploy_custom
# Used by www-gitlab-com's rspec job: https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/.gitlab-ci.yml
ruby-2.6.3-git-2.22-chrome-74.0-node-12.x-yarn-1.16-docker-19.03.1: *build_and_deploy_custom
......
......@@ -36,6 +36,13 @@ ARG INSTALL_GOLANG_VERSION
ARG GOLANG_DOWNLOAD_SHA256
RUN if [ -n "$INSTALL_GOLANG_VERSION" ] ; then /scripts/install-golang "${INSTALL_GOLANG_VERSION}" "${GOLANG_DOWNLOAD_SHA256}" && go version; fi
# Git LFS (https://git-lfs.github.com/)
ARG LFS_VERSION
ARG LFS_DOWNLOAD_URL=https://github.com/git-lfs/git-lfs/releases/download/v${LFS_VERSION}/git-lfs-linux-amd64-v${LFS_VERSION}.tar.gz
ARG LFS_DOWNLOAD_SHA256
RUN if [ -n "$LFS_VERSION" ]; then /scripts/install-lfs && git lfs --version; fi
# Postgres
ARG POSTGRES_VERSION
RUN if [ -n "$POSTGRES_VERSION" ] ; then /scripts/install-postgresql $POSTGRES_VERSION; fi
......
......@@ -85,6 +85,20 @@ function print_git_args() {
printf -- "--build-arg GIT_DOWNLOAD_SHA256=%s " "$GIT_DOWNLOAD_SHA256"
}
# see https://github.com/git-lfs/git-lfs/releases
function print_lfs_args() {
case "$1" in
2.9)
LFS_VERSION=2.9.1
LFS_DOWNLOAD_SHA256=2a8e60cf51ec45aa0f4332aa0521d60ec75c76e485d13ebaeea915b9d70ea466
;;
*) echo "Unknown Git LFS version $1"; exit 1;
esac
printf -- "--build-arg LFS_VERSION=%s " "$LFS_VERSION"
printf -- "--build-arg LFS_DOWNLOAD_SHA256=%s " "$LFS_DOWNLOAD_SHA256"
}
function print_node_args() {
case "$1" in
8.x) NODE_INSTALL_VERSION=8.16.0 ;;
......@@ -165,6 +179,7 @@ function parse_arguments() {
chrome) print_chrome_args $version ;;
docker) print_docker_args $version ;;
git) print_git_args $version ;;
lfs) print_lfs_args $version ;;
node) print_node_args $version ;;
yarn) print_yarn_args $version ;;
postgresql) print_postgres_args $version ;;
......
#!/bin/bash
set -xeuo pipefail
IFS=$'\n\t'
mkdir build \
&& curl -fsSL "$LFS_DOWNLOAD_URL" -o git-lfs.tar.gz \
&& echo "$LFS_DOWNLOAD_SHA256 git-lfs.tar.gz" | sha256sum -c - \
&& tar -C build -xzf git-lfs.tar.gz \
&& cd build \
&& cp git-lfs /usr/local/bin/ \
&& cd .. \
&& rm -rf build \
&& rm git-lfs.tar.gz
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment