forked from wazuh/wazuh-docker
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Wazuh Docker pipeline
|
|
|
|
on: [pull_request, push]
|
|
|
|
jobs:
|
|
build-stack:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build the docker-compose stack
|
|
run: ./build.sh
|
|
|
|
- name: Create enviroment variables
|
|
run: cat .env > $GITHUB_ENV
|
|
|
|
- name: Install Goss
|
|
uses: e1himself/goss-installation-action@v1.0.3
|
|
with:
|
|
version: v0.3.16
|
|
|
|
- name: Execute Goss tests (wazuh-manager)
|
|
run: dgoss run wazuh/wazuh-manager:${{env.WAZUH_IMAGE_VERSION}}
|
|
env:
|
|
GOSS_SLEEP: 30
|
|
GOSS_FILE: .github/.goss.yaml
|
|
|
|
- name: Create single node certficates
|
|
run: docker-compose -f single-node/generate-indexer-certs.yml run --rm generator
|
|
|
|
- name: Start single node stack
|
|
run: docker-compose -f single-node/docker-compose.yml up -d
|
|
|
|
- name: Sleep for 60 seconds
|
|
uses: jakejarvis/wait-action@master
|
|
with:
|
|
time: '60s'
|
|
|
|
- name: Check Wazuh indexer start
|
|
run: curl -XGET https://0.0.0.0:9200/_cluster/health -u admin:SecretPassword -k
|
|
|
|
- name: Check Wazuh indexer start
|
|
run: |
|
|
TOKEN=$(curl -u $API_USER:$API_PASSWORD -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true")
|
|
curl -k -X GET "https://0.0.0.0:55000/agents/outdated?pretty=true" -H "Authorization: Bearer $TOKEN" |