Skip to content

Commit c20c996

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
1 parent 4b34942 commit c20c996

File tree

95 files changed

+5214
-4260
lines changed

Some content is hidden

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

95 files changed

+5214
-4260
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ require (
7070
github.com/davecgh/go-spew v1.1.1 // indirect
7171
github.com/deislabs/oras v0.11.1 // indirect
7272
github.com/distribution/distribution v2.7.1+incompatible // indirect
73-
github.com/docker/cli v20.10.5+incompatible // indirect
73+
github.com/docker/cli v20.10.12+incompatible // indirect
7474
github.com/docker/distribution v2.7.1+incompatible // indirect
7575
github.com/docker/docker v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible // indirect
7676
github.com/docker/docker-credential-helpers v0.6.3 // indirect
@@ -207,7 +207,7 @@ require (
207207
golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect
208208
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 // indirect
209209
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
210-
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e // indirect
210+
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 // indirect
211211
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
212212
golang.org/x/text v0.3.7 // indirect
213213
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect

go.sum

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,9 +268,9 @@ github.com/dhui/dktest v0.3.0/go.mod h1:cyzIUfGsBEbZ6BT7tnXqAShHSXCZhSNmFl70sZ7c
268268
github.com/distribution/distribution v2.7.1+incompatible h1:aGFx4EvJWKEh//lHPLwFhFgwFHKH06TzNVPamrMn04M=
269269
github.com/distribution/distribution v2.7.1+incompatible/go.mod h1:EgLm2NgWtdKgzF9NpMzUKgzmR7AMmb0VQi2B+ZzDRjc=
270270
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=
273271
github.com/docker/cli v20.10.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
272+
github.com/docker/cli v20.10.12+incompatible h1:lZlz0uzG+GH+c0plStMUdF/qk3ppmgnswpR5EbqzVGA=
273+
github.com/docker/cli v20.10.12+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
274274
github.com/docker/distribution v0.0.0-20191216044856-a8371794149d h1:jC8tT/S0OGx2cswpeUTn4gOIea8P08lD3VFQT0cOZ50=
275275
github.com/docker/distribution v0.0.0-20191216044856-a8371794149d/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
276276
github.com/docker/docker v0.7.3-0.20190103212154-2b7e084dc98b/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
@@ -1439,8 +1439,9 @@ golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBc
14391439
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14401440
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14411441
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=
14431442
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
1443+
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359 h1:2B5p2L5IfGiD7+b9BOoRMC6DgObAVZV+Fsp050NqXik=
1444+
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14441445
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
14451446
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
14461447
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE=

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: 93 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -10,62 +10,107 @@ 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+
29+
- name: Create assets
30+
run: |
31+
set -xe
32+
mkdir -p assets
33+
cat dist-*/dist/checksums.txt > assets/checksums.txt
34+
for asset in dist-*/dist/*_*/*; do
35+
base=$(basename "${asset}")
36+
variant=$(basename $(dirname "${asset}") | cut -d_ -f1)
37+
cp "${asset}" "assets/${variant}-${base}"
38+
done
39+
find assets -ls
40+
cat assets/checksums.txt
41+
42+
- name: Upload Release Assets
43+
if: github.ref_type == 'tag'
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
run: gh release create "${{ github.ref_name }}" --generate-notes ./assets/*
47+
48+
build-windows:
49+
runs-on: windows-latest
1550
steps:
1651
- uses: actions/checkout@v2
1752
with:
18-
# GoReleaser requires fetch-depth: 0 for
19-
# changelog generation to work correctly.
53+
# GoReleaser requires fetch-depth: 0 to correctly
54+
# run git describe
2055
fetch-depth: 0
21-
2256
- uses: actions/setup-go@v2
2357
with:
24-
go-version: '~1.16'
58+
go-version: '~1.17'
2559

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
32-
33-
- name: "Cache the osxcross + tarball build output"
34-
id: cache-osxcross
35-
uses: actions/cache@v2
60+
- name: "Run GoReleaser"
61+
run: make release
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
RELEASE_ARGS: release --rm-dist -f release/goreleaser.windows.yaml --skip-validate ${{ github.event_name == 'pull_request' && '--snapshot' || '' }}
65+
66+
- run: tar -cvf dist-windows.tar dist
67+
- uses: actions/upload-artifact@v2
3668
with:
37-
path: /tmp/osxcross/target
38-
key: ${{ runner.os }}-osxcross-${{ hashFiles('/tmp/osxcross/**/*') }}
39-
restore-keys: |
40-
${{ runner.os }}-osxcross-
69+
name: dist-windows
70+
path: dist-windows.tar
4171

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
72+
build-darwin:
73+
runs-on: macos-latest
74+
steps:
75+
- uses: actions/checkout@v2
76+
with:
77+
# GoReleaser requires fetch-depth: 0 to correctly
78+
# run git describe
79+
fetch-depth: 0
4880

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
81+
- uses: actions/setup-go@v2
82+
with:
83+
go-version: '~1.17'
5384

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
85+
- name: "Run GoReleaser"
86+
run: make release
87+
env:
88+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89+
RELEASE_ARGS: release --rm-dist -f release/goreleaser.darwin.yaml --skip-validate ${{ github.event_name == 'pull_request' && '--snapshot' || '' }}
5890

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
91+
- run: gtar -cvf dist-darwin.tar dist
92+
- uses: actions/upload-artifact@v2
93+
with:
94+
name: dist-darwin
95+
path: dist-darwin.tar
6496

65-
- name: "Disable the Github release upload for non-tag builds"
66-
if: startsWith(github.ref, 'refs/tags') != true
97+
build-linux:
98+
runs-on: ubuntu-latest
99+
steps:
100+
- uses: actions/checkout@v2
101+
with:
102+
# GoReleaser requires fetch-depth: 0 to correctly
103+
# run git describe
104+
fetch-depth: 0
105+
106+
- uses: actions/setup-go@v2
107+
with:
108+
go-version: '~1.17'
109+
110+
- name: "Install linux cross-compilers"
67111
run: |
68-
yq eval '.release.disable=true' -i .goreleaser.yaml
112+
sudo apt-get update
113+
sudo apt-get install -y gcc-aarch64-linux-gnu gcc-s390x-linux-gnu gcc-powerpc64le-linux-gnu
69114
70115
- name: "Set the image tag"
71116
run: |
@@ -97,4 +142,10 @@ jobs:
97142
run: make release
98143
env:
99144
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100-
RELEASE_ARGS: release --rm-dist ${{ !startsWith(github.ref, 'refs/tags') && '--skip-validate' || '' }}
145+
RELEASE_ARGS: release --rm-dist -f release/goreleaser.linux.yaml --skip-validate ${{ github.event_name == 'pull_request' && '--snapshot' || '' }}
146+
147+
- run: tar -cvf dist-linux.tar dist
148+
- uses: actions/upload-artifact@v2
149+
with:
150+
name: dist-linux
151+
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)