Skip to content

Commit

Permalink
Try with v3 version to set aws credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
fcaffieri committed Dec 23, 2024
1 parent 933a6e7 commit e0d25eb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/offline-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ env:
AUTOMATION_REFERENCE: ${{ github.event_name == 'pull_request' && '4.10.2' || inputs.AUTOMATION_REFERENCE }}
WAZUH_VERSION: "4.10"
PKG_REPOSITORY: ${{ github.event_name == 'pull_request' && 'pre-release' || inputs.PKG_REPOSITORY }}
AWS_ACCOUNT: "wazuh-dev"
#AWS_ACCOUNT: "wazuh-dev"
VERBOSITY: ${{ github.event_name == 'pull_request' && '-v' || inputs.VERBOSITY }}
COMPOSITE_NAME: "linux-SUBNAME-amd64"
REGION: "us-east-1"
Expand Down Expand Up @@ -112,7 +112,7 @@ 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
Expand All @@ -124,21 +124,21 @@ jobs:
- name: Install Ansible
run: pip install ansible-core==2.16

- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v4
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_IAM_ROLE }}
aws-region: ${{ env.REGION }}

- name: Checkout wazuh/wazuh-automation repository
uses: actions/checkout@v4
with:
repository: wazuh/wazuh-automation
ref: ${{ env.AUTOMATION_REFERENCE }}
token: ${{ secrets.GH_CLONE_TOKEN }}
path: wazuh-automation

- name: Install and set allocator requirements
run: pip3 install -r wazuh-automation/deployability/deps/requirements.txt

Expand All @@ -147,7 +147,7 @@ jobs:
run: |
python3 wazuh-automation/deployability/modules/allocation/main.py --action create --provider aws --size large --composite-name ${{ env.COMPOSITE_NAME }} --working-dir $ALLOCATOR_PATH \
--track-output $ALLOCATOR_PATH/track.yml --inventory-output $ALLOCATOR_PATH/inventory.yml --instance-name gha_${{ github.run_id }}_assistant_test \
--label-team devops --label-termination-date 1d --aws-account ${{ env.AWS_ACCOUNT }}
--label-team devops --label-termination-date 1d
sed 's/: */=/g' $ALLOCATOR_PATH/inventory.yml > $ALLOCATOR_PATH/inventory_mod.yml
sed -i 's/-o StrictHostKeyChecking=no/\"-o StrictHostKeyChecking=no\"/g' $ALLOCATOR_PATH/inventory_mod.yml
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
-e "pkg_repository=$PKG_REPOSITORY" \
-e "wazuh_version=$WAZUH_VERSION" \
"$VERBOSITY"
- name: Compress Allocator VM directory
id: compress_allocator_files
if: always() && steps.allocator_instance.outcome == 'success' && inputs.DESTROY == false && github.event_name != 'pull_request'
Expand Down

0 comments on commit e0d25eb

Please sign in to comment.