WIP: Testing CI
This commit is contained in:
parent
423d57164a
commit
bd9ef4cb2d
43
.github/actions/default/Dockerfile
vendored
43
.github/actions/default/Dockerfile
vendored
@ -1,48 +1,7 @@
|
|||||||
FROM python:3.7-alpine
|
FROM quay.io/ansible/molecule:2.20
|
||||||
|
|
||||||
LABEL "com.github.actions.name"="molecule"
|
|
||||||
LABEL "com.github.actions.description"="Run Ansible Molecule"
|
|
||||||
LABEL "com.github.actions.icon"="upload"
|
|
||||||
LABEL "com.github.actions.color"="green"
|
|
||||||
|
|
||||||
ARG BUILD_DEPS="\
|
|
||||||
gcc \
|
|
||||||
libc-dev \
|
|
||||||
make \
|
|
||||||
musl-dev \
|
|
||||||
libffi-dev \
|
|
||||||
openssl-dev \
|
|
||||||
"
|
|
||||||
|
|
||||||
ARG PACKAGES="\
|
|
||||||
docker \
|
|
||||||
git \
|
|
||||||
openssh-client \
|
|
||||||
"
|
|
||||||
|
|
||||||
ARG PIP_INSTALL_ARGS="\
|
|
||||||
--no-cache-dir \
|
|
||||||
"
|
|
||||||
|
|
||||||
# ARG PIP_MODULES="\
|
|
||||||
# netaddr \
|
|
||||||
# "
|
|
||||||
|
|
||||||
ARG MOLECULE_EXTRAS="docker"
|
|
||||||
|
|
||||||
RUN apk add --update --no-cache ${BUILD_DEPS} ${PACKAGES} && \
|
|
||||||
pip install ${PIP_INSTALL_ARGS} ${PIP_MODULES} "molecule[${MOLECULE_EXTRAS}]" && \
|
|
||||||
apk del --no-cache ${BUILD_DEPS} && \
|
|
||||||
rm -rf /root/.cache
|
|
||||||
|
|
||||||
# CMD cd ${GITHUB_REPOSITORY}; molecule ${INPUT_MOLECULE_OPTIONS} ${INPUT_MOLECULE_COMMAND} ${INPUT_MOLECULE_ARGS}
|
|
||||||
# Adding systemd compatibility.
|
|
||||||
COPY . /wazuh-ansible
|
|
||||||
WORKDIR /wazuh-ansible
|
|
||||||
|
|
||||||
VOLUME [ "/sys/fs/cgroup", "/run", "/run/lock" ]
|
VOLUME [ "/sys/fs/cgroup", "/run", "/run/lock" ]
|
||||||
|
|
||||||
COPY ./entrypoint.sh /entrypoint.sh
|
COPY ./entrypoint.sh /entrypoint.sh
|
||||||
RUN chmod 755 /entrypoint.sh
|
RUN chmod 755 /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
|||||||
6
.github/actions/default/entrypoint.sh
vendored
6
.github/actions/default/entrypoint.sh
vendored
@ -1,5 +1,3 @@
|
|||||||
#! /usr/bin/env bash
|
#!/bin/sh -eu
|
||||||
set -e
|
|
||||||
|
|
||||||
cd molecule
|
molecule test
|
||||||
molecule test -s default
|
|
||||||
@ -23,11 +23,10 @@ provisioner:
|
|||||||
ANSIBLE_ROLES_PATH: ./roles
|
ANSIBLE_ROLES_PATH: ./roles
|
||||||
lint:
|
lint:
|
||||||
name: ansible-lint
|
name: ansible-lint
|
||||||
enabled: true
|
enabled: false
|
||||||
scenario:
|
scenario:
|
||||||
name: default
|
name: default
|
||||||
test_sequence:
|
test_sequence:
|
||||||
- lint
|
|
||||||
- dependency
|
- dependency
|
||||||
- syntax
|
- syntax
|
||||||
- create
|
- create
|
||||||
@ -41,4 +40,4 @@ verifier:
|
|||||||
name: testinfra
|
name: testinfra
|
||||||
lint:
|
lint:
|
||||||
name: flake8
|
name: flake8
|
||||||
enabled: true
|
enabled: false
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
- name: Converge
|
- name: Converge
|
||||||
hosts: all
|
hosts: all
|
||||||
roles:
|
roles:
|
||||||
- role: wazuh/ansible-wazuh-manager
|
- role: ../../roles/wazuh/ansible-wazuh-manager
|
||||||
vars:
|
vars:
|
||||||
wazuh_manager_config:
|
wazuh_manager_config:
|
||||||
cluster:
|
cluster:
|
||||||
@ -14,6 +14,6 @@
|
|||||||
port: '1516'
|
port: '1516'
|
||||||
bind_addr: '0.0.0.0'
|
bind_addr: '0.0.0.0'
|
||||||
nodes:
|
nodes:
|
||||||
- "manager_{{ lookup('env', 'MOL_PLATFORM') or 'centos7' }}"
|
- "manager_centos7"
|
||||||
hidden: 'no'
|
hidden: 'no'
|
||||||
- { role: wazuh/ansible-filebeat, filebeat_output_elasticsearch_hosts: "elasticsearch_{{ lookup('env', 'MOL_PLATFORM') or 'centos7' }}:9200" }
|
- { role: ../../roles/wazuh/ansible-filebeat, filebeat_output_elasticsearch_hosts: "elasticsearch_centos7:9200" }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user