Skip to content

Commit 4d954af

Browse files
committed
chore(go): upgrade the go version
Signed-off-by: Shubham Chaudhary <[email protected]>
1 parent e96a7ee commit 4d954af

File tree

6 files changed

+43
-43
lines changed

6 files changed

+43
-43
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# Each line is a file pattern followed by one or more owners.
33

44
# These owners will be the default owners for everything in the repo.
5-
* @rahulchheda @ksatchit @chandankumar4 @rajdas98
5+
* @ksatchit @ispeakc0de @imrajdas

.github/workflows/build.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
# Install golang
1212
- uses: actions/setup-go@v2
1313
with:
14-
go-version: 1.20.0
14+
go-version: 1.22
1515

1616
# Checkout to the latest commit
1717
# On specific directory/path
@@ -26,7 +26,7 @@ jobs:
2626

2727
- name: unused-package check
2828
run: make unused-package-check
29-
29+
3030
trivy:
3131
needs: pre-checks
3232
runs-on: ubuntu-latest
@@ -38,7 +38,7 @@ jobs:
3838
- name: Build an image from Dockerfile
3939
run: |
4040
docker build -f build/Dockerfile -t docker.io/litmuschaos/chaos-operator:${{ github.sha }} . --build-arg TARGETPLATFORM=linux/amd64
41-
41+
4242
- name: Run Trivy vulnerability scanner
4343
uses: aquasecurity/trivy-action@master
4444
with:
@@ -47,7 +47,7 @@ jobs:
4747
exit-code: '1'
4848
ignore-unfixed: true
4949
vuln-type: 'os,library'
50-
severity: 'CRITICAL,HIGH'
50+
severity: 'CRITICAL,HIGH'
5151

5252
gitleaks-scan:
5353
runs-on: ubuntu-latest
@@ -79,7 +79,7 @@ jobs:
7979
make build-amd64
8080
docker save -o ${{ github.workspace }}/image.tar litmuschaos/chaos-operator:ci
8181
chmod +x ${{ github.workspace }}/image.tar
82-
82+
8383
- name: Upload artifact
8484
uses: actions/upload-artifact@v2
8585
with:
@@ -94,7 +94,7 @@ jobs:
9494
# Install golang
9595
- uses: actions/setup-go@v2
9696
with:
97-
go-version: 1.20.0
97+
go-version: 1.22
9898

9999
# Checkout to the latest commit
100100
# On specific directory/path
@@ -103,7 +103,7 @@ jobs:
103103

104104
#Install and configure a kind cluster
105105
- name: Installing Prerequisites (K3S Cluster)
106-
env:
106+
env:
107107
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
108108
run: |
109109
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.20.14-rc1+k3s1 sh -s - --docker --write-kubeconfig-mode 664
@@ -121,11 +121,11 @@ jobs:
121121
with:
122122
name: myimage
123123
path: ${{ github.workspace }}
124-
124+
125125
- name: Load Docker image
126126
run: |
127127
docker load --input ${{ github.workspace }}/image.tar
128-
shell: bash
128+
shell: bash
129129

130130
- name: Running Go BDD Test
131131
run: |

.github/workflows/e2e.yml

+26-26
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ name: ChaosOperator-E2E-pipeline
22
on:
33
issue_comment:
44
types: [created]
5-
5+
66
jobs:
77
Tests:
88
if: contains(github.event.comment.html_url, '/pull/') && startsWith(github.event.comment.body, '/run-e2e')
99
runs-on: ubuntu-latest
1010
steps:
11-
11+
1212
- name: Notification for e2e Start
1313
uses: peter-evans/create-or-update-comment@v1
1414
with:
@@ -19,13 +19,13 @@ jobs:
1919
2020
- uses: actions/setup-go@v2
2121
with:
22-
go-version: 1.20.0
23-
24-
- name: Setting up GOPATH
22+
go-version: 1.22
23+
24+
- name: Setting up GOPATH
2525
run: |
2626
echo ::set-env name=GOPATH::${GITHUB_WORKSPACE}/go
2727
env:
28-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
28+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
2929

3030
#Using the last commit id of pull request
3131
- uses: octokit/[email protected]
@@ -36,20 +36,20 @@ jobs:
3636
pull_number: ${{ github.event.issue.number }}
3737
env:
3838
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39-
39+
4040
- name: set commit to output
4141
id: getcommit
4242
run: |
4343
prsha=$(echo $response | jq '.[-1].sha' | tr -d '"')
44-
echo "::set-output name=sha::$prsha"
45-
env:
44+
echo "::set-output name=sha::$prsha"
45+
env:
4646
response: ${{ steps.get_PR_commits.outputs.data }}
47-
47+
4848
- uses: actions/checkout@v2
4949
with:
5050
ref: ${{steps.getcommit.outputs.sha}}
5151
path: go/src/github.com/litmuschaos/chaos-operator
52-
52+
5353
- name: Build docker image
5454
run: |
5555
export PATH=$PATH:$(go env GOPATH)/bin
@@ -62,7 +62,7 @@ jobs:
6262
uses: engineerd/[email protected]
6363
with:
6464
version: "v0.22.0"
65-
65+
6666
- name: Configuring and testing kind Installation
6767
run: |
6868
kubectl cluster-info
@@ -88,16 +88,16 @@ jobs:
8888
env:
8989
OPERATOR_IMAGE: litmuschaos/chaos-operator:ci
9090
IMAGE_PULL_POLICY: IfNotPresent
91-
KUBECONFIG: /home/runner/.kube/config
92-
91+
KUBECONFIG: /home/runner/.kube/config
92+
9393
- name: Run Admin mode test
9494
if: startsWith(github.event.comment.body, '/run-e2e-admin-mode') || startsWith(github.event.comment.body, '/run-e2e-all')
9595
run: |
9696
export PATH=$PATH:$(go env GOPATH)/bin
9797
cd ${GOPATH}/src/github.com/litmuschaos/litmus-e2e
9898
go test components/operator/admin-mode_test.go -v -count=1
9999
env:
100-
KUBECONFIG: /home/runner/.kube/config
100+
KUBECONFIG: /home/runner/.kube/config
101101

