Skip to content

Commit

Permalink
Merge branch 'master' into litmus-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ispeakc0de authored Jan 17, 2025
2 parents e973a98 + 8246ff8 commit 0f14037
Show file tree
Hide file tree
Showing 165 changed files with 2,616 additions and 1,372 deletions.
34 changes: 20 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,12 @@ jobs:
# Install golang
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: '1.20'

- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}

#TODO: Add Dockerfile linting
# Running go-lint
- name: Checking Go-Lint
run : |
sudo apt-get update && sudo apt-get install golint
make gotasks
- name: gofmt check
run: |
if [ "$(gofmt -s -l . | wc -l)" -ne 0 ]
Expand All @@ -33,9 +26,21 @@ jobs:
gofmt -s -l .
exit 1
fi
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
uses: reviewdog/action-golangci-lint@v1

gitleaks-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run GitLeaks
run: |
wget https://github.com/gitleaks/gitleaks/releases/download/v8.18.2/gitleaks_8.18.2_linux_x64.tar.gz && \
tar -zxvf gitleaks_8.18.2_linux_x64.tar.gz && \
sudo mv gitleaks /usr/local/bin && gitleaks detect --source . -v
build:
needs: pre-checks
Expand All @@ -44,7 +49,7 @@ jobs:
# Install golang
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: '1.20'

- uses: actions/checkout@v2
with:
Expand All @@ -68,6 +73,7 @@ jobs:
file: build/Dockerfile
platforms: linux/amd64,linux/arm64
tags: litmuschaos/go-runner:ci
build-args: LITMUS_VERSION=3.10.0

trivy:
needs: pre-checks
Expand All @@ -79,8 +85,8 @@ jobs:

- name: Build an image from Dockerfile
run: |
docker build -f build/Dockerfile -t docker.io/litmuschaos/go-runner:${{ github.sha }} . --build-arg TARGETARCH=amd64
docker build -f build/Dockerfile -t docker.io/litmuschaos/go-runner:${{ github.sha }} . --build-arg TARGETARCH=amd64 --build-arg LITMUS_VERSION=3.10.0
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
Expand All @@ -89,4 +95,4 @@ jobs:
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
severity: 'CRITICAL,HIGH'
16 changes: 5 additions & 11 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,9 @@ jobs:
# Install golang
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: '1.20'
- uses: actions/checkout@v2

#TODO: Add Dockerfile linting
# Running go-lint
- name: Checking Go-Lint
run : |
sudo apt-get update && sudo apt-get install golint
make gotasks
- name: gofmt check
run: |
if [ "$(gofmt -s -l . | wc -l)" -ne 0 ]
Expand All @@ -31,9 +24,9 @@ jobs:
gofmt -s -l .
exit 1
fi
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
uses: reviewdog/action-golangci-lint@v1

push:
needs: pre-checks
Expand All @@ -43,7 +36,7 @@ jobs:
# Install golang
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: '1.20'
- uses: actions/checkout@v2

- name: Set up QEMU
Expand All @@ -70,3 +63,4 @@ jobs:
file: build/Dockerfile
platforms: linux/amd64,linux/arm64
tags: litmuschaos/go-runner:ci
build-args: LITMUS_VERSION=3.10.0
11 changes: 3 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,17 @@ jobs:
# Install golang
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: '1.20'
- uses: actions/checkout@v2

#TODO: Add Dockerfile linting
# Running go-lint
- name: Checking Go-Lint
run : |
sudo apt-get update && sudo apt-get install golint
make gotasks
push:
needs: pre-checks
runs-on: ubuntu-latest
steps:
# Install golang
- uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: '1.20'
- uses: actions/checkout@v2

- name: Set Tag
Expand Down Expand Up @@ -68,3 +62,4 @@ jobs:
file: build/Dockerfile
platforms: linux/amd64,linux/arm64
tags: litmuschaos/go-runner:${{ env.RELEASE_TAG }},litmuschaos/go-runner:latest
build-args: LITMUS_VERSION=3.10.0
Loading

0 comments on commit 0f14037

Please sign in to comment.