Skip to content
Snippets Groups Projects
Unverified Commit 358f76b4 authored by Joel Takvorian's avatar Joel Takvorian Committed by GitHub
Browse files

Move to go1.19 (#96)

* Move to go1.19

* Fix go1.19 breaking cvhanges

* Still allow building with 1.18

* revert space changes on autogen files
parent 7c35a264
No related branches found
No related tags found
No related merge requests found
......@@ -10,12 +10,15 @@ jobs:
test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.18','1.19']
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: ${{ matrix.go }}
- name: Install make
run: sudo apt -y install make
- name: Run verification and tests
......
......@@ -17,7 +17,7 @@ jobs:
- name: set up go 1.x
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19
- name: checkout
uses: actions/checkout@v3
- name: run end-to-end tests
......
......@@ -14,10 +14,10 @@ env:
jobs:
push-image:
name: push image
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.18']
go: ['1.19']
steps:
- name: install make
run: sudo apt-get install make
......
......@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.18']
go: ['1.19']
steps:
- name: install make
run: sudo apt-get install make
......
......@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
go: ['1.18']
go: ['1.19']
steps:
- name: checkout
uses: actions/checkout@v3
......
......@@ -21,7 +21,7 @@ linters:
- varcheck
linters-settings:
stylecheck:
go: "1.18"
go: "1.19"
gocritic:
enabled-checks:
- hugeParam
......
# Build the manager binary
FROM registry.access.redhat.com/ubi9/go-toolset:1.18.4 as builder
FROM docker.io/library/golang:1.19 as builder
ARG SW_VERSION="unknown"
ARG GOVERSION="1.18.4"
WORKDIR /opt/app-root
......@@ -20,7 +19,7 @@ COPY Makefile Makefile
RUN make compile
# Create final image from minimal + built binary
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.1.0
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.1
WORKDIR /
COPY --from=builder /opt/app-root/bin/netobserv-ebpf-agent .
USER 65532:65532
......
......@@ -11,7 +11,7 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path"
"sort"
"testing"
......@@ -264,7 +264,7 @@ func deployManifestFile(definition Deployment,
) error {
log.WithField("file", definition.ManifestFile).Info("deploying manifest file")
b, err := ioutil.ReadFile(definition.ManifestFile)
b, err := os.ReadFile(definition.ManifestFile)
if err != nil {
return fmt.Errorf("reading manifest file %q: %w", definition.ManifestFile, err)
}
......
......@@ -3,7 +3,7 @@ package tester
import (
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"net/url"
......@@ -33,7 +33,7 @@ func (l *Loki) get(pathQuery string) (status int, body string, err error) {
if err != nil {
return 0, "", err
}
bodyBytes, err := ioutil.ReadAll(resp.Body)
bodyBytes, err := io.ReadAll(resp.Body)
if err != nil {
return resp.StatusCode, "", err
}
......
......@@ -3,7 +3,7 @@ package agent
import (
"crypto/tls"
"crypto/x509"
"io/ioutil"
"os"
)
func buildTLSConfig(cfg *Config) (*tls.Config, error) {
......@@ -11,7 +11,7 @@ func buildTLSConfig(cfg *Config) (*tls.Config, error) {
InsecureSkipVerify: cfg.KafkaTLSInsecureSkipVerify,
}
if cfg.KafkaTLSCACertPath != "" {
caCert, err := ioutil.ReadFile(cfg.KafkaTLSCACertPath)
caCert, err := os.ReadFile(cfg.KafkaTLSCACertPath)
if err != nil {
return nil, err
}
......@@ -19,11 +19,11 @@ func buildTLSConfig(cfg *Config) (*tls.Config, error) {
tlsConfig.RootCAs.AppendCertsFromPEM(caCert)
if cfg.KafkaTLSUserCertPath != "" && cfg.KafkaTLSUserKeyPath != "" {
userCert, err := ioutil.ReadFile(cfg.KafkaTLSUserCertPath)
userCert, err := os.ReadFile(cfg.KafkaTLSUserCertPath)
if err != nil {
return nil, err
}
userKey, err := ioutil.ReadFile(cfg.KafkaTLSUserKeyPath)
userKey, err := os.ReadFile(cfg.KafkaTLSUserKeyPath)
if err != nil {
return nil, err
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment