github: update actions with 3 jobs for testing scenarios: default, distributed-wazuh-elk and distributed-wazuh-elk-xpack
This commit is contained in:
parent
f771fb4dfd
commit
c81f973963
7
.github/actions/default/Dockerfile
vendored
7
.github/actions/default/Dockerfile
vendored
@ -1,7 +0,0 @@
|
||||
FROM quay.io/ansible/molecule:2.20
|
||||
|
||||
VOLUME [ "/sys/fs/cgroup", "/run", "/run/lock" ]
|
||||
|
||||
COPY ./entrypoint.sh /entrypoint.sh
|
||||
RUN chmod 755 /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
6
.github/actions/default/action.yml
vendored
6
.github/actions/default/action.yml
vendored
@ -1,6 +0,0 @@
|
||||
name: molecule-test
|
||||
description: Molecule tests for Wazuh Ansible
|
||||
runs:
|
||||
using: docker
|
||||
image: 'Dockerfile'
|
||||
|
||||
3
.github/actions/default/entrypoint.sh
vendored
3
.github/actions/default/entrypoint.sh
vendored
@ -1,3 +0,0 @@
|
||||
#!/bin/sh -eu
|
||||
|
||||
molecule test
|
||||
99
.github/workflows/main.yml
vendored
99
.github/workflows/main.yml
vendored
@ -1,13 +1,102 @@
|
||||
|
||||
---
|
||||
name: Molecule tests for Wazuh Ansible
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
default:
|
||||
|
||||
scenario-default:
|
||||
name: Default scenario (smoke)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v2
|
||||
- name: Default scenario
|
||||
uses: './.github/actions/default'
|
||||
|
||||
- name: Hack to get setup-python to work on act. See act issue 251
|
||||
run: |
|
||||
# Hack to get setup-python to work on act
|
||||
if [ ! -f "/etc/lsb-release" ] ; then
|
||||
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release
|
||||
fi
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install poetry
|
||||
run: pip3 install poetry
|
||||
|
||||
- name: Install dependencies
|
||||
run: poetry install
|
||||
|
||||
- name: Run Molecule tests.
|
||||
run: poetry run molecule test -s default
|
||||
env:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
|
||||
scenario-distributed-wazuh-elk:
|
||||
name: Distributed ELK + Wazuh
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Hack to get setup-python to work on act. See act issue 251
|
||||
run: |
|
||||
if [ ! -f "/etc/lsb-release" ] ; then
|
||||
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release
|
||||
fi
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install poetry
|
||||
run: pip3 install poetry
|
||||
|
||||
- name: Install dependencies
|
||||
run: poetry install
|
||||
|
||||
|
||||
- name: Run Molecule tests.
|
||||
run: poetry run molecule test -s distributed-wazuh-elk
|
||||
env:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
|
||||
scenario-distributed-wazuh-elk-xpack:
|
||||
name: Distributed ELK + XPack + Wazuh
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the codebase.
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Hack to get setup-python to work on act. See act issue 251
|
||||
run: |
|
||||
if [ ! -f "/etc/lsb-release" ] ; then
|
||||
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release
|
||||
fi
|
||||
|
||||
- name: Set up Python 3.
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
|
||||
- name: Install poetry
|
||||
run: pip3 install poetry
|
||||
|
||||
- name: Install dependencies
|
||||
run: poetry install
|
||||
|
||||
|
||||
- name: Run Molecule tests.
|
||||
run: poetry run molecule test -s distributed-wazuh-elk-xpack
|
||||
env:
|
||||
PY_COLORS: '1'
|
||||
ANSIBLE_FORCE_COLOR: '1'
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user