+
Skip to content

Test action demo #4

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

Merged
merged 44 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
e06d31f
feat(report): update code
rajaSahil Jun 21, 2023
0fdbde4
feat(report): update code
rajaSahil Jun 21, 2023
50c9efb
feat(action): add github action
rajaSahil Jun 22, 2023
ed7537f
feat(action): add github action
rajaSahil Jun 22, 2023
47dd6b6
feat(action): add github action
rajaSahil Jun 22, 2023
6c4ba1c
feat(action): add github action
rajaSahil Jun 22, 2023
cb4b8e1
feat(action): add github action
rajaSahil Jun 22, 2023
91cc7f2
feat(action): add github action
rajaSahil Jun 23, 2023
784d569
feat(action): add github action
rajaSahil Jun 28, 2023
7de188c
feat(action): add github action
rajaSahil Jun 28, 2023
782112c
feat(report): update report
rajaSahil Jul 5, 2023
2da2d4a
feat(actions): add action
rajaSahil Jul 5, 2023
9a8d73d
feat(actions): add action
rajaSahil Jul 5, 2023
2816780
feat(actions): add action
rajaSahil Jul 5, 2023
9f7f4aa
feat(actions): add action
rajaSahil Jul 5, 2023
2bf6e2f
feat(actions): add action
rajaSahil Jul 5, 2023
e4aecd2
feat(actions): add action
rajaSahil Jul 5, 2023
dd0baf8
feat(actions): add action
rajaSahil Jul 5, 2023
600147c
feat(actions): add action
rajaSahil Jul 5, 2023
021656b
feat(actions): add action
rajaSahil Jul 5, 2023
e4e6841
feat(actions): add action
rajaSahil Jul 5, 2023
6b04bcc
feat(actions): add action
rajaSahil Jul 5, 2023
9401720
feat(actions): add action
rajaSahil Jul 5, 2023
5f31c2a
feat(actions): add action
rajaSahil Jul 5, 2023
b142558
feat(actions): add action
rajaSahil Jul 5, 2023
c2c931d
feat(actions): add action
rajaSahil Jul 5, 2023
7eae147
feat(actions): add action
rajaSahil Jul 5, 2023
b809162
feat(actions): add action
rajaSahil Jul 5, 2023
6db5698
feat(actions): add action
rajaSahil Jul 5, 2023
60006a2
feat(actions): add action
rajaSahil Jul 5, 2023
8f7d013
feat(actions): add action
rajaSahil Jul 5, 2023
926b62b
feat(actions): add action
rajaSahil Jul 5, 2023
c122914
feat(actions): add action
rajaSahil Jul 6, 2023
40a4309
feat(actions): add action
rajaSahil Jul 6, 2023
47a1c69
feat(actions): add action
rajaSahil Jul 6, 2023
5b479ca
feat(actions): add action
rajaSahil Jul 6, 2023
b9fd44c
feat(actions): add action
rajaSahil Jul 6, 2023
16130ea
feat(actions): add action
rajaSahil Jul 6, 2023
b817eea
feat(actions): add action
rajaSahil Jul 6, 2023
83c5b78
feat(actions): add action
rajaSahil Jul 6, 2023
795c9dd
feat(actions): add action
rajaSahil Jul 6, 2023
0ec4f69
feat(actions): add action
rajaSahil Jul 6, 2023
c353dfe
feat(actions): add action
rajaSahil Jul 6, 2023
75e2769
feat(report): update code
rajaSahil Jul 25, 2023
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
78 changes: 69 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,56 @@ on:
jobs:
Tests:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:

- name: Checkout repo
uses: actions/checkout@v3
with:
submodules: true

- name: Installing Prerequisites (Kind Cluster)
uses: helm/kind-action@v1.4.0
# - name: Installing Prerequisites (Kind Cluster)
# uses: helm/kind-action@v1.4.0

- name: Checkout kubearmor repo
uses: actions/checkout@v3
with:
repository: kubearmor/KubeArmor
ref: main
path: Kubearmor

- name: Checkout Discovery engine repo
uses: actions/checkout@v3
with:
repository: accuknox/discovery-engine
ref: dev
path: discovery-engine

- uses: actions/setup-go@v3
with:
go-version: "v1.20"

# - name: Install the latest LLVM toolchain
# run: ./Kubearmor/.github/workflows/install-llvm.sh
#
# - name: Compile libbpf
# run: |
# ls
# cd Kubearmor
# ls
# cd KubeArmor/BPF
# git submodule update --init --recursive
# ls
# make -C libbpf/src

- name: Setup a Kubernetes environment
run: ./Kubearmor/contribution/k3s/install_k3s.sh

- name: Configuring and testing the Installation for cluster
run: |
kubectl cluster-info --context kind-chart-testing
kubectl wait --for=condition=Ready nodes --all --timeout=120s
sudo apt install socat

- name: Checkout accuknox-cli repo
uses: actions/checkout@v3
Expand All @@ -35,10 +71,14 @@ jobs:
- name: Install accuknox-cli, kubearmor and discovery engine
run: |
cd accuknox-cli
make install
./accuknox-cli version
./accuknox-cli install
kubectl wait --for=condition=Ready pods --all -n accuknox-agents --timeout=120s
kubectl get pods -A
sleep 100
kubectl get pods -A

# kubectl describe -f $(kubectl get pods -l app=discovery-engine -A -o jsonpath='{.items[0].metadata.name}') -n accuknox-agents


- name: Deploy test application
run: |
Expand All @@ -54,14 +94,35 @@ jobs:
helm repo update
helm install kps prometheus-community/kube-prometheus-stack

# - name: Test KubeArmor using Ginkgo
# run: |
# cd Kubearmor
# go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
# make -C tests/
# timeout-minutes: 30

# - name: Test Discovery engine using Ginkgo
# run: |
# curl -sfL http://get.kubearmor.io/ | sudo sh -s -- -b /usr/local/bin
# cd discovery-engine/tests
# go mod tidy
# go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo
# ginkgo -r
# timeout-minutes: 30

- name: Generate report
run: |
sleep 200s
kubectl get pods -A
sleep 200
kubectl get pods -A
mkdir downloads
touch table
./accuknox-cli/accuknox-cli report > downloads/table
./accuknox-cli/accuknox-cli report -b "baseline/report.json" > downloads/table
cat downloads/table
mv /tmp/report-*.json downloads/report.json
mv /tmp/diff-report-*.json downloads/diff-report.json
mv /tmp/diff-report-*.md downloads/diff-report.md


- name: Upload artifects
uses: actions/upload-artifact@v2
Expand All @@ -72,5 +133,4 @@ jobs:
- name: PR comment with file
uses: thollander/actions-comment-pull-request@v2
with:
filePath: downloads/table

filePath: downloads/diff-report.md
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载