Skip to content

Commit cc8120c

Browse files
awgreeneperdasilva
authored andcommitted
Bump go to v1.17 (#922)
This commit updates the operator-registry's go version to v1.17. Signed-off-by: Alexander Greene <[email protected]> Upstream-repository: operator-registry Upstream-commit: c970d617ce2d77c096102e2d881a15ef680bacf9 Signed-off-by: perdasilva <[email protected]>
1 parent d795a1d commit cc8120c

File tree

97 files changed

+5212
-4261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+5212
-4261
lines changed

base.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Dockerfile to bootstrap build and test in openshift-ci
22

3-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8
3+
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.8
44

55
ARG KUBEBUILDER_RELEASE=2.3.1
66
# Install test dependencies

go.sum

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:H
114114
github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo=
115115
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
116116
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
117+
github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E=
117118
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
118119
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
119120
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
@@ -268,9 +269,9 @@ github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c
268269
github.com/distribution/distribution v2.7.1+incompatible h1:aGFx4EvJWKEh//lHPLwFhFgwFHKH06TzNVPamrMn04M=
269270
github.com/distribution/distribution v2.7.1+incompatible/go.mod h1:EgLm2NgWtdKgzF9NpMzUKgzmR7AMmb0VQi2B+ZzDRjc=
270271
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
271-
github.com/docker/cli v0.0.0-20200130152716-5d0cf8839492/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
272-
github.com/docker/cli v20.10.5+incompatible h1:bjflayQbWg+xOkF2WPEAOi4Y7zWhR7ptoPhV/VqLVDE=
273272
github.com/docker/cli v20.10.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
273+
github.com/docker/cli v20.10.12+incompatible h1:lZlz0uzG+GH+c0plStMUdF/qk3ppmgnswpR5EbqzVGA=
274+
github.com/docker/cli v20.10.12+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
274275
github.com/docker/distribution v0.0.0-20191216044856-a8371794149d h1:jC8tT/S0OGx2cswpeUTn4gOIea8P08lD3VFQT0cOZ50=
275276
github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
276277
github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
@@ -1439,8 +1440,9 @@ golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBc
14391440
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14401441
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14411442
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1442-
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e h1:XMgFehsDnnLGtjvjOfqWSUzt0alpTR1RSEuznObga2c=
14431443
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1444+
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik=
1445+
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14441446
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
14451447
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
14461448
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=

operator-lifecycle-manager.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.10 AS builder
1+
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.10 AS builder
22

33
ENV GO111MODULE auto
44
ENV GOPATH /go

operator-registry.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.10 AS builder
1+
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.10 AS builder
22

33
ENV GOPATH /go
44
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

staging/operator-registry/.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ jobs:
1515
- uses: actions/checkout@v2
1616
- uses: actions/setup-go@v2
1717
with:
18-
go-version: '~1.16'
18+
go-version: '~1.17'
1919
- run: make build

staging/operator-registry/.github/workflows/go-apidiff.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Go
1818
uses: actions/setup-go@v2
1919
with:
20-
go-version: '~1.16'
20+
go-version: '~1.17'
2121
id: go
2222
- name: Check out code into the Go module directory
2323
uses: actions/checkout@v2

staging/operator-registry/.github/workflows/goreleaser.yaml

Lines changed: 90 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,63 +10,105 @@ defaults:
1010
run:
1111
shell: bash
1212
jobs:
13-
goreleaser:
13+
release:
14+
needs:
15+
- build-windows
16+
- build-darwin
17+
- build-linux
18+
1419
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- uses: actions/download-artifact@v2
23+
24+
- run: |
25+
for dist in dist-*; do
26+
tar -C "${dist}" -xf "${dist}/${dist}.tar"
27+
done
28+
- name: Create assets
29+
run: |
30+
set -xe
31+
mkdir -p assets
32+
cat dist-*/dist/checksums.txt > assets/checksums.txt
33+
for asset in dist-*/dist/*_*/*; do
34+
base=$(basename "${asset}")
35+
variant=$(basename $(dirname "${asset}") | cut -d_ -f1)
36+
cp "${asset}" "assets/${variant}-${base}"
37+
done
38+
find assets -ls
39+
cat assets/checksums.txt
40+
- name: Upload Release Assets
41+
if: github.ref_type == 'tag'
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: gh release create "${{ github.ref_name }}" --generate-notes ./assets/*
45+
46+
build-windows:
47+
runs-on: windows-latest
1548
steps:
1649
- uses: actions/checkout@v2
1750
with:
18-
# GoReleaser requires fetch-depth: 0 for
19-
# changelog generation to work correctly.
51+
# GoReleaser requires fetch-depth: 0 to correctly
52+
# run git describe
2053
fetch-depth: 0
21-
2254
- uses: actions/setup-go@v2
2355
with:
24-
go-version: '~1.16'
56+
go-version: '~1.17'
2557

26-
- name: "Download osxcross cross-compiler for macOS builds"
27-
run: |
28-
git clone https://github.com/tpoechtrager/osxcross /tmp/osxcross
29-
cd /tmp/osxcross
30-
wget -P tarballs '<REPLACE_ME_WITH_SECRET_PATH_TO_MACOS_SDK>'
31-
echo "/tmp/osxcross/target/bin" >> $GITHUB_PATH
58+
- name: "Run GoReleaser"
59+
run: make release
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
RELEASE_ARGS: release --rm-dist -f release/goreleaser.windows.yaml --skip-validate ${{ github.event_name == 'pull_request' && '--snapshot' || '' }}
3263

33-
- name: "Cache the osxcross + tarball build output"
34-
id: cache-osxcross
35-
uses: actions/cache@v2
64+
- run: tar -cvf dist-windows.tar dist
65+
- uses: actions/upload-artifact@v2
3666
with:
37-
path: /tmp/osxcross/target
38-
key: ${{ runner.os }}-osxcross-${{ hashFiles('/tmp/osxcross/**/*') }}
39-
restore-keys: |
40-
${{ runner.os }}-osxcross-
67+
name: dist-windows
68+
path: dist-windows.tar
4169

42-
- name: "Build osxcross"
43-
if: steps.cache-osxcross.outputs.cache-hit != 'true'
44-
run: |
45-
cd /tmp/osxcross
46-
sudo ./tools/get_dependencies.sh
47-
UNATTENDED=1 ./build.sh
70+
build-darwin:
71+
runs-on: macos-latest
72+
steps:
73+
- uses: actions/checkout@v2
74+
with:
75+
# GoReleaser requires fetch-depth: 0 to correctly
76+
# run git describe
77+
fetch-depth: 0
4878

49-
- name: "Install linux cross-compilers"
50-
run: |
51-
sudo apt-get update
52-
sudo apt-get install -y gcc-aarch64-linux-gnu gcc-s390x-linux-gnu gcc-powerpc64le-linux-gnu gcc-mingw-w64-x86-64
79+
- uses: actions/setup-go@v2
80+
with:
81+
go-version: '~1.17'
5382

54-
- name: "Install yq"
55-
run: |
56-
sudo wget https://github.com/mikefarah/yq/releases/download/v4.10.0/yq_linux_amd64 -O /usr/local/bin/yq
57-
sudo chmod +x /usr/local/bin/yq
83+
- name: "Run GoReleaser"
84+
run: make release
85+
env:
86+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
87+
RELEASE_ARGS: release --rm-dist -f release/goreleaser.darwin.yaml --skip-validate ${{ github.event_name == 'pull_request' && '--snapshot' || '' }}
5888

59-
- name: "Disable image pushes for pull requests"
60-
if: github.event_name == 'pull_request'
61-
run: |
62-
yq eval '.dockers[].skip_push=true' -i .goreleaser.yaml
63-
yq eval '.docker_manifests[].skip_push=true' -i .goreleaser.yaml
89+
- run: gtar -cvf dist-darwin.tar dist
90+
- uses: actions/upload-artifact@v2
91+
with:
92+
name: dist-darwin
93+
path: dist-darwin.tar
6494

65-
- name: "Disable the Github release upload for non-tag builds"
66-
if: startsWith(github.ref, 'refs/tags') != true
67-
run: |
68-
yq eval '.release.disable=true' -i .goreleaser.yaml
95+
build-linux:
96+
runs-on: ubuntu-latest
97+
steps:
98+
- uses: actions/checkout@v2
99+
with:
100+
# GoReleaser requires fetch-depth: 0 to correctly
101+
# run git describe
102+
fetch-depth: 0
103+
104+
- uses: actions/setup-go@v2
105+
with:
106+
go-version: '~1.17'
69107

108+
- name: "Install linux cross-compilers"
109+
run: |
110+
sudo apt-get update
111+
sudo apt-get install -y gcc-aarch64-linux-gnu gcc-s390x-linux-gnu gcc-powerpc64le-linux-gnu
70112
- name: "Set the image tag"
71113
run: |
72114
if [[ $GITHUB_REF == refs/tags/* ]]; then
@@ -81,7 +123,6 @@ jobs:
81123
else
82124
echo IMAGE_TAG="$(git describe --tags --always)" >> $GITHUB_ENV
83125
fi
84-
85126
- name: "Login to Quay"
86127
if: github.event_name != 'pull_request'
87128
uses: docker/login-action@v1
@@ -97,4 +138,10 @@ jobs:
97138
run: make release
98139
env:
99140
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100-
RELEASE_ARGS: release --rm-dist ${{ !startsWith(github.ref, 'refs/tags') && '--skip-validate' || '' }}
141+
RELEASE_ARGS: release --rm-dist -f release/goreleaser.linux.yaml --skip-validate ${{ github.event_name == 'pull_request' && '--snapshot' || '' }}
142+
143+
- run: tar -cvf dist-linux.tar dist
144+
- uses: actions/upload-artifact@v2
145+
with:
146+
name: dist-linux
147+
path: dist-linux.tar

staging/operator-registry/.github/workflows/sanity.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v2
1717
- uses: actions/setup-go@v2
1818
with:
19-
go-version: '~1.16'
19+
go-version: '~1.17'
2020
- name: Install goimports
2121
run: go install golang.org/x/tools/cmd/goimports@latest
2222
- name: Run sanity checks

staging/operator-registry/.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-go@v2
1616
with:
17-
go-version: '~1.16'
17+
go-version: '~1.17'
1818
- name: Install podman
1919
run: |
2020
. /etc/os-release

staging/operator-registry/.github/workflows/unit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- uses: actions/checkout@v2
1717
- uses: actions/setup-go@v2
1818
with:
19-
go-version: '~1.16'
19+
go-version: '~1.17'
2020
- run: make unit
2121
- run: sed -i'' "s:^github.com/$GITHUB_REPOSITORY/::" coverage.out
2222
- run: .github/workflows/codecov.sh -Z -f coverage.out

staging/operator-registry/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8 AS builder
1+
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.17-openshift-4.8 AS builder
22

33
ENV GOPATH /go
44
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH

staging/operator-registry/codegen.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.16-alpine
1+
FROM golang:1.17-alpine
22

33
RUN apk update && \
44
apk add make git protobuf

0 commit comments

Comments
 (0)