Skip to content

Commit ecd75a5

Browse files
Shubham ChaudharyuditgauravFrawless
authored
Cherry-Pick for 1.13.8 (#402)
* Chore(New_Exp): Add AWS SSM Chaos Experiment (#376) * Chore(New_Exp): Add aws ssm chaos experiment Signed-off-by: uditgaurav <[email protected]> * Chore(New_Exp): Add AWS SSM Chaos Experiment Signed-off-by: udit <[email protected]> * Add minor fix Signed-off-by: udit <[email protected]> * update ENV name for cpu and default docs path Signed-off-by: udit <[email protected]> * Chore(New_Exp): Add stress chaos experiments and split out the exec stress experiments (#368) * Rename pod-cpu-hog and pod-memory-hog experiment with pod-cpu-hog-exec and pod-memory-hog-exec respectively Signed-off-by: uditgaurav <[email protected]> * Add stress chaos without execing into the target container Signed-off-by: uditgaurav <[email protected]> * add helper logs Signed-off-by: uditgaurav <[email protected]> * update the abort logic Signed-off-by: udit <[email protected]> * refactor and update the code Signed-off-by: udit <[email protected]> * update Dockerfile Signed-off-by: udit <[email protected]> Co-authored-by: Shubham Chaudhary <[email protected]> * Chore(stress-chaos): Remove extra previlages and update io stressors and timeout (#391) * Chore(stress-chaos): Remove extra privileges and update io stressors and timeout Signed-off-by: udit <[email protected]> Co-authored-by: Shubham Chaudhary <[email protected]> * Add option to change default container registry for image build (#390) * Add option to change default container registry during image build Signed-off-by: Jakub Stejskal <[email protected]> * fix(ec2): removing the duplicate function calls (#393) Signed-off-by: shubhamchaudhary <[email protected]> * github actions(resolved conflicts) Signed-off-by: shubham chaudhary <[email protected]> * chore(nonchaos-pods): filter all the nonchaos-pods for target pod selection (#401) Signed-off-by: shubham chaudhary <[email protected]> Co-authored-by: Udit Gaurav <[email protected]> * fix(stress-chaos): fixing the stress chaos for abort cases and target details (#399) Signed-off-by: shubhamchaudhary <[email protected]> Co-authored-by: Udit Gaurav <[email protected]> Co-authored-by: Udit Gaurav <[email protected]> Co-authored-by: Jakub Stejskal <[email protected]>
1 parent 2fd1479 commit ecd75a5

File tree

72 files changed

+3273
-491
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+3273
-491
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,37 @@ on:
66
types: [opened, synchronize, reopened]
77

88
jobs:
9-
lint:
9+
pre-checks:
1010
runs-on: ubuntu-latest
1111
steps:
1212
# Install golang
1313
- uses: actions/setup-go@v2
1414
with:
15-
go-version: '^1.13.1'
15+
go-version: 1.16
1616

17-
# Setup gopath
18-
- name: Setting up GOPATH
19-
run: |
20-
echo "GOPATH=${GITHUB_WORKSPACE}/go" >> $GITHUB_ENV
21-
22-
# Checkout to the latest commit
23-
# On specific directory/path
2417
- uses: actions/checkout@v2
2518
with:
26-
path: go/src/github.com/${{github.repository}}
19+
ref: ${{ github.event.pull_request.head.sha }}
2720

2821
#TODO: Add Dockerfile linting
2922
# Running go-lint
3023
- name: Checking Go-Lint
3124
run : |
3225
sudo apt-get update && sudo apt-get install golint
33-
cd go/src/github.com/${{github.repository}}
3426
make gotasks
3527
3628
build:
29+
needs: pre-checks
3730
runs-on: ubuntu-latest
3831
steps:
39-
4032
# Install golang
4133
- uses: actions/setup-go@v2
4234
with:
43-
go-version: '^1.13.1'
35+
go-version: 1.16
4436

45-
# Setup gopath
46-
- name: Setting up GOPATH
47-
run: |
48-
echo "GOPATH=${GITHUB_WORKSPACE}/go" >> $GITHUB_ENV
49-
50-
# Checkout to the latest commit
51-
# On specific directory/path
5237
- uses: actions/checkout@v2
5338
with:
54-
path: go/src/github.com/${{github.repository}}
39+
ref: ${{ github.event.pull_request.head.sha }}
5540

5641
- name: Set up QEMU
5742
uses: docker/setup-qemu-action@v1
@@ -64,20 +49,29 @@ jobs:
6449
with:
6550
version: latest
6651

67-
- name: Build Docker Image
68-
env:
69-
DOCKER_REPO: litmuschaos
70-
DOCKER_IMAGE: go-runner
71-
DOCKER_TAG: ci
72-
run: |
73-
cd go/src/github.com/${{github.repository}}
74-
make build
52+
- name: Build and push
53+
uses: docker/build-push-action@v2
54+
with:
55+
push: false
56+
file: build/Dockerfile
57+
platforms: linux/amd64,linux/arm64
58+
tags: litmuschaos/go-runner:ci
7559

76-
trivy:
60+
trivy:
61+
needs: pre-checks
7762
runs-on: ubuntu-latest
7863
steps:
79-
- name: Checkout
80-
uses: actions/checkout@v2
64+
# Install golang
65+
- uses: actions/setup-go@v2
66+
with:
67+
go-version: 1.16
68+
69+
- uses: actions/checkout@v2
70+
with:
71+
ref: ${{ github.event.pull_request.head.sha }}
72+
73+
- name: Build image for trivy scan
74+
run: make build-amd64
8175

8276
- name: setup trivy
8377
run: |

.github/workflows/push.yml

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,33 @@ on:
66
- master
77
tags-ignore:
88
- '**'
9-
109
jobs:
11-
lint:
10+
pre-checks:
1211
runs-on: ubuntu-latest
1312
steps:
1413
# Install golang
1514
- uses: actions/setup-go@v2
1615
with:
17-
go-version: '^1.13.1'
18-
19-
# Setup gopath
20-
- name: Setting up GOPATH
21-
run: |
22-
echo "GOPATH=${GITHUB_WORKSPACE}/go" >> $GITHUB_ENV
23-
24-
# Checkout to the latest commit
25-
# On specific directory/path
16+
go-version: 1.16
2617
- uses: actions/checkout@v2
27-
with:
28-
path: go/src/github.com/${{github.repository}}
2918

3019
#TODO: Add Dockerfile linting
3120
# Running go-lint
3221
- name: Checking Go-Lint
3322
run : |
3423
sudo apt-get update && sudo apt-get install golint
35-
cd go/src/github.com/${{github.repository}}
3624
make gotasks
3725
3826
push:
27+
needs: pre-checks
3928
runs-on: ubuntu-latest
4029
steps:
4130

4231
# Install golang
4332
- uses: actions/setup-go@v2
4433
with:
45-
go-version: '^1.13.1'
46-
47-
# Setup gopath
48-
- name: Setting up GOPATH
49-
run: |
50-
echo "GOPATH=${GITHUB_WORKSPACE}/go" >> $GITHUB_ENV
51-
52-
# Checkout to the latest commit
53-
# On specific directory/path
34+
go-version: 1.16
5435
- uses: actions/checkout@v2
55-
with:
56-
path: go/src/github.com/${{github.repository}}
5736

5837
- name: Set up QEMU
5938
uses: docker/setup-qemu-action@v1
@@ -66,31 +45,32 @@ jobs:
6645
with:
6746
version: latest
6847

69-
- name: Build Docker Image
70-
env:
71-
DOCKER_REPO: litmuschaos
72-
DOCKER_IMAGE: go-runner
73-
DOCKER_TAG: ci
74-
run: |
75-
cd go/src/github.com/${{github.repository}}
76-
make experiment-build
48+
- name: Login to Docker Hub
49+
uses: docker/login-action@v1
50+
with:
51+
username: ${{ secrets.DNAME }}
52+
password: ${{ secrets.DPASS }}
7753

78-
- name: Push Docker Image
79-
env:
80-
DOCKER_REPO: litmuschaos
81-
DOCKER_IMAGE: go-runner
82-
DOCKER_TAG: ci
83-
DNAME: ${{ secrets.DNAME }}
84-
DPASS: ${{ secrets.DPASS }}
85-
run: |
86-
cd go/src/github.com/${{github.repository}}
87-
make push
54+
- name: Build and push
55+
uses: docker/build-push-action@v2
56+
with:
57+
push: true
58+
file: build/Dockerfile
59+
platforms: linux/amd64,linux/arm64
60+
tags: litmuschaos/go-runner:ci
8861

89-
trivy:
62+
trivy:
63+
needs: pre-checks
9064
runs-on: ubuntu-latest
9165
steps:
92-
- name: Checkout
93-
uses: actions/checkout@v2
66+
# Install golang
67+
- uses: actions/setup-go@v2
68+
with:
69+
go-version: 1.16
70+
- uses: actions/checkout@v2
71+
72+
- name: Build image for trivy scan
73+
run: make build-amd64
9474

9575
- name: setup trivy
9676
run: |

.github/workflows/release.yml

Lines changed: 28 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,30 @@ on:
66
- '**'
77

88
jobs:
9-
lint:
9+
pre-checks:
1010
runs-on: ubuntu-latest
1111
steps:
1212
# Install golang
1313
- uses: actions/setup-go@v2
1414
with:
15-
go-version: '^1.13.1'
16-
17-
# Setup gopath
18-
- name: Setting up GOPATH
19-
run: |
20-
echo "GOPATH=${GITHUB_WORKSPACE}/go" >> $GITHUB_ENV
21-
22-
# Checkout to the latest commit
23-
# On specific directory/path
15+
go-version: 1.16
2416
- uses: actions/checkout@v2
25-
with:
26-
path: go/src/github.com/${{github.repository}}
2717

2818
#TODO: Add Dockerfile linting
2919
# Running go-lint
3020
- name: Checking Go-Lint
3121
run : |
3222
sudo apt-get update && sudo apt-get install golint
33-
cd go/src/github.com/${{github.repository}}
3423
make gotasks
35-
3624
push:
25+
needs: pre-checks
3726
runs-on: ubuntu-latest
3827
steps:
39-
4028
# Install golang
4129
- uses: actions/setup-go@v2
4230
with:
43-
go-version: '^1.13.1'
44-
45-
# Setup gopath
46-
- name: Setting up GOPATH
47-
run: |
48-
echo "GOPATH=${GITHUB_WORKSPACE}/go" >> $GITHUB_ENV
49-
50-
# Checkout to the latest commit
51-
# On specific directory/path
31+
go-version: 1.16
5232
- uses: actions/checkout@v2
53-
with:
54-
path: go/src/github.com/${{github.repository}}
5533

5634
- name: Set Tag
5735
run: |
@@ -75,33 +53,34 @@ jobs:
7553
with:
7654
version: latest
7755

78-
- name: Build Docker Image
79-
env:
80-
DOCKER_REPO: litmuschaos
81-
DOCKER_IMAGE: go-runner
82-
DOCKER_TAG: ${RELEASE_TAG}
83-
DNAME: ${{ secrets.DNAME }}
84-
DPASS: ${{ secrets.DPASS }}
85-
run: |
86-
cd go/src/github.com/${{github.repository}}
87-
make experiment-build
56+
- name: Login to Docker Hub
57+
uses: docker/login-action@v1
58+
with:
59+
username: ${{ secrets.DNAME }}
60+
password: ${{ secrets.DPASS }}
8861

89-
- name: Push Docker Image
90-
env:
91-
DOCKER_REPO: litmuschaos
92-
DOCKER_IMAGE: go-runner
93-
DOCKER_TAG: ${RELEASE_TAG}
94-
DNAME: ${{ secrets.DNAME }}
95-
DPASS: ${{ secrets.DPASS }}
96-
run: |
97-
cd go/src/github.com/${{github.repository}}
98-
make push
62+
- name: Build and push
63+
uses: docker/build-push-action@v2
64+
env:
65+
RELEASE_TAG: ${{ env.RELEASE_TAG }}
66+
with:
67+
push: true
68+
file: build/Dockerfile
69+
platforms: linux/amd64,linux/arm64
70+
tags: litmuschaos/go-runner:${{ env.RELEASE_TAG }},litmuschaos/go-runner:latest
9971

100-
trivy:
72+
trivy:
73+
needs: pre-checks
10174
runs-on: ubuntu-latest
10275
steps:
103-
- name: Checkout
104-
uses: actions/checkout@v2
76+
# Install golang
77+
- uses: actions/setup-go@v2
78+
with:
79+
go-version: 1.16
80+
- uses: actions/checkout@v2
81+
82+
- name: Build image for trivy scan
83+
run: make build-amd64
10584

10685
- name: setup trivy
10786
run: |

0 commit comments

Comments
 (0)