Skip to content

Commit 66d0101

Browse files
authored
Fix pipeline issues (#694)
Fix pipeline issues --------- Signed-off-by: Udit Gaurav <[email protected]
1 parent a440615 commit 66d0101

File tree

7 files changed

+69
-238
lines changed

7 files changed

+69
-238
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ jobs:
8989
exit-code: '1'
9090
ignore-unfixed: true
9191
vuln-type: 'os,library'
92-
severity: 'CRITICAL,HIGH'
92+
severity: 'CRITICAL,HIGH'

.github/workflows/push.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,4 @@ jobs:
6969
push: true
7070
file: build/Dockerfile
7171
platforms: linux/amd64,linux/arm64
72-
tags: litmuschaos/go-runner:ci
72+
tags: litmuschaos/go-runner:ci

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ jobs:
6767
push: true
6868
file: build/Dockerfile
6969
platforms: linux/amd64,linux/arm64
70-
tags: litmuschaos/go-runner:${{ env.RELEASE_TAG }},litmuschaos/go-runner:latest
70+
tags: litmuschaos/go-runner:${{ env.RELEASE_TAG }},litmuschaos/go-runner:latest

.github/workflows/run-e2e-on-pr-commits.yml

+63-223
Original file line numberDiff line numberDiff line change
@@ -9,213 +9,13 @@ on:
99
- '**.yaml'
1010

1111
jobs:
12-
# Helm_Install_Generic_Tests:
13-
# runs-on: ubuntu-18.04
14-
# steps:
15-
16-
# - uses: actions/checkout@v2
17-
# with:
18-
# ref: ${{ github.event.pull_request.head.sha }}
19-
20-
# - name: Generate go binary and build docker image
21-
# run: make build-amd64
22-
23-
# #Install and configure a kind cluster
24-
# - name: Installing KinD cluster for the test
25-
# uses: engineerd/[email protected]
26-
# with:
27-
# version: "v0.7.0"
28-
# config: "build/kind-cluster/kind-config.yaml"
29-
30-
# - name: Configuring and testing the Installation
31-
# run: |
32-
# kubectl taint nodes kind-control-plane node-role.kubernetes.io/master-
33-
# kind get kubeconfig --internal >$HOME/.kube/config
34-
# kubectl cluster-info --context kind-kind
35-
# kubectl get nodes
36-
37-
# - name: Load docker image
38-
# run: /usr/local/bin/kind load docker-image litmuschaos/go-runner:ci
39-
40-
# - name: Deploy a sample application for chaos injection
41-
# run: |
42-
# kubectl apply -f https://raw.githubusercontent.com/litmuschaos/chaos-ci-lib/master/app/nginx.yml
43-
# kubectl wait --for=condition=Ready pods --all --namespace default --timeout=90s
44-
45-
# - name: Setting up kubeconfig ENV for Github Chaos Action
46-
# run: echo ::set-env name=KUBE_CONFIG_DATA::$(base64 -w 0 ~/.kube/config)
47-
# env:
48-
# ACTIONS_ALLOW_UNSECURE_COMMANDS: true
49-
50-
# - name: Setup Litmus
51-
# uses: litmuschaos/github-chaos-actions@master
52-
# env:
53-
# INSTALL_LITMUS: true
54-
55-
# - name: Running Litmus pod delete chaos experiment
56-
# if: always()
57-
# uses: litmuschaos/github-chaos-actions@master
58-
# env:
59-
# EXPERIMENT_NAME: pod-delete
60-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
61-
# EXPERIMENT_IMAGE_TAG: ci
62-
# IMAGE_PULL_POLICY: IfNotPresent
63-
# JOB_CLEANUP_POLICY: delete
64-
65-
# - name: Running container kill chaos experiment
66-
# if: always()
67-
# uses: litmuschaos/github-chaos-actions@master
68-
# env:
69-
# EXPERIMENT_NAME: container-kill
70-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
71-
# EXPERIMENT_IMAGE_TAG: ci
72-
# IMAGE_PULL_POLICY: IfNotPresent
73-
# JOB_CLEANUP_POLICY: delete
74-
# CONTAINER_RUNTIME: containerd
75-
76-
# - name: Running node-cpu-hog chaos experiment
77-
# if: always()
78-
# uses: litmuschaos/github-chaos-actions@master
79-
# env:
80-
# EXPERIMENT_NAME: node-cpu-hog
81-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
82-
# EXPERIMENT_IMAGE_TAG: ci
83-
# IMAGE_PULL_POLICY: IfNotPresent
84-
# JOB_CLEANUP_POLICY: delete
85-
86-
87-
# - name: Running node-memory-hog chaos experiment
88-
# if: always()
89-
# uses: litmuschaos/github-chaos-actions@master
90-
# env:
91-
# EXPERIMENT_NAME: node-memory-hog
92-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
93-
# EXPERIMENT_IMAGE_TAG: ci
94-
# IMAGE_PULL_POLICY: IfNotPresent
95-
# JOB_CLEANUP_POLICY: delete
96-
97-
# - name: Running pod-cpu-hog chaos experiment
98-
# if: always()
99-
# uses: litmuschaos/github-chaos-actions@master
100-
# env:
101-
# EXPERIMENT_NAME: pod-cpu-hog
102-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
103-
# EXPERIMENT_IMAGE_TAG: ci
104-
# IMAGE_PULL_POLICY: IfNotPresent
105-
# JOB_CLEANUP_POLICY: delete
106-
# TARGET_CONTAINER: nginx
107-
# TOTAL_CHAOS_DURATION: 60
108-
# CPU_CORES: 1
109-
110-
# - name: Running pod-memory-hog chaos experiment
111-
# if: always()
112-
# uses: litmuschaos/github-chaos-actions@master
113-
# env:
114-
# EXPERIMENT_NAME: pod-memory-hog
115-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
116-
# EXPERIMENT_IMAGE_TAG: ci
117-
# IMAGE_PULL_POLICY: IfNotPresent
118-
# JOB_CLEANUP_POLICY: delete
119-
# TARGET_CONTAINER: nginx
120-
# TOTAL_CHAOS_DURATION: 60
121-
# MEMORY_CONSUMPTION: 500
122-
123-
# - name: Running pod network corruption chaos experiment
124-
# if: always()
125-
# uses: litmuschaos/github-chaos-actions@master
126-
# env:
127-
# EXPERIMENT_NAME: pod-network-corruption
128-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
129-
# EXPERIMENT_IMAGE_TAG: ci
130-
# IMAGE_PULL_POLICY: IfNotPresent
131-
# JOB_CLEANUP_POLICY: delete
132-
# TARGET_CONTAINER: nginx
133-
# TOTAL_CHAOS_DURATION: 60
134-
# NETWORK_INTERFACE: eth0
135-
# CONTAINER_RUNTIME: containerd
136-
137-
# - name: Running pod network duplication chaos experiment
138-
# if: always()
139-
# uses: litmuschaos/github-chaos-actions@master
140-
# env:
141-
# EXPERIMENT_NAME: pod-network-duplication
142-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
143-
# EXPERIMENT_IMAGE_TAG: ci
144-
# IMAGE_PULL_POLICY: IfNotPresent
145-
# JOB_CLEANUP_POLICY: delete
146-
# TARGET_CONTAINER: nginx
147-
# TOTAL_CHAOS_DURATION: 60
148-
# NETWORK_INTERFACE: eth0
149-
# CONTAINER_RUNTIME: containerd
150-
151-
# - name: Running pod-network-latency chaos experiment
152-
# if: always()
153-
# uses: litmuschaos/github-chaos-actions@master
154-
# env:
155-
# EXPERIMENT_NAME: pod-network-latency
156-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
157-
# EXPERIMENT_IMAGE_TAG: ci
158-
# IMAGE_PULL_POLICY: IfNotPresent
159-
# JOB_CLEANUP_POLICY: delete
160-
# TARGET_CONTAINER: nginx
161-
# TOTAL_CHAOS_DURATION: 60
162-
# NETWORK_INTERFACE: eth0
163-
# NETWORK_LATENCY: 60000
164-
# CONTAINER_RUNTIME: containerd
165-
166-
# - name: Running pod-network-loss chaos experiment
167-
# if: always()
168-
# uses: litmuschaos/github-chaos-actions@master
169-
# env:
170-
# EXPERIMENT_NAME: pod-network-loss
171-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
172-
# EXPERIMENT_IMAGE_TAG: ci
173-
# IMAGE_PULL_POLICY: IfNotPresent
174-
# JOB_CLEANUP_POLICY: delete
175-
# TARGET_CONTAINER: nginx
176-
# TOTAL_CHAOS_DURATION: 60
177-
# NETWORK_INTERFACE: eth0
178-
# NETWORK_PACKET_LOSS_PERCENTAGE: 100
179-
# CONTAINER_RUNTIME: containerd
180-
181-
# - name: Running pod autoscaler chaos experiment
182-
# if: always()
183-
# uses: litmuschaos/github-chaos-actions@master
184-
# env:
185-
# EXPERIMENT_NAME: pod-autoscaler
186-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
187-
# EXPERIMENT_IMAGE_TAG: ci
188-
# IMAGE_PULL_POLICY: IfNotPresent
189-
# JOB_CLEANUP_POLICY: delete
190-
# TOTAL_CHAOS_DURATION: 60
191-
192-
# - name: Running node-io-stress chaos experiment
193-
# if: always()
194-
# uses: litmuschaos/github-chaos-actions@master
195-
# env:
196-
# EXPERIMENT_NAME: node-io-stress
197-
# EXPERIMENT_IMAGE: litmuschaos/go-runner
198-
# EXPERIMENT_IMAGE_TAG: ci
199-
# IMAGE_PULL_POLICY: IfNotPresent
200-
# JOB_CLEANUP_POLICY: delete
201-
# TOTAL_CHAOS_DURATION: 120
202-
# FILESYSTEM_UTILIZATION_PERCENTAGE: 10
203-
204-
# - name: Uninstall Litmus
205-
# uses: litmuschaos/github-chaos-actions@master
206-
# env:
207-
# LITMUS_CLEANUP: true
208-
209-
# - name: Deleting KinD cluster
210-
# if: always()
211-
# run: kind delete cluster
21212

21313
Pod_Level_In_Serial_Mode:
21414
runs-on: ubuntu-latest
21515
steps:
21616

21717
# Install golang
218-
- uses: actions/setup-go@v2
18+
- uses: actions/setup-go@v5
21919
with:
22020
go-version: 1.18
22121

@@ -226,15 +26,28 @@ jobs:
22626
- name: Generating Go binary and Building docker image
22727
run: |
22828
make build-amd64
229-
#Install and configure a kind cluster
230-
- name: Installing Prerequisites (K3S Cluster)
231-
env:
232-
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
29+
30+
- name: Install KinD
31+
run: |
32+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
33+
chmod +x ./kind
34+
mv ./kind /usr/local/bin/kind
35+
36+
- name: Create KinD Cluster
37+
run: |
38+
kind create cluster --config build/kind-cluster/kind-config.yaml
39+
40+
- name: Configuring and testing the Installation
23341
run: |
234-
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.11+k3s1 sh -s - --docker --write-kubeconfig-mode 664
42+
kubectl taint nodes kind-control-plane node-role.kubernetes.io/control-plane-
43+
kubectl cluster-info --context kind-kind
23544
kubectl wait node --all --for condition=ready --timeout=90s
23645
kubectl get nodes
237-
46+
47+
- name: Load image on the nodes of the cluster
48+
run: |
49+
kind load docker-image --name=kind litmuschaos/go-runner:ci
50+
23851
- uses: actions/checkout@v2
23952
with:
24053
repository: 'litmuschaos/litmus-e2e'
@@ -244,21 +57,22 @@ jobs:
24457
env:
24558
GO_EXPERIMENT_IMAGE: litmuschaos/go-runner:ci
24659
EXPERIMENT_IMAGE_PULL_POLICY: IfNotPresent
247-
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
60+
KUBECONFIG: /home/runner/.kube/config
24861
run: |
24962
make build-litmus
25063
make app-deploy
25164
make pod-affected-perc-ton-series
252-
- name: Deleting K3S cluster
65+
66+
- name: Deleting KinD cluster
25367
if: always()
254-
run: /usr/local/bin/k3s-uninstall.sh
68+
run: kind delete cluster
25569

25670
Pod_Level_In_Parallel_Mode:
25771
runs-on: ubuntu-latest
25872
steps:
25973

26074
# Install golang
261-
- uses: actions/setup-go@v2
75+
- uses: actions/setup-go@v5
26276
with:
26377
go-version: 1.18
26478

@@ -269,14 +83,30 @@ jobs:
26983
- name: Generating Go binary and Building docker image
27084
run: |
27185
make build-amd64
272-
#Install and configure a kind cluster
273-
- name: Installing Prerequisites (K3S Cluster)
274-
env:
275-
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
86+
87+
- name: Install KinD
88+
run: |
89+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
90+
chmod +x ./kind
91+
mv ./kind /usr/local/bin/kind
92+
93+
- name: Create KinD Cluster
94+
run: |
95+
kind create cluster --config build/kind-cluster/kind-config.yaml
96+
97+
- name: Configuring and testing the Installation
98+
env:
99+
KUBECONFIG: /home/runner/.kube/config
276100
run: |
277-
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=v1.21.11+k3s1 sh -s - --docker --write-kubeconfig-mode 664
101+
kubectl taint nodes kind-control-plane node-role.kubernetes.io/control-plane-
102+
kubectl cluster-info --context kind-kind
278103
kubectl wait node --all --for condition=ready --timeout=90s
279104
kubectl get nodes
105+
106+
- name: Load image on the nodes of the cluster
107+
run: |
108+
kind load docker-image --name=kind litmuschaos/go-runner:ci
109+
280110
- uses: actions/checkout@v2
281111
with:
282112
repository: 'litmuschaos/litmus-e2e'
@@ -286,21 +116,22 @@ jobs:
286116
env:
287117
GO_EXPERIMENT_IMAGE: litmuschaos/go-runner:ci
288118
EXPERIMENT_IMAGE_PULL_POLICY: IfNotPresent
289-
KUBECONFIG: /etc/rancher/k3s/k3s.yaml
119+
KUBECONFIG: /home/runner/.kube/config
290120
run: |
291121
make build-litmus
292122
make app-deploy
293123
make pod-affected-perc-ton-parallel
294-
- name: Deleting K3S cluster
124+
125+
- name: Deleting KinD cluster
295126
if: always()
296-
run: /usr/local/bin/k3s-uninstall.sh
127+
run: kind delete cluster
297128

298129
Node_Level_Tests:
299130
runs-on: ubuntu-latest
300131
steps:
301132

302133
# Install golang
303-
- uses: actions/setup-go@v2
134+
- uses: actions/setup-go@v5
304135
with:
305136
go-version: 1.18
306137

@@ -312,8 +143,15 @@ jobs:
312143
run: |
313144
make build-amd64
314145
146+
- name: Install KinD
147+
run: |
148+
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.22.0/kind-linux-amd64
149+
chmod +x ./kind
150+
mv ./kind /usr/local/bin/kind
151+
315152
- name: Create KinD Cluster
316-
run: kind create cluster --config build/kind-cluster/kind-config.yaml
153+
run: |
154+
kind create cluster --config build/kind-cluster/kind-config.yaml
317155
318156
- name: Configuring and testing the Installation
319157
run: |
@@ -324,7 +162,7 @@ jobs:
324162
325163
- name: Load image on the nodes of the cluster
326164
run: |
327-
kind load docker-image --name=kind litmuschaos/go-runner:ci
165+
kind load docker-image --name=kind litmuschaos/go-runner:ci
328166
329167
- uses: actions/checkout@v2
330168
with:
@@ -355,4 +193,6 @@ jobs:
355193

356194
- name: Deleting KinD cluster
357195
if: always()
358-
run: kind delete cluster
196+
run: |
197+
kubectl get nodes
198+
kind delete cluster

0 commit comments

Comments
 (0)