forked from elastic/cloudbeat
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (59 loc) · 1.75 KB
/
cnvm-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: CNVM-CI
on:
pull_request_target:
branches:
- main
- "[0-9]+.[0-9]+"
types: [opened, synchronize, reopened]
jobs:
Run-CNVM-Tests:
name: CNVM integration test
runs-on: ubuntu-22.04
timeout-minutes: 40
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Init Hermit
run: ./bin/hermit env -r >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
poetry --version
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: 'us-east-2'
- name: Build cloudbeat binary
uses: magefile/mage-action@v2
with:
version: latest
args: build
- name: Run Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 8.8.0
security-enabled: false
- name: Run cloudbeat CNVM in background
env:
ES_HOST: http://localhost:9200
ES_USERNAME: elastic
ES_PASSWORD: changeme
run: |
./cloudbeat -c deploy/vulnerability/cloudbeat-vuln-mgmt.yml -d '*' &
- name: Check for vulnerabilities
working-directory: ./tests
env:
USE_K8S: false
run: |
poetry install
poetry run pytest -k "cnvm"
- name: Print cloudbeat logs
if: always()
run: |
cat logs/cloudbeat*