Merge branch 'add-go-1_20-image' into 'master'

Add Go 1.20 support

See merge request https://gitlab.com/gitlab-org/gitlab-build-images/-/merge_requests/677

Merged-by: Stan Hu <stanhu@gmail.com>
Approved-by: Stan Hu <stanhu@gmail.com>
Co-authored-by: Oscar Tovar <otovar@gitlab.com>
This commit is contained in:
Stan Hu 2023-05-06 01:56:00 +00:00
commit 8a4d981230
4 changed files with 22 additions and 10 deletions

View file

@ -16,7 +16,7 @@ gitaly:
parallel: parallel:
matrix: matrix:
- OS: ['debian:bullseye'] - OS: ['debian:bullseye']
GOLANG: ['1.18', '1.19'] GOLANG: ['1.19', '1.20']
RUST: ['1.65'] RUST: ['1.65']
GIT: ['2.36'] GIT: ['2.36']
- OS: ['ubi:8.6'] - OS: ['ubi:8.6']

View file

@ -26,7 +26,7 @@ gitlab:
RUBY: ['2.7.patched', '3.0.patched', '3.1.patched', '3.2.patched'] RUBY: ['2.7.patched', '3.0.patched', '3.1.patched', '3.2.patched']
GIT: ['2.36'] GIT: ['2.36']
POSTGRESQL: ['12', '13', '14', '15'] POSTGRESQL: ['12', '13', '14', '15']
GOLANG: ['1.18', '1.19'] GOLANG: ['1.19', '1.20']
RUST: ['1.65'] RUST: ['1.65']
NODE: ['16.14', '18.12'] NODE: ['16.14', '18.12']
CHROME: ['109'] CHROME: ['109']
@ -73,11 +73,11 @@ gitlab-workhorse:
matrix: matrix:
- OS: ['debian:bullseye'] - OS: ['debian:bullseye']
RUBY: ['2.7', '3.0', '3.1', '3.2'] RUBY: ['2.7', '3.0', '3.1', '3.2']
GOLANG: ['1.18', '1.19'] GOLANG: ['1.19', '1.20']
RUST: ['1.65'] RUST: ['1.65']
GIT: ['2.36'] GIT: ['2.36']
- OS: ['ubi:8.6'] - OS: ['ubi:8.6']
RUBY: ['2.7', '3.0', '3.1', '3.2'] RUBY: ['2.7', '3.0', '3.1', '3.2']
GOLANG: ['1.18', '1.19'] GOLANG: ['1.19', '1.20']
RUST: ['1.65'] RUST: ['1.65']
GIT: ['2.36'] GIT: ['2.36']

View file

@ -29,7 +29,14 @@ function build_ubi() {
cd /usr/local/go/src cd /usr/local/go/src
PATH=$PATH:/tmp/golang/go/bin CGO_ENABLED=1 ./make.bash PATH=$PATH:/tmp/golang/go/bin CGO_ENABLED=1 ./make.bash
else else
git clone https://github.com/golang-fips/go.git --branch "go${GO_MAJOR_VERSION}-fips-release" --single-branch --depth 1 /tmp/golang-fips # This is a workaround until https://github.com/golang-fips/go/issues/82 is resolved.
if [[ $GO_MAJOR_VERSION == "1.20" ]]; then
GO_BRANCH="go1.20.3-openssl-fips"
else
GO_BRANCH="go${GO_MAJOR_VERSION}-fips-release"
fi
git clone https://github.com/golang-fips/go.git --branch "${GO_BRANCH}" --single-branch --depth 1 /tmp/golang-fips
cd /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. # 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.

View file

@ -41,13 +41,18 @@ function print_golang_args() {
case "$1" in case "$1" in
1.18) 1.18)
INSTALL_GOLANG_VERSION=1.18.10 INSTALL_GOLANG_VERSION=1.18.10
GOLANG_DOWNLOAD_SHA256[amd64]=5e05400e4c79ef5394424c0eff5b9141cb782da25f64f79d54c98af0a37f8d49 GOLANG_DOWNLOAD_SHA256[amd64]="5e05400e4c79ef5394424c0eff5b9141cb782da25f64f79d54c98af0a37f8d49"
GOLANG_DOWNLOAD_SHA256[arm64]=160497c583d4c7cbc1661230e68b758d01f741cf4bece67e48edc4fdd40ed92d GOLANG_DOWNLOAD_SHA256[arm64]="160497c583d4c7cbc1661230e68b758d01f741cf4bece67e48edc4fdd40ed92d"
;; ;;
1.19) 1.19)
INSTALL_GOLANG_VERSION=1.19.7 INSTALL_GOLANG_VERSION=1.19.8
GOLANG_DOWNLOAD_SHA256[amd64]=7a75720c9b066ae1750f6bcc7052aba70fa3813f4223199ee2a2315fd3eb533d GOLANG_DOWNLOAD_SHA256[amd64]="e1a0bf0ab18c8218805a1003fd702a41e2e807710b770e787e5979d1cf947aba"
GOLANG_DOWNLOAD_SHA256[arm64]=071ea7bf386fdd08df524859b878d99fc359e491e7ad65c1c1cc55b67972c882 GOLANG_DOWNLOAD_SHA256[arm64]="f89e7c0ba63782143bd1f896e4b96ea09e4baf39e8bc2f2ddf27339f9e433dd3"
;;
1.20)
INSTALL_GOLANG_VERSION=1.20.3 # Update scripts/install-golang for FIPS if this version is bumped
GOLANG_DOWNLOAD_SHA256[amd64]="979694c2c25c735755bf26f4f45e19e64e4811d661dd07b8c010f7a8e18adfca"
GOLANG_DOWNLOAD_SHA256[arm64]="eb186529f13f901e7a2c4438a05c2cd90d74706aaa0a888469b2a4a617b6ee54"
;; ;;
*) fail "Unknown golang version $1" ;; *) fail "Unknown golang version $1" ;;
esac esac