diff --git a/.github/workflows/builder_OVA.yaml b/.github/workflows/builder_OVA.yaml index 8ad5962..2a68473 100644 --- a/.github/workflows/builder_OVA.yaml +++ b/.github/workflows/builder_OVA.yaml @@ -82,7 +82,7 @@ permissions: jobs: build_and_run: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Install Ansible run: sudo apt-get update && sudo apt install -y python3 jq sshpass && python3 -m pip install --user ansible-core==2.16 && pip install pyyaml && ansible-galaxy collection install community.general @@ -102,7 +102,7 @@ jobs: if [ ${{ inputs.is_stage }} == false ]; then FILENAME="${FILENAME}-${COMMIT_SHA}" fi - + echo "FILENAME=$FILENAME" >> $GITHUB_ENV FILENAME_OVA="${FILENAME}.ova" echo "FILENAME_OVA=$FILENAME_OVA" >> $GITHUB_ENV diff --git a/.github/workflows/packages_builder_ami.yaml b/.github/workflows/packages_builder_ami.yaml index e62220b..b95693f 100644 --- a/.github/workflows/packages_builder_ami.yaml +++ b/.github/workflows/packages_builder_ami.yaml @@ -58,7 +58,7 @@ permissions: jobs: Build_AMI: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: View parameters run: echo "${{ toJson(inputs) }}" @@ -73,7 +73,7 @@ jobs: with: role-to-assume: ${{ secrets.AWS_IAM_OVA_ROLE }} aws-region: us-east-1 - + - name: Get Wazuh version run: | WAZUH_VERSION=$(cat VERSION) @@ -81,7 +81,7 @@ jobs: - name: Install Ansible run: sudo apt-get update && sudo apt install -y python3 && python3 -m pip install --user ansible-core==2.16 - + - name: Ansible version run: ansible --version @@ -113,7 +113,7 @@ jobs: echo "::add-mask::$ansible_ssh_common_args" echo "::add-mask::$identifier" cat "${{ env.ALLOCATOR_PATH }}/inventory_mod.yml" >> $GITHUB_ENV; - + - name: Generate inventory run: | echo "[gha_instance]" > ${{ env.ALLOCATOR_PATH }}/inventory_ansible.ini @@ -138,7 +138,7 @@ jobs: while [ $ELAPSED -lt $TIMEOUT ]; do STATUS=$(aws ec2 describe-instances --instance-ids ${{ env.identifier }} --query 'Reservations[*].Instances[*].State.Name' --output text) echo "Instance status: $STATUS" - + if [ "$STATUS" == "stopped" ]; then echo "Instance is stopped." break @@ -162,18 +162,18 @@ jobs: AMI_ID=$(aws ec2 describe-images --filters "Name=name,Values=$AMI_NAME" --query 'Images[*].ImageId' --output text) echo "AMI_ID=$AMI_ID" >> $GITHUB_ENV echo "AMI creation started with name $AMI_NAME" - + - name: Check AMI status until available id: check_ami_status run: | TIMEOUT=1800 INTERVAL=30 ELAPSED=0 - + while [ $ELAPSED -lt $TIMEOUT ]; do STATUS=$(aws ec2 describe-images --image-ids ${{ env.AMI_ID }} --query 'Images[*].State' --output text) echo "AMI status: $STATUS" - + if [ "$STATUS" == "available" ]; then echo "AMI is available." break @@ -197,10 +197,10 @@ jobs: - name: Delete allocated VM if: always() && steps.alloc_vm_ami.outcome == 'success' && inputs.DESTROY == true run: python3 wazuh-automation/deployability/modules/allocation/main.py --action delete --track-output ${{ env.ALLOCATOR_PATH }}/track.yml - + - name: Compress Allocator directory id: generate_artifacts - if: always() && steps.alloc_vm_ami.outcome == 'success' && inputs.DESTROY == false + if: always() && steps.alloc_vm_ami.outcome == 'success' && inputs.DESTROY == false run: zip -P "${{ secrets.ZIP_ARTIFACTS_PASSWORD }}" -r ${{ env.ALLOCATOR_PATH }}.zip ${{ env.ALLOCATOR_PATH }} continue-on-error: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 784839b..689942c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,8 @@ All notable changes to this project will be documented in this file. ### Fixed -- Deleted dashboard logs cleanup in OVA local build([#57](https://github.com/wazuh/wazuh-virtual-machines/pull/57)) +- Changed GitHub Runner version to fix Python error ([#82](https://github.com/wazuh/wazuh-virtual-machines/pull/82)) +- Deleted dashboard logs cleanup in OVA local build ([#57](https://github.com/wazuh/wazuh-virtual-machines/pull/57)) - Fix typos and add news inputs in the AMI workflow header ([#35](https://github.com/wazuh/wazuh-virtual-machines/pull/35)) ### Deleted