Skip to content

Commit

Permalink
Merge pull request #134 from wazuh/change/109-workflow-python-install…
Browse files Browse the repository at this point in the history
…-error

Add venv to installation assistant workflows
  • Loading branch information
c-bordon authored Nov 5, 2024
2 parents 8914899 + d2b9ac5 commit 76cf6aa
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 7 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/Test_installation_assistant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ permissions:

jobs:
run-test:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false # If a job fails, the rest of jobs will not be canceled
matrix:
Expand Down Expand Up @@ -118,9 +118,18 @@ jobs:
esac
COMPOSITE_NAME="${COMPOSITE_NAME/SUBNAME/$SUBNAME}"
echo "COMPOSITE_NAME=$COMPOSITE_NAME" >> $GITHUB_ENV
- name: Install python and create virtual environment
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-venv
python3 -m venv testing_venv
source testing_venv/bin/activate
python3 -m pip install --upgrade pip
echo PATH=$PATH >> $GITHUB_ENV
- name: Install Ansible
run: sudo apt-get update && sudo apt install -y python3 && python3 -m pip install --user ansible-core==2.16
run: pip install ansible-core==2.16

- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -209,4 +218,3 @@ jobs:
- name: Delete allocated VM
if: always() && steps.allocator_instance.outcome == 'success' && inputs.DESTROY == true
run: python3 wazuh-automation/deployability/modules/allocation/main.py --action delete --track-output $ALLOCATOR_PATH/track.yml

17 changes: 14 additions & 3 deletions .github/workflows/Test_installation_assistant_distributed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ permissions:

jobs:
run-test:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false # If a job fails, the rest of jobs will not be canceled
matrix:
Expand Down Expand Up @@ -121,8 +121,20 @@ jobs:
COMPOSITE_NAME="${COMPOSITE_NAME/SUBNAME/$SUBNAME}"
echo "COMPOSITE_NAME=$COMPOSITE_NAME" >> $GITHUB_ENV
- name: Install python and create virtual environment
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-venv
python3 -m venv testing_venv
source testing_venv/bin/activate
python3 -m pip install --upgrade pip
echo PATH=$PATH >> $GITHUB_ENV
- name: Install Ansible
run: sudo apt-get update && sudo apt install -y python3 && python3 -m pip install --user ansible-core==2.16 && pip install pyyaml && ansible-galaxy collection install community.general
run: |
pip install ansible-core==2.16
pip install pyyaml
ansible-galaxy collection install community.general
- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -320,4 +332,3 @@ jobs:
# Wait for all deletion tasks to complete
wait
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ All notable changes to this project will be documented in this file.

### Changed

- None
- Add venv to installation assistant workflows ([#134](https://github.com/wazuh/wazuh-installation-assistant/pull/134))

### Fixed

Expand Down

0 comments on commit 76cf6aa

Please sign in to comment.