This commit is contained in:
vcerenu
2022-06-13 15:27:23 -03:00
parent ecef793c7f
commit 672d1fc67a
2 changed files with 5 additions and 5 deletions

View File

@@ -109,7 +109,7 @@ jobs:
exit 1 exit 1
fi fi
status_index="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | wc -l`" status_index="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | wc -l`"
status_index_green="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | grep -E "green" | wc -l`" status_index_green="`curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s | grep "green" | wc -l`"
if [[ $status_index_green -eq $status_index ]]; then if [[ $status_index_green -eq $status_index ]]; then
curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s curl -XGET "https://0.0.0.0:9200/_cat/indices" -u admin:SecretPassword -k -s
else else
@@ -140,8 +140,8 @@ jobs:
- name: Check Wazuh templates - name: Check Wazuh templates
run: | run: |
qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -E "wazuh ||wazuh-agent||wazuh-statistics" | wc -l`" qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -P "wazuh|wazuh-agent|wazuh-statistics" | wc -l`"
templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -E "wazuh ||wazuh-agent||wazuh-statistics"`" templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep -P "wazuh|wazuh-agent|wazuh-statistics"`"
if [[ $qty_templates -eq 3 ]]; then if [[ $qty_templates -eq 3 ]]; then
echo "wazuh templates:" echo "wazuh templates:"
echo "${templates}" echo "${templates}"
@@ -266,7 +266,7 @@ jobs:
run: | run: |
qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh" | wc -l`" qty_templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh" | wc -l`"
templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh"`" templates="`curl -XGET "https://0.0.0.0:9200/_cat/templates" -u admin:SecretPassword -k -s | grep "wazuh"`"
if [[ $qty_templates -gt 0 ]]; then if [[ $qty_templates -eq 3 ]]; then
echo "wazuh templates:" echo "wazuh templates:"
echo "${templates}" echo "${templates}"
else else

View File

@@ -6,7 +6,7 @@ WAZUH_ACTUAL_VERSION=$(curl --silent https://api.github.com/repos/wazuh/wazuh/re
if [ "$WAZUH_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then if [ "$WAZUH_VERSION" -le "$WAZUH_ACTUAL_VERSION" ]; then
IMAGE_VERSION=${WAZUH_IMAGE_VERSION} IMAGE_VERSION=${WAZUH_IMAGE_VERSION}
else else
IMAGE_VERSION=${WAZUH_IMAGE_VERSION}-dev IMAGE_VERSION=${WAZUH_IMAGE_VERSION}
fi fi
echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > .env echo WAZUH_VERSION=$WAZUH_IMAGE_VERSION > .env