102102
- name: Run Reconcile Resiliency test
103103
if: startsWith(github.event.comment.body, '/run-e2e-reconcile-resiliency') || startsWith(github.event.comment.body, '/run-e2e-all')
@@ -106,7 +106,7 @@ jobs:
106106
cd ${GOPATH}/src/github.com/litmuschaos/litmus-e2e
107107
go test components/operator/reconcile-resiliency_test.go -v -count=1
108108
env:
109-
KUBECONFIG: /home/runner/.kube/config
109+
KUBECONFIG: /home/runner/.kube/config
110110

111111
- name: Check the test run
112112
if: |
@@ -115,7 +115,7 @@ jobs:
115115
run: |
116116
echo ::set-env name=TEST_RUN::true
117117
env:
118-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
118+
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
119119

120120
- name: Check for all the jobs are succeeded
121121
if: ${{ success() && env.TEST_RUN == 'true' }}
@@ -125,27 +125,27 @@ jobs:
125125
body: |
126126
**Test Result:** All tests are passed
127127
**Logs:** [${{ env.RUN_ID }}](https://github.com/litmuschaos/chaos-operator/actions/runs/${{ env.RUN_ID }})
128-
129-
reactions: hooray
130-
env:
128+
129+
reactions: hooray
130+
env:
131131
RUN_ID: ${{ github.run_id }}
132-
132+
133133
- name: Check for any job failed
134134
if: ${{ failure() }}
135135
uses: peter-evans/create-or-update-comment@v1
136136
with:
137137
comment-id: "${{ github.event.comment.id }}"
138138
body: |
139139
**Test Failed:** Some tests are failed please check
140-
**Logs:** [${{ env.RUN_ID }}](https://github.com/litmuschaos/chaos-operator/actions/runs/${{ env.RUN_ID }})
140+
**Logs:** [${{ env.RUN_ID }}](https://github.com/litmuschaos/chaos-operator/actions/runs/${{ env.RUN_ID }})
141141
reactions: confused
142-
env:
142+
env:
143143
RUN_ID: ${{ github.run_id }}
144-
144+
145145
- name: Deleting KinD cluster
146146
if: ${{ always() }}
147147
run: kind delete cluster
148-
148+
149149
- name: Check if any test ran or not
150150
if: env.TEST_RUN != 'true'
151151
uses: peter-evans/create-or-update-comment@v1
@@ -155,5 +155,5 @@ jobs:
155155
**Test Result:** No test found try /run-e2e-all
156156
**Logs:** [${{ env.RUN_ID }}](https://github.com/litmuschaos/chaos-operator/actions/runs/${{ env.RUN_ID }})
157157
reactions: eyes
158-
env:
158+
env:
159159
RUN_ID: ${{ github.run_id }}

.github/workflows/push.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
# Install golang
1414
- uses: actions/setup-go@v2
1515
with:
16-
go-version: 1.20.0
16+
go-version: 1.22
1717

1818
# Checkout to the latest commit
1919
# On specific directory/path
@@ -73,11 +73,11 @@ jobs:
7373
# Install golang
7474
- uses: actions/setup-go@v2
7575
with:
76-
go-version: 1.20.0
76+
go-version: 1.22
7777

7878
#Install and configure a kind cluster
7979
- name: Installing Prerequisites (K3S Cluster)
80-
env:
80+
env:
8181
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
8282
run: |
8383
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.20.14-rc1+k3s1 sh -s - --docker --write-kubeconfig-mode 664

.github/workflows/release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
# Install golang
1212
- uses: actions/setup-go@v2
1313
with:
14-
go-version: 1.20.0
14+
go-version: 1.22
1515

1616
# Checkout to the latest commit
1717
# On specific directory/path
@@ -86,11 +86,11 @@ jobs:
8686
# Install golang
8787
- uses: actions/setup-go@v2
8888
with:
89-
go-version: 1.20.0
89+
go-version: 1.22
9090

9191
#Install and configure a kind cluster
9292
- name: Installing Prerequisites (K3S Cluster)
93-
env:
93+
env:
9494
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
9595
run: |
9696
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.20.14-rc1+k3s1 sh -s - --docker --write-kubeconfig-mode 664

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/litmuschaos/chaos-operator
22

3-
go 1.20
3+
go 1.22
44

55
require (
66
cloud.google.com/go v0.81.0 // indirect

0 commit comments

Comments
 (0)