From 69658350593d4e4e0e70333b58b86df0670b641a Mon Sep 17 00:00:00 2001 From: Matt Vandersomething Date: Wed, 5 Apr 2023 13:57:18 -0300 Subject: [PATCH] go: update envs to use go 1.20 --- .github/workflows/license.yml | 4 ++-- .github/workflows/run_build.yml | 4 ++-- .github/workflows/run_tests.yml | 6 +++--- Dockerfile | 6 ++---- go.mod | 4 ++-- go.sum | 3 ++- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index 6cc9430..b41ab85 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -1,4 +1,4 @@ -# Copyright 2022 DigitalOcean +# Copyright 2023 DigitalOcean # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.17 + go-version: '1.20' - name: Download addlicense run: go get -d github.com/google/addlicense diff --git a/.github/workflows/run_build.yml b/.github/workflows/run_build.yml index 9d94eb6..809c3a4 100644 --- a/.github/workflows/run_build.yml +++ b/.github/workflows/run_build.yml @@ -1,4 +1,4 @@ -# Copyright 2022 DigitalOcean +# Copyright 2023 DigitalOcean # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ jobs: - uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: '1.20' - name: Download Ceph repository key run: wget -q 'https://download.ceph.com/keys/release.asc' diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index a006500..a3bbad0 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -1,4 +1,4 @@ -# Copyright 2022 DigitalOcean +# Copyright 2023 DigitalOcean # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ name: Tests -on: +on: push: branches: [main] pull_request: @@ -30,7 +30,7 @@ jobs: - uses: actions/setup-go@v2 with: - go-version: 1.18 + go-version: '1.20' # We only test the Ceph package since main depends on go-ceph - name: Go test diff --git a/Dockerfile b/Dockerfile index 7a83cf3..c9dafad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# Copyright 2022 DigitalOcean +# Copyright 2023 DigitalOcean # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,7 +13,6 @@ # limitations under the License. FROM ubuntu:20.04 as builder -MAINTAINER Vaibhav Bhembre ARG TEST @@ -33,7 +32,7 @@ RUN apt-get update && \ RUN \ mkdir -p /goroot && \ - curl https://storage.googleapis.com/golang/go1.18.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1 + curl https://storage.googleapis.com/golang/go1.20.linux-amd64.tar.gz | tar xvzf - -C /goroot --strip-components=1 ADD . $APPLOC WORKDIR $APPLOC @@ -44,7 +43,6 @@ RUN if [ -n "${TEST}" ]; then go test -tags nautilus -v -race -count=1 ./...; fi RUN go build -tags nautilus -o /bin/ceph_exporter FROM ubuntu:20.04 -MAINTAINER Vaibhav Bhembre RUN apt-get update && \ apt-get install -y apt-transport-https curl wget gnupg diff --git a/go.mod b/go.mod index cdfca8c..2a7bc85 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/digitalocean/ceph_exporter -go 1.18 +go 1.20 require ( github.com/Jeffail/gabs v1.4.0 @@ -25,7 +25,7 @@ require ( github.com/prometheus/common v0.32.1 // indirect github.com/prometheus/procfs v0.7.3 // indirect github.com/stretchr/objx v0.1.1 // indirect - golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect + golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect google.golang.org/protobuf v1.26.0 // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect ) diff --git a/go.sum b/go.sum index dbc4b84..7f2913e 100644 --- a/go.sum +++ b/go.sum @@ -331,8 +331,9 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=