Skip to content

Commit 4ce31ef

Browse files
authored
Go 1.19 (#58)
1 parent cb07734 commit 4ce31ef

File tree

9 files changed

+57
-534
lines changed

9 files changed

+57
-534
lines changed

.github/workflows/ci.yaml

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,8 @@ jobs:
2525

2626
- uses: actions/setup-go@v3
2727
with:
28-
go-version: "1.17"
29-
30-
- uses: actions/cache@v3
31-
with:
32-
path: |
33-
~/.cache/go-build
34-
~/go/pkg/mod
35-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
36-
restore-keys: |
37-
${{ runner.os }}-go-
28+
cache: true
29+
go-version-file: "go.mod"
3830

3931
- name: Lint
4032
run: make lint
@@ -47,16 +39,8 @@ jobs:
4739

4840
- uses: actions/setup-go@v3
4941
with:
50-
go-version: "1.17"
51-
52-
- uses: actions/cache@v3
53-
with:
54-
path: |
55-
~/.cache/go-build
56-
~/go/pkg/mod
57-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
58-
restore-keys: |
59-
${{ runner.os }}-go-
42+
cache: true
43+
go-version-file: "go.mod"
6044

6145
- name: Run test
6246
run: make test
@@ -69,16 +53,8 @@ jobs:
6953

7054
- uses: actions/setup-go@v3
7155
with:
72-
go-version: "1.17"
73-
74-
- uses: actions/cache@v3
75-
with:
76-
path: |
77-
~/.cache/go-build
78-
~/go/pkg/mod
79-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
80-
restore-keys: |
81-
${{ runner.os }}-go-
56+
cache: true
57+
go-version-file: "go.mod"
8258

8359
- name: Build docker images
8460
run: make docker-images

.github/workflows/release.yaml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,12 @@ jobs:
3333
name: Release Docker Images
3434
runs-on: ubuntu-latest
3535
steps:
36-
- name: Dump github context
37-
run: echo "$GITHUB_CONTEXT"
38-
env:
39-
GITHUB_CONTEXT: ${{ toJson(github) }}
40-
41-
- name: Dump runner context
42-
run: echo "$RUNNER_CONTEXT"
43-
env:
44-
RUNNER_CONTEXT: ${{ toJson(runner) }}
45-
46-
- name: Dump github ref
47-
run: echo "$GITHUB_REF"
4836

4937
- name: Extract ref info
5038
id: release_info
5139
run: |
52-
echo ::set-output name=REF_BRANCH::${GITHUB_REF#refs/heads/}
53-
echo ::set-output name=REF_TAG::${GITHUB_REF#refs/tags/}
40+
echo "REF_BRANCH=$(echo ${GITHUB_REF#refs/heads/} | tr / -)" | tee -a $GITHUB_ENV
41+
echo "REF_TAG=$(echo ${GITHUB_REF#refs/tags/} | tr / -)" | tee -a $GITHUB_ENV
5442
5543
- name: Set SCALER_LABEL to unstable
5644
if: github.event_name == 'push' && steps.release_info.outputs.REF_BRANCH == 'development'
@@ -66,16 +54,8 @@ jobs:
6654

6755
- uses: actions/setup-go@v3
6856
with:
69-
go-version: "1.17"
70-
71-
- uses: actions/cache@v3
72-
with:
73-
path: |
74-
~/.cache/go-build
75-
~/go/pkg/mod
76-
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
77-
restore-keys: |
78-
${{ runner.os }}-go-
57+
cache: true
58+
go-version-file: "go.mod"
7959

8060
- uses: azure/docker-login@v1
8161
with:

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ lint: modules
8181
| tr -d \" \
8282
| wget -O $(GOPATH)/bin/impi -qi -
8383
@test -e $(GOPATH)/bin/golangci-lint || \
84-
(curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.41.1)
84+
(curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.50.1)
8585

8686
@echo Verifying imports...
8787
chmod +x $(GOPATH)/bin/impi && $(GOPATH)/bin/impi \

cmd/autoscaler/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
#
1515

16-
FROM gcr.io/iguazio/golang:1.17-alpine3.15 AS builder
16+
FROM gcr.io/iguazio/golang:1.19-alpine3.17 AS builder
1717

1818
RUN apk --update --no-cache add \
1919
git \
@@ -30,6 +30,6 @@ COPY . .
3030

3131
RUN GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-s -w" -o autoscaler cmd/autoscaler/main.go
3232

33-
FROM gcr.io/iguazio/alpine:3.16
33+
FROM gcr.io/iguazio/alpine:3.17
3434

3535
COPY --from=builder /autoscaler/autoscaler /home/v3io/bin/autoscaler

cmd/dlx/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
#
1515

16-
FROM gcr.io/iguazio/golang:1.17-alpine3.15 AS builder
16+
FROM gcr.io/iguazio/golang:1.19-alpine3.17 AS builder
1717

1818
RUN apk --update --no-cache add \
1919
git \
@@ -30,6 +30,6 @@ COPY . .
3030

3131
RUN GOOS=linux GOARCH=amd64 go build -a -installsuffix cgo -ldflags="-s -w" -o dlx cmd/dlx/main.go
3232

33-
FROM gcr.io/iguazio/alpine:3.16
33+
FROM gcr.io/iguazio/alpine:3.17
3434

3535
COPY --from=builder /dlx/dlx /home/v3io/bin/dlx

go.mod

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
module github.com/v3io/scaler
22

3-
go 1.17
3+
go 1.19
44

55
require (
66
github.com/nuclio/errors v0.0.4
77
github.com/nuclio/logger v0.0.1
88
github.com/nuclio/zap v0.1.2
99
github.com/stretchr/testify v1.8.0
10-
k8s.io/apimachinery v0.23.8
11-
k8s.io/client-go v0.23.8
12-
k8s.io/metrics v0.23.8
10+
k8s.io/apimachinery v0.23.16
11+
k8s.io/client-go v0.23.16
12+
k8s.io/metrics v0.23.16
1313
)
1414

1515
require (
1616
github.com/davecgh/go-spew v1.1.1 // indirect
1717
github.com/go-logr/logr v1.2.0 // indirect
1818
github.com/gogo/protobuf v1.3.2 // indirect
1919
github.com/golang/protobuf v1.5.2 // indirect
20-
github.com/google/go-cmp v0.5.5 // indirect
20+
github.com/google/go-cmp v0.5.8 // indirect
2121
github.com/google/gofuzz v1.1.0 // indirect
2222
github.com/googleapis/gnostic v0.5.5 // indirect
2323
github.com/imdario/mergo v0.3.7 // indirect
@@ -31,21 +31,21 @@ require (
3131
github.com/stretchr/objx v0.4.0 // indirect
3232
go.uber.org/atomic v1.7.0 // indirect
3333
go.uber.org/multierr v1.6.0 // indirect
34-
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
35-
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
36-
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e // indirect
37-
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
38-
golang.org/x/text v0.3.7 // indirect
39-
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
34+
golang.org/x/net v0.5.0 // indirect
35+
golang.org/x/oauth2 v0.4.0 // indirect
36+
golang.org/x/sys v0.4.0 // indirect
37+
golang.org/x/term v0.4.0 // indirect
38+
golang.org/x/text v0.6.0 // indirect
39+
golang.org/x/time v0.3.0 // indirect
4040
google.golang.org/appengine v1.6.7 // indirect
41-
google.golang.org/protobuf v1.27.1 // indirect
41+
google.golang.org/protobuf v1.28.0 // indirect
4242
gopkg.in/inf.v0 v0.9.1 // indirect
4343
gopkg.in/yaml.v2 v2.4.0 // indirect
4444
gopkg.in/yaml.v3 v3.0.1 // indirect
45-
k8s.io/api v0.23.8 // indirect
45+
k8s.io/api v0.23.16 // indirect
4646
k8s.io/klog/v2 v2.30.0 // indirect
4747
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
4848
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
49-
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
49+
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
5050
sigs.k8s.io/yaml v1.2.0 // indirect
5151
)

0 commit comments

Comments
 (0)