mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Add image with golang for use with gitlab-ce builds with gitaly
This commit is contained in:
parent
1cb3b6104c
commit
616e7d961b
8 changed files with 43 additions and 17 deletions
14
scripts/install-git
Executable file
14
scripts/install-git
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
mkdir build \
|
||||
&& curl -fsSL "$GIT_DOWNLOAD_URL" -o git.tar.gz \
|
||||
&& echo "$GIT_DOWNLOAD_SHA256 git.tar.gz" | sha256sum -c - \
|
||||
&& tar -C build -xzf git.tar.gz \
|
||||
&& cd build/git-$GIT_VERSION \
|
||||
&& chmod +x configure \
|
||||
&& ./configure \
|
||||
&& make all \
|
||||
&& make install PREFIX=/usr/local \
|
||||
&& cd ../.. \
|
||||
&& rm -rf build \
|
||||
&& rm git.tar.gz
|
||||
|
|
@ -1,14 +1,10 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
mkdir build \
|
||||
&& curl -fsSL "$GIT_DOWNLOAD_URL" -o git.tar.gz \
|
||||
&& echo "$GIT_DOWNLOAD_SHA256 git.tar.gz" | sha256sum -c - \
|
||||
&& tar -C build -xzf git.tar.gz \
|
||||
&& cd build/git-$GIT_VERSION \
|
||||
&& chmod +x configure \
|
||||
&& ./configure \
|
||||
&& make all \
|
||||
&& make install PREFIX=/usr/local \
|
||||
&& cd ../.. \
|
||||
&& rm -rf build \
|
||||
&& rm git.tar.gz
|
||||
GOLANG_VERSION=${1:-1.8}
|
||||
GOLANG_DOWNLOAD_URL="https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz"
|
||||
GOLANG_DOWNLOAD_SHA256=${2:-53ab94104ee3923e228a2cb2116e5e462ad3ebaeea06ff04463479d7f12d27ca}
|
||||
|
||||
curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
|
||||
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
|
||||
&& tar -C /usr/local -xzf golang.tar.gz \
|
||||
&& rm golang.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue