Skip to content

Commit

Permalink
Go 1.19 (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
liranbg authored Jan 29, 2023
1 parent cb07734 commit 4ce31ef
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 534 deletions.
36 changes: 6 additions & 30 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,8 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "1.17"

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
cache: true
go-version-file: "go.mod"

- name: Lint
run: make lint
Expand All @@ -47,16 +39,8 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "1.17"

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
cache: true
go-version-file: "go.mod"

- name: Run test
run: make test
Expand All @@ -69,16 +53,8 @@ jobs:

- uses: actions/setup-go@v3
with:
go-version: "1.17"

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
cache: true
go-version-file: "go.mod"

- name: Build docker images
run: make docker-images
28 changes: 4 additions & 24 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,12 @@ jobs:
name: Release Docker Images
runs-on: ubuntu-latest
steps:
- name: Dump github context
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}

- name: Dump runner context
run: echo "$RUNNER_CONTEXT"
env:
RUNNER_CONTEXT: ${{ toJson(runner) }}

- name: Dump github ref
run: echo "$GITHUB_REF"

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

- uses: actions/setup-go@v3
with:
go-version: "1.17"

- uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
cache: true
go-version-file: "go.mod"

- uses: azure/docker-login@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ lint: modules
| tr -d \" \
| wget -O $(GOPATH)/bin/impi -qi -
@test -e $(GOPATH)/bin/golangci-lint || \
(curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.41.1)
(curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.50.1)

@echo Verifying imports...
chmod +x $(GOPATH)/bin/impi && $(GOPATH)/bin/impi \
Expand Down
4 changes: 2 additions & 2 deletions cmd/autoscaler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
#

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

RUN apk --update --no-cache add \
git \
Expand All @@ -30,6 +30,6 @@ COPY . .

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

FROM gcr.io/iguazio/alpine:3.16
FROM gcr.io/iguazio/alpine:3.17

COPY --from=builder /autoscaler/autoscaler /home/v3io/bin/autoscaler
4 changes: 2 additions & 2 deletions cmd/dlx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.
#

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

RUN apk --update --no-cache add \
git \
Expand All @@ -30,6 +30,6 @@ COPY . .

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

FROM gcr.io/iguazio/alpine:3.16
FROM gcr.io/iguazio/alpine:3.17

COPY --from=builder /dlx/dlx /home/v3io/bin/dlx
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
module github.com/v3io/scaler

go 1.17
go 1.19

require (
github.com/nuclio/errors v0.0.4
github.com/nuclio/logger v0.0.1
github.com/nuclio/zap v0.1.2
github.com/stretchr/testify v1.8.0
k8s.io/apimachinery v0.23.8
k8s.io/client-go v0.23.8
k8s.io/metrics v0.23.8
k8s.io/apimachinery v0.23.16
k8s.io/client-go v0.23.16
k8s.io/metrics v0.23.16
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/go-cmp v0.5.8 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/imdario/mergo v0.3.7 // indirect
Expand All @@ -31,21 +31,21 @@ require (
github.com/stretchr/objx v0.4.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/net v0.0.0-20211209124913-491a49abca63 // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e // indirect
golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/oauth2 v0.4.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/term v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
golang.org/x/time v0.3.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.23.8 // indirect
k8s.io/api v0.23.16 // indirect
k8s.io/klog/v2 v2.30.0 // indirect
k8s.io/utils v0.0.0-20211116205334-6203023598ed // indirect
sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)
Loading

0 comments on commit 4ce31ef

Please sign in to comment.