From afe2baf30a05ffdb3d86b1189e45383353da7b00 Mon Sep 17 00:00:00 2001
From: Mario Macias <mmaciasl@redhat.com>
Date: Tue, 13 Dec 2022 10:20:46 +0100
Subject: [PATCH] NETOBSERV-743: update build image & CI tests to Go 1.18 (4.12
 backport) (#72)

* NETOBSERV-743: update build image & CI tests to Go 1.18

* enable tests triggering
---
 .github/workflows/pull_request.yml             | 8 ++++----
 .github/workflows/pull_request_e2e.yml         | 6 +++---
 .github/workflows/push_image.yml               | 2 +-
 .github/workflows/push_image_pr.yml            | 2 +-
 .github/workflows/release.yml                  | 2 +-
 .golangci.yml                                  | 2 +-
 Dockerfile                                     | 4 ++--
 examples/performance/Dockerfile_packet_counter | 2 +-
 scripts/generators.Dockerfile                  | 2 +-
 9 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index 2ebb4bac..93b2164d 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -2,9 +2,9 @@ name: Pull request checks
 
 on:
   push:
-    branches: [ main ]
+    branches: [ 'main', 'release-*' ]
   pull_request:
-    branches: [ main ]
+    branches: [ 'main', 'release-*' ]
 
 jobs:
   test:
@@ -12,13 +12,13 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        go: ['1.17']
+        go: ['1.18']
     steps:
     - uses: actions/checkout@v2
     - name: Set up Go
       uses: actions/setup-go@v2
       with:
-        go-version: 1.17
+        go-version: 1.18
     - name: Install make
       run: sudo apt -y install make
     - name: Run verification and tests
diff --git a/.github/workflows/pull_request_e2e.yml b/.github/workflows/pull_request_e2e.yml
index e8fab5dc..d34adea6 100644
--- a/.github/workflows/pull_request_e2e.yml
+++ b/.github/workflows/pull_request_e2e.yml
@@ -3,9 +3,9 @@ name: pull request - e2e tests
 #todo: check caching dependencies: https://github.com/actions/cache
 on:
   push:
-    branches: [ main ]
+    branches: [ 'main', 'release-*' ]
   pull_request:
-    branches: [ main ]
+    branches: [ 'main', 'release-*' ]
 
 jobs:
   e2e-tests:
@@ -13,7 +13,7 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        go: ['1.17']
+        go: ['1.18']
     steps:
     - name: install make
       run: sudo apt-get install make
diff --git a/.github/workflows/push_image.yml b/.github/workflows/push_image.yml
index 7d9d2bcc..9b541818 100644
--- a/.github/workflows/push_image.yml
+++ b/.github/workflows/push_image.yml
@@ -17,7 +17,7 @@ jobs:
     runs-on: ubuntu-20.04
     strategy:
       matrix:
-        go: ['1.17']
+        go: ['1.18']
     steps:
       - name: install make
         run: sudo apt-get install make
diff --git a/.github/workflows/push_image_pr.yml b/.github/workflows/push_image_pr.yml
index 47292aad..faf41691 100644
--- a/.github/workflows/push_image_pr.yml
+++ b/.github/workflows/push_image_pr.yml
@@ -16,7 +16,7 @@ jobs:
     runs-on: ubuntu-20.04
     strategy:
       matrix:
-        go: ['1.17']
+        go: ['1.18']
     steps:
       - name: install make
         run: sudo apt-get install make
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index bfc7cf09..19ba12fd 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -16,7 +16,7 @@ jobs:
     runs-on: ubuntu-20.04
     strategy:
       matrix:
-        go: ['1.17']
+        go: ['1.18']
     steps:
       - name: checkout
         uses: actions/checkout@v2
diff --git a/.golangci.yml b/.golangci.yml
index dd337cd2..b75c21b7 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -21,7 +21,7 @@ linters:
     - varcheck
 linters-settings:
   stylecheck:
-    go: "1.17"
+    go: "1.18"
   gocritic:
     enabled-checks:
       - hugeParam
diff --git a/Dockerfile b/Dockerfile
index 860d0712..317106e7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,8 +1,8 @@
 # Build the manager binary
-FROM registry.access.redhat.com/ubi8/go-toolset:1.17.12 as builder
+FROM registry.access.redhat.com/ubi8/go-toolset:1.18.4 as builder
 
 ARG SW_VERSION="unknown"
-ARG GOVERSION="1.17.8"
+ARG GOVERSION="1.18.4"
 
 WORKDIR /opt/app-root
 
diff --git a/examples/performance/Dockerfile_packet_counter b/examples/performance/Dockerfile_packet_counter
index 4a61afd2..5e8863b5 100644
--- a/examples/performance/Dockerfile_packet_counter
+++ b/examples/performance/Dockerfile_packet_counter
@@ -1,6 +1,6 @@
 # this file has to be built from the project root directory
 
-FROM golang:1.17 as builder
+FROM golang:1.18 as builder
 
 WORKDIR /app
 
diff --git a/scripts/generators.Dockerfile b/scripts/generators.Dockerfile
index b98de99b..d5218bbc 100644
--- a/scripts/generators.Dockerfile
+++ b/scripts/generators.Dockerfile
@@ -1,6 +1,6 @@
 FROM fedora:35
 
-ARG GOVERSION="1.17.12"
+ARG GOVERSION="1.18.4"
 ARG PROTOCVERSION="3.19.4"
 
 # Installs dependencies that are required to compile eBPF programs
-- 
GitLab