go: update envs to use go 1.20

This commit is contained in:
Matt Vandersomething 2023-04-05 13:57:18 -03:00
parent 4cbf5d8732
commit 6965835059
No known key found for this signature in database
GPG Key ID: AB98ED47816ACAC6
6 changed files with 13 additions and 14 deletions

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -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 <vaibhav@digitalocean.com>
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 <vaibhav@digitalocean.com>
RUN apt-get update && \
apt-get install -y apt-transport-https curl wget gnupg

4
go.mod
View File

@ -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
)

3
go.sum
View File

@ -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=