Deleted the offline_checkDependencies function and unified logic in offline_checkPrerequisites function #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Offline installation test | |
on: | |
pull_request: | |
paths: | |
- 'install_functions/wazuh-offline-download.sh' | |
- 'install_functions/wazuh-offline-installation.sh' | |
workflow_dispatch: | |
inputs: | |
WAZUH_INSTALLATION_ASSISTANT_REFERENCE: | |
description: "Branch or tag of the wazuh-installation-assistant repository." | |
required: true | |
default: 4.10.0 | |
jobs: | |
Build-wazuh-install-script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
cancel_others: 'true' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
skip_after_successful_duplicate: 'false' | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.WAZUH_INSTALLATION_ASSISTANT_REFERENCE }} | |
- name: Build wazuh-install script and use staging packages | |
run: bash builder.sh -i | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: script | |
path: ./wazuh-install.sh | |
if-no-files-found: error | |
Test-offline-installation-debian: | |
runs-on: ubuntu-latest | |
needs: Build-wazuh-install-script | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.WAZUH_INSTALLATION_ASSISTANT_REFERENCE }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: script | |
- name: Move installation assistant script | |
run: cp $GITHUB_WORKSPACE/wazuh-install.sh $GITHUB_WORKSPACE/.github/actions/offline-installation/wazuh-install.sh | |
- name: Run script | |
run: sudo bash $GITHUB_WORKSPACE/.github/actions/offline-installation/offline-installation.sh | |
Test-offline-installation-rpm: | |
runs-on: ubuntu-latest | |
needs: Build-wazuh-install-script | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ inputs.WAZUH_INSTALLATION_ASSISTANT_REFERENCE }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: script | |
- name: Move installation assistant script | |
run: cp $GITHUB_WORKSPACE/wazuh-install.sh $GITHUB_WORKSPACE/.github/actions/offline-installation/wazuh-install.sh | |
- name: Launch docker and run script | |
run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/offline-installation/:/tests centos:centos7 bash /tests/offline-installation.sh |