Skip to content

Update -d option in the password tool workflow and fix test scripts #12

Update -d option in the password tool workflow and fix test scripts

Update -d option in the password tool workflow and fix test scripts #12

Workflow file for this run

on:
pull_request:
paths:
- 'passwords_tool/**'
workflow_dispatch:
inputs:
WAZUH_INSTALLATION_ASSISTANT_REFERENCE:
description: "Branch or tag of the wazuh-installation-assistant repository."
required: true
default: 4.10.2
REPOSITORY:
description: "Repository to use for the installation."
type: choice
options:
- "pre-release"
- "staging"
required: true
default: "pre-release"
env:
REPOSITORY: ${{ github.event_name == 'pull_request' && 'pre-release' || inputs.REPOSITORY }}
jobs:
Build-password-tool-and-wazuh-install-scripts:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build password-tool and wazuh-install scripts
run: |
bash builder.sh -p
bash builder.sh -i
shell: bash
- uses: actions/upload-artifact@v3
with:
name: scripts
path: |
./wazuh-install.sh
./wazuh-passwords-tool.sh
if-no-files-found: error
test-password-tool-success:
runs-on: ubuntu-latest
needs: Build-password-tool-and-wazuh-install-scripts
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: scripts
- name: Install wazuh
run: |
sudo bash wazuh-install.sh -a -v -d ${{ env.REPOSITORY }}
- name: Uncompress wazuh install files
run: sudo tar -xvf wazuh-install-files.tar
- name: Run script
run: sudo bash .github/actions/passwords-tool/tests-stack-success.sh
test-password-tool-failure:
runs-on: ubuntu-latest
needs: Build-password-tool-and-wazuh-install-scripts
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: scripts
- name: Install wazuh
run: |
sudo bash wazuh-install.sh -a -v -d ${{ env.REPOSITORY }}
- name: Uncompress wazuh install files
run: sudo tar -xvf wazuh-install-files.tar
- name: Run script
run: sudo bash .github/actions/passwords-tool/tests-stack-failure.sh