mirror of
https://github.com/wazuh/wazuh-docker.git
synced 2025-10-23 04:51:57 +00:00
test CI
This commit is contained in:
22
.github/workflows/push.yml
vendored
22
.github/workflows/push.yml
vendored
@@ -48,6 +48,16 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check documents into wazuh-alerts index
|
||||
run: |
|
||||
docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k | jq -r ".hits.total.value"`"
|
||||
if [[ $docs -gt 0 ]]; then
|
||||
echo "wazuh-alerts index documents: ${docs}"
|
||||
else
|
||||
echo "wazuh-alerts index documents: ${docs}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check Wazuh manager start
|
||||
run: |
|
||||
curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}"
|
||||
@@ -88,8 +98,17 @@ jobs:
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check documents into wazuh-alerts index
|
||||
run: |
|
||||
docs="`curl -XGET "https://0.0.0.0:9200/wazuh-alerts*/_doc/_search" -u admin:SecretPassword -k | jq -r ".hits.total.value"`"
|
||||
if [[ $docs -gt 0 ]]; then
|
||||
echo "wazuh-alerts index documents: ${docs}"
|
||||
else
|
||||
echo "wazuh-alerts index documents: ${docs}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check Wazuh manager start
|
||||
# uses: sergeysova/jq-action@v2
|
||||
run: |
|
||||
nodes=$(curl -k -X GET "https://0.0.0.0:55000/cluster/nodes" -H "Authorization: Bearer ${{env.TOKEN}}" | jq -r ".data.affected_items[].name" | wc -l)
|
||||
if [[ $nodes -eq 2 ]]; then
|
||||
@@ -101,7 +120,6 @@ jobs:
|
||||
env:
|
||||
TOKEN: $(curl -u wazuh-wui:MyS3cr37P450r.*- -k -X GET "https://0.0.0.0:55000/security/user/authenticate?raw=true")
|
||||
|
||||
|
||||
- name: Check Wazuh dashboard service URL
|
||||
run: |
|
||||
status=$(curl -XGET --silent https://0.0.0.0:443/app/status -k -u admin:SecretPassword -I | grep -E "^HTTP" | awk '{print $2}')
|
||||
|
Reference in New Issue
Block a user