Skip to content

Commit

Permalink
Merge branch '4.10.0' into enhancement/20-rework-distributed-workflow…
Browse files Browse the repository at this point in the history
…-development
  • Loading branch information
davidcr01 committed Sep 18, 2024
2 parents eebeb6c + 8cd8a86 commit 31428bd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 83 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/Test_installation_assistant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,10 @@ on:
description: 'Branch or tag of the wazuh-automation repository'
required: true
default: '4.10.0'
ASSISTANT_REFERENCE:
description: 'Branch or tag of the wazuh-installation-assistant repository'
required: true
default: '4.10.0'
SYSTEMS:
description: 'Operating Systems (list of comma-separated quoted strings enclosed in square brackets)'
required: true
default: '["CentOS_7", "CentOS_8", "AmazonLinux_2", "Ubuntu_16", "Ubuntu_18", "Ubuntu_20", "Ubuntu_22", "RHEL7", "RHEL8"]'
default: '["CentOS_8", "AmazonLinux_2", "Ubuntu_22", "RHEL8"]'
type: string
VERBOSITY:
description: 'Verbosity level on playbooks execution'
Expand Down Expand Up @@ -162,7 +158,7 @@ jobs:
-i $ALLOCATOR_PATH/inventory \
-l all \
-e "repository=$REPOSITORY_URL" \
-e "reference=${{ inputs.ASSISTANT_REFERENCE }}" \
-e "reference=${{ github.ref_name }}" \
-e "tmp_path=$TMP_PATH" \
-e "pkg_repository=$PKG_REPOSITORY" \
-e "install_deps=$INSTALL_DEPS" \
Expand Down
45 changes: 6 additions & 39 deletions .github/workflows/ansible-playbooks/aio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,12 @@
vars:
script_path: "{{ tmp_path }}"
script_name: "wazuh-install.sh"
script_builder: "builder.sh"
test_name: "{{ test_name }}"
test_dir: "/{{ test_name }}"
logs_path: "{{ logs_path }}"

tasks:

- name: Create log directory
file:
path: "{{ test_dir }}"
state: directory

- name: Create log file
file:
dest: "{{ test_dir }}/{{ test_name }}.log"
state: touch

- name: Test assistant AIO install
block:
- name: Perform AIO installation
command: "bash {{ script_name }} -a -v"
args:
chdir: "{{ script_path }}"
register: install_results
async: 500
poll: 5

always:
- name: Save output
blockinfile:
marker: ""
path: "{{ test_dir }}/{{ test_name }}.log"
block: |
{{ install_results.stderr }}
--------------------------------
{{ install_results.stdout }}
- name: Fetch log
fetch:
src: "{{ test_dir }}/{{ test_name }}.log"
dest: "{{ logs_path }}/"
flat: yes
command: "bash {{ script_name }} -a -v"
args:
chdir: "{{ script_path }}"
register: install_results
async: 500
poll: 5
43 changes: 6 additions & 37 deletions .github/workflows/ansible-playbooks/aio_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,11 @@

vars:
script_path: "{{ tmp_path }}/tests/install"
test_name: "{{ test_name }}"
script_name: "{{ test_name }}.py"
test_dir: "/{{ test_name }}"
logs_path: "{{ logs_path }}"

tasks:

- name: Create log directory
file:
path: "{{ test_dir }}"
state: directory

- name: Create log file
file:
dest: "{{ test_dir }}/{{ test_name }}.log"
state: touch

- name: Test unattended AIO install
block:
- name: Launch AIO test
command: "python3 -m pytest --tb=long {{ script_name }} -v -m \"wazuh or wazuh_worker or indexer or dashboard\""
args:
chdir: "{{ script_path }}"
register: test_results

always:
- name: Save output
blockinfile:
marker: ""
path: "{{ test_dir }}/{{ test_name }}.log"
block: |
{{ test_results.stderr }}
--------------------------------
{{ test_results.stdout }}
- name: Fetch log
fetch:
src: "{{ test_dir }}/{{ test_name }}.log"
dest: "{{ logs_path }}/"
flat: yes
- name: Test AIO install with Installation assistant
command: "python3 -m pytest --tb=long {{ script_name }} -v -m \"wazuh or wazuh_worker or indexer or dashboard\""
args:
chdir: "{{ script_path }}"
register: test_results
2 changes: 1 addition & 1 deletion .github/workflows/ansible-playbooks/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
depth: 1
force: true

- name: Generate unattended
- name: Generate Installation assistant
command: "bash {{ tmp_path }}/builder.sh -i -d"

- name: Change pre-release repository to selected one
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
### Changed

- Installation assistant distributed test rework and migration. ([#60](https://github.com/wazuh/wazuh-installation-assistant/pull/60))
- Installation assistant test and tier workflow migration ([#46](https://github.com/wazuh/wazuh-installation-assistant/pull/46/))
- Added post-install validations for the Wazuh manager and Filebeat. ([#3059](https://github.com/wazuh/wazuh-packages/pull/3059))
- Update SECURITY.md file. ([#59](https://github.com/wazuh/wazuh-installation-assistant/pull/59))

Expand Down

0 comments on commit 31428bd

Please sign in to comment.