mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Merge branch 'support-golang-1-21' into 'master'
Use Go to 1.21.6 and 1.20.13 to build See merge request https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/765 Merged-by: Balasankar 'Balu' C <balasankar@gitlab.com> Approved-by: Balasankar 'Balu' C <balasankar@gitlab.com> Co-authored-by: Robert Marshall <rmarshall@gitlab.com>
This commit is contained in:
commit
c47af821ee
6 changed files with 22 additions and 40 deletions
|
|
@ -9,7 +9,7 @@
|
|||
POSTGRESQL: '11'
|
||||
RUBY: '3.0.patched'
|
||||
GIT: '2.33'
|
||||
GOLANG: '1.18'
|
||||
GOLANG: '1.21'
|
||||
KUBECTL: '1.23'
|
||||
HELM: '3.9'
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ gitaly:
|
|||
parallel:
|
||||
matrix:
|
||||
- OS: ['debian:bullseye', 'debian:bookworm']
|
||||
GOLANG: ['1.19', '1.20', '1.21']
|
||||
GOLANG: ['1.20', '1.21']
|
||||
RUST: ['1.73']
|
||||
GIT: ['2.36']
|
||||
- OS: ['ubi:8.6']
|
||||
GOLANG: ['1.19', '1.20', '1.21']
|
||||
GOLANG: ['1.20', '1.21']
|
||||
RUST: ['1.73']
|
||||
GIT: ['2.36']
|
||||
|
|
|
|||
|
|
@ -99,11 +99,11 @@ gitlab-workhorse:
|
|||
matrix:
|
||||
- OS: ['debian:bullseye', 'debian:bookworm']
|
||||
RUBY: ['3.0', '3.1', '3.2']
|
||||
GOLANG: ['1.19', '1.20', '1.21']
|
||||
GOLANG: ['1.20', '1.21']
|
||||
RUST: ['1.73']
|
||||
GIT: ['2.36']
|
||||
- OS: ['ubi:8.6']
|
||||
RUBY: ['3.0', '3.1', '3.2']
|
||||
GOLANG: ['1.19', '1.20', '1.21']
|
||||
GOLANG: ['1.20', '1.21']
|
||||
RUST: ['1.73']
|
||||
GIT: ['2.36']
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ gitlab-kas:
|
|||
extends:
|
||||
- .kas
|
||||
variables:
|
||||
GOLANG: '1.19'
|
||||
GOLANG: '1.21'
|
||||
RUST: '1.73'
|
||||
LFS: '2.9'
|
||||
CHROME: '119'
|
||||
|
|
|
|||
|
|
@ -22,28 +22,20 @@ function build_ubi() {
|
|||
tar -C /tmp/golang -xzf golang.tar.gz
|
||||
|
||||
# For UBI, we will be installing golang-fips
|
||||
# Use a different build process when golang version is less-than-equal to 1.18
|
||||
if [[ $(echo -e "1.18\n${GO_MAJOR_VERSION}" | sort -V | tail -1) == '1.18' ]]; then
|
||||
git clone https://github.com/golang-fips/go.git --branch "go${GO_MAJOR_VERSION}-openssl-fips" --single-branch --depth 1 /usr/local/go
|
||||
GO_BRANCH="go${GO_MAJOR_VERSION}-fips-release"
|
||||
|
||||
cd /usr/local/go/src
|
||||
PATH=$PATH:/tmp/golang/go/bin CGO_ENABLED=1 ./make.bash
|
||||
else
|
||||
GO_BRANCH="go${GO_MAJOR_VERSION}-fips-release"
|
||||
git clone https://github.com/golang-fips/go.git --branch "${GO_BRANCH}" --single-branch --depth 1 /tmp/golang-fips
|
||||
cd /tmp/golang-fips
|
||||
|
||||
git clone https://github.com/golang-fips/go.git --branch "${GO_BRANCH}" --single-branch --depth 1 /tmp/golang-fips
|
||||
cd /tmp/golang-fips
|
||||
# The initialize script ends with a commit, so we need to set the user info. And needs to be global due to submodules in use.
|
||||
git config --global user.email "builder@example.com"
|
||||
git config --global user.name "Builder"
|
||||
|
||||
# The initialize script ends with a commit, so we need to set the user info. And needs to be global due to submodules in use.
|
||||
git config --global user.email "builder@example.com"
|
||||
git config --global user.name "Builder"
|
||||
PATH=$PATH:/tmp/golang/go/bin ./scripts/full-initialize-repo.sh
|
||||
|
||||
PATH=$PATH:/tmp/golang/go/bin ./scripts/full-initialize-repo.sh
|
||||
|
||||
cd /tmp/golang-fips/go/src
|
||||
PATH=$PATH:/tmp/golang/go/bin GOROOT_FINAL=/usr/local/go CGO_ENABLED=1 ./make.bash
|
||||
mv /tmp/golang-fips/go /usr/local/go
|
||||
fi
|
||||
cd /tmp/golang-fips/go/src
|
||||
PATH=$PATH:/tmp/golang/go/bin GOROOT_FINAL=/usr/local/go CGO_ENABLED=1 ./make.bash
|
||||
mv /tmp/golang-fips/go /usr/local/go
|
||||
|
||||
rm -rf /usr/local/go/pkg/*/cmd /usr/local/go/pkg/bootstrap \
|
||||
/usr/local/go/pkg/obj /usr/local/go/pkg/tool/*/api \
|
||||
|
|
|
|||
|
|
@ -39,25 +39,15 @@ function print_golang_args() {
|
|||
declare -A GOLANG_DOWNLOAD_SHA256
|
||||
|
||||
case "$1" in
|
||||
1.18)
|
||||
INSTALL_GOLANG_VERSION=1.18.10
|
||||
GOLANG_DOWNLOAD_SHA256[amd64]="5e05400e4c79ef5394424c0eff5b9141cb782da25f64f79d54c98af0a37f8d49"
|
||||
GOLANG_DOWNLOAD_SHA256[arm64]="160497c583d4c7cbc1661230e68b758d01f741cf4bece67e48edc4fdd40ed92d"
|
||||
;;
|
||||
1.19)
|
||||
INSTALL_GOLANG_VERSION=1.19.13
|
||||
GOLANG_DOWNLOAD_SHA256[amd64]="4643d4c29c55f53fa0349367d7f1bb5ca554ea6ef528c146825b0f8464e2e668"
|
||||
GOLANG_DOWNLOAD_SHA256[arm64]="1142ada7bba786d299812b23edd446761a54efbbcde346c2f0bc69ca6a007b58"
|
||||
;;
|
||||
1.20)
|
||||
INSTALL_GOLANG_VERSION=1.20.12
|
||||
GOLANG_DOWNLOAD_SHA256[amd64]="9c5d48c54dd8b0a3b2ef91b0f92a1190aa01f11d26e98033efa64c46a30bba7b"
|
||||
GOLANG_DOWNLOAD_SHA256[arm64]="8afe8e3fb6972eaa2179ef0a71678c67f26509fab4f0f67c4b00f4cdfa92dc87"
|
||||
INSTALL_GOLANG_VERSION=1.20.13 # Update scripts/install-golang for FIPS if this version is bumped
|
||||
GOLANG_DOWNLOAD_SHA256[amd64]="9a9d3dcae2b6a638b1f2e9bd4db08ffb39c10e55d9696914002742d90f0047b5"
|
||||
GOLANG_DOWNLOAD_SHA256[arm64]="a2d811cef3c4fc77c01195622e637af0c2cf8b3814a95a0920cf2f83b6061d38"
|
||||
;;
|
||||
1.21)
|
||||
INSTALL_GOLANG_VERSION=1.21.5
|
||||
GOLANG_DOWNLOAD_SHA256[amd64]="e2bc0b3e4b64111ec117295c088bde5f00eeed1567999ff77bc859d7df70078e"
|
||||
GOLANG_DOWNLOAD_SHA256[arm64]="841cced7ecda9b2014f139f5bab5ae31785f35399f236b8b3e75dff2a2978d96"
|
||||
INSTALL_GOLANG_VERSION=1.21.6
|
||||
GOLANG_DOWNLOAD_SHA256[amd64]="3f934f40ac360b9c01f616a9aa1796d227d8b0328bf64cb045c7b8c4ee9caea4"
|
||||
GOLANG_DOWNLOAD_SHA256[arm64]="e2e8aa88e1b5170a0d495d7d9c766af2b2b6c6925a8f8956d834ad6b4cacbd9a"
|
||||
;;
|
||||
*) fail "Unknown golang version $1" ;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue