Skip to content

Commit

Permalink
Moved variables to env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcr01 committed Aug 29, 2024
1 parent eae9a6c commit 529489b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/Test_installation_assistant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ env:
COMPOSITE_NAME: "linux-SUBNAME-amd64"
SESSION_NAME: "Installation-Assistant-Test"
REGION: "us-east-1"
TMP_PATH: "/tmp/test"
LOGS_PATH: "/home/assistant_logs"
PKG_REPOSITORY: "${{ inputs.REPOSITORY }}"
REFERENCE: "${{ github.ref_name }}"
TEST_NAME: "test_assistant"
REPOSITORY_URL: "${{ github.server_url }}${{ github.repository_owner }}/${{ github.repository }}.git"

permissions:
id-token: write # This is required for requesting the JWT
Expand Down Expand Up @@ -152,23 +158,18 @@ jobs:
INSTALL_PYTHON=true
INSTALL_PIP_DEPS=true
REPOSITORY_URL="https://github.com/wazuh/wazuh-installation-assistant.git"
PACKAGES_REFERENCE="${{ github.ref_name }}"
TMP_PATH="/tmp/test"
PKG_REPOSITORY="${{ inputs.REPOSITORY }}"
ansible-playbook .github/workflows/ansible-playbooks/provision.yml \
-i /tmp/allocator_instance/inventory \
-l all \
-e "repository=$REPOSITORY_URL" \
-e "packages_reference=$PACKAGES_REFERENCE" \
-e "reference=$REFERENCE" \
-e "tmp_path=$TMP_PATH" \
-e "pkg_repository=$PKG_REPOSITORY" \
-e "install_deps=$INSTALL_DEPS" \
-e "install_python=$INSTALL_PYTHON" \
-e "install_pip_deps=$INSTALL_PIP_DEPS" \
-v
- name: Delete allocated VM
if: always() && steps.allocator_instance.outcome == 'success'
run: python3 wazuh-automation/deployability/modules/allocation/main.py --action delete --track-output /tmp/allocator_instance/track.yml
2 changes: 1 addition & 1 deletion .github/workflows/ansible-playbooks/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
git:
repo: "{{ repository }}"
dest: "{{ tmp_path }}"
version: "{{ packages_reference }}"
version: "{{ reference }}"
depth: 1
force: true

Expand Down

0 comments on commit 529489b

Please sign in to comment.