From 93aaff79b0a15420f82fe0a8e26e01516de990ad Mon Sep 17 00:00:00 2001 From: Victor Carlos Erenu Date: Thu, 18 Dec 2025 23:12:25 +0700 Subject: [PATCH] Fix variables and multi node deployment --- .github/workflows/push.yml | 104 ++++++++++++++++++++++--------------- 1 file changed, 63 insertions(+), 41 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index de584138..41587ca1 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -46,6 +46,9 @@ jobs: Execute-Goss-tests: needs: [prepare-variables, build-images] runs-on: ubuntu-22.04 + env: + WAZUH_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.WAZUH_IMAGE_VERSION }} + WAZUH_REGISTRY: ${{ needs.prepare-variables.outputs.WAZUH_REGISTRY }} steps: - name: Install Goss @@ -54,7 +57,7 @@ jobs: version: v0.3.16 - name: Execute Goss tests (wazuh-manager) - run: dgoss run ${{needs.prepare-variables.outputs.WAZUH_REGISTRY}}/wazuh/wazuh-manager:${{needs.prepare-variables.outputs.WAZUH_IMAGE_VERSION}} + run: dgoss run ${{ env.WAZUH_REGISTRY }}/wazuh/wazuh-manager:${{ env.WAZUH_IMAGE_VERSION }} env: GOSS_SLEEP: 30 GOSS_FILE: .github/.goss.yaml @@ -62,6 +65,10 @@ jobs: check-single-node: runs-on: ubuntu-22.04 needs: [prepare-variables, build-images] + env: + WAZUH_IMAGE_VERSION: ${{ needs.prepare-variables.outputs.WAZUH_IMAGE_VERSION }} + WAZUH_MINOR_VERSION: ${{ needs.prepare-variables.outputs.WAZUH_MINOR_VERSION }} + WAZUH_REGISTRY: ${{ needs.prepare-variables.outputs.WAZUH_REGISTRY }} steps: - name: Check out code @@ -69,7 +76,7 @@ jobs: - name: Create single node certficates run: | - curl -sO https://packages.wazuh.com/${{needs.prepare-variables.outputs.WAZUH_IMAGE_VERSION}}/wazuh-certs-tool.sh + curl -sO https://packages.wazuh.com/${{ env.WAZUH_MINOR_VERSION }}/wazuh-certs-tool.sh cat > config.yml < $GITHUB_ENV - - name: free disk space uses: ./.github/free-disk-space - - name: Retrieve saved Wazuh dashboard Docker image - uses: actions/download-artifact@v4 - with: - name: docker-artifact-dashboard - - - name: Retrieve saved Wazuh manager Docker image - uses: actions/download-artifact@v4 - with: - name: docker-artifact-manager - - - name: Retrieve saved Wazuh indexer Docker image - uses: actions/download-artifact@v4 - with: - name: docker-artifact-indexer - - - name: Retrieve saved Wazuh agent Docker image - uses: actions/download-artifact@v4 - with: - name: docker-artifact-agent - - - name: Docker load - run: | - docker load --input ./wazuh-manager.tar - docker load --input ./wazuh-indexer.tar - docker load --input ./wazuh-dashboard.tar - docker load --input ./wazuh-agent.tar - rm -rf wazuh-manager.tar wazuh-indexer.tar wazuh-dashboard.tar wazuh-agent.tar - - name: Create multi node certficates - run: docker compose -f multi-node/generate-indexer-certs.yml run --rm generator + run: | + curl -sO https://packages.wazuh.com/${{ env.WAZUH_MINOR_VERSION }}/wazuh-certs-tool.sh + cat > config.yml <