Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use Go 1.19 for testing and building #228

Merged
merged 3 commits into from
Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Install Go 1.18
- name: Install Go 1.19
uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: 1.19

- name: Generate the bundle contents
run: make bundle
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/kind-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Install Go 1.18
- name: Install Go 1.19
uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: 1.19

- name: Deploy the controller and CRDs
run: make deploy
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tag-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Install Go 1.18
- name: Install Go 1.19
uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: 1.19

- name: Generate the bundle contents
run: make bundle TAG=${{ github.ref_name }}
Expand Down Expand Up @@ -109,10 +109,10 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Install Go 1.18
- name: Install Go 1.19
uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: 1.19

- name: Generate manifests for installation by kubectl
run: make manifests TAG=${{ github.ref_name }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v3

- name: Install Go 1.18
- name: Install Go 1.19
uses: actions/setup-go@v3
with:
go-version: '1.18'
go-version: 1.19

- name: Generate the bundle contents
run: make bundle
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Golang
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Run "make test"
run: make test
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Set up Golang
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Verify Go modules
run: go mod verify
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Set up Golang
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.19

- name: Vendor all dependencies
run: go mod vendor
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.18 as builder
FROM golang:1.19 as builder

# Copy the contents of the repository
ADD . /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons
Expand Down
4 changes: 2 additions & 2 deletions apis/csiaddons/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ limitations under the License.
*/

// Package v1alpha1 contains API Schema definitions for the csiaddons v1alpha1 API group
//+kubebuilder:object:generate=true
//+groupName=csiaddons.openshift.io
// +kubebuilder:object:generate=true
// +groupName=csiaddons.openshift.io
package v1alpha1

import (
Expand Down
4 changes: 2 additions & 2 deletions apis/replication.storage/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ limitations under the License.
*/

// Package v1alpha1 contains API Schema definitions for the replication.storage v1alpha1 API group
//+kubebuilder:object:generate=true
//+groupName=replication.storage.openshift.io
// +kubebuilder:object:generate=true
// +groupName=replication.storage.openshift.io
package v1alpha1

import (
Expand Down
2 changes: 1 addition & 1 deletion build/Containerfile.sidecar
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the sidecar binary
FROM golang:1.18 as builder
FROM golang:1.19 as builder

# Copy the contents of the repository
ADD . /workspace/go/src/github.com/csi-addons/kubernetes-csi-addons
Expand Down
6 changes: 3 additions & 3 deletions sidecar/internal/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ func ValidateControllerEndpoint(rawIP, rawPort string) (string, error) {
// sidecar running.
// The format of the URL depends on the arguments passed to this function, it
// will return either
// - a ValidateControllerEndpoint() if rawIP is set
// - pod://<pod>:<port> if pod is set, and rawIP and namespace are not set
// - pod://<pod>.<namespace>:<port> if pod, namespace are set, and rawIP not
// - a ValidateControllerEndpoint() if rawIP is set
// - pod://<pod>:<port> if pod is set, and rawIP and namespace are not set
// - pod://<pod>.<namespace>:<port> if pod, namespace are set, and rawIP not
func BuildEndpointURL(rawIP, rawPort, pod, namespace string) (string, error) {
if rawIP != "" {
return ValidateControllerEndpoint(rawIP, rawPort)
Expand Down