Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
131164e
rework beats molecule tests
mkayontour Jan 19, 2023
c04e598
add beats github wf
mkayontour Jan 19, 2023
1ed88cc
rename elasticsarch molecule scenarios
mkayontour Jan 19, 2023
ab7a80a
add github workflow elasticsearch
mkayontour Jan 19, 2023
e59da78
add workflow kibana
mkayontour Jan 19, 2023
b7d6ee9
add workflow logstash
mkayontour Jan 19, 2023
85a15a1
add workflow repos
mkayontour Jan 19, 2023
ad07e47
rework molecule tests kibana
mkayontour Jan 19, 2023
936d13e
rework molecule tests
mkayontour Jan 19, 2023
92195b6
fix workflow issue missing needed job
mkayontour Jan 19, 2023
64d8396
build if in actions something changed
mkayontour Jan 19, 2023
4d5a3a8
update logstash default build
mkayontour Jan 19, 2023
db0a911
update builds
mkayontour Jan 19, 2023
2fd810e
remove all lint in molecule
mkayontour Jan 19, 2023
8058c47
cleanup builds
mkayontour Jan 19, 2023
c34b601
fix repos lint job
mkayontour Jan 19, 2023
4b2a9fe
add warn list ansible lint
mkayontour Jan 19, 2023
f5bf8fd
add full stack build
mkayontour Jan 19, 2023
e689ad9
removed beats empty requirements file
mkayontour Jan 20, 2023
9deb313
add ansible-lint config
mkayontour Jan 20, 2023
a3da60f
add lint config to action triggers
mkayontour Jan 20, 2023
bb80ad3
update linter warnings
mkayontour Jan 20, 2023
3c1a822
added more lint warnings
mkayontour Jan 20, 2023
8d24983
add manual trigger to actions [skip ci]
mkayontour Jan 20, 2023
0cc3ffe
fix yaml and yamllint
mkayontour Jan 20, 2023
fbb35ca
change build distro to ubuntu cause of systemd
mkayontour Jan 20, 2023
dc33823
added cgroup volumes
mkayontour Jan 20, 2023
0b7f953
added cgroupns_mode and volumes
mkayontour Jan 20, 2023
8557fef
add general PR build default roles
mkayontour Jan 20, 2023
52cdd2d
fix name tag in roles_pr
mkayontour Jan 20, 2023
19a71a1
changed fail strategie on all builds
mkayontour Jan 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .ansible-lint

This file was deleted.

16 changes: 16 additions & 0 deletions .config/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
warn_list:
- schema[meta]
- name[missing]
- package-latest
- jinja[spacing]
- experimental # all rules tagged as experimental
- key-order[task] # Ensure specific order of keys in mappings.
- name[casing]
skip_list:
- '106'
- 'command-instead-of-module'
- 'risky-shell-pipe'
- 'role-name'
- 'line-length'
- 'fqcn-builtins'
- yaml # Violations reported by yamllint.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
---
name: Molecule Test
name: Test ElasticStack
on:
push:
tags:
- v*
- '*'
branches:
- main
- 'feature/**'
- 'fix/**'
- '!doc/**'
pull_request:
branches:
- 'feature/**'
Expand All @@ -24,10 +21,13 @@ jobs:
COLLECTION_NAME: elasticstack

strategy:
fail-fast: false
max-parallel: 1
matrix:
distro: [ubuntu2204]
scenario: [default, cluster, cluster-oss, no-security]
distro:
- ubuntu2204
scenario:
- elasticstack_default

steps:
- name: Check out code
Expand All @@ -48,7 +48,6 @@ jobs:
mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE
cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME


- name: Test with molecule
run: |
molecule test -s ${{ matrix.scenario }}
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/test_role_beats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
name: Test Role beats
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
push:
branches:
- 'feature/**'
- 'fix/**'
- '!doc/**'
paths:
- 'roles/beats/**'
- '.github/workflows/test_role_beats.yml'
- 'molecule/beats_**'
- '.config/ansible-lint.yml'
- '.yamllint'
pull_request:
branches:
- 'feature/**'
- 'fix/**'
- '!doc/**'
paths:
- 'roles/beats/**'
- '.github/workflows/test_role_beats.yml'
- 'molecule/beats_**'
- '.config/ansible-lint.yml'
- '.yamllint'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v3

- name: Set up Python 3.
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install test dependencies.
run: |
python3 -m pip install --upgrade pip
python3 -m pip install yamllint ansible-lint

- name: Lint code.
run: |
yamllint roles/beats/
ansible-lint roles/beats/

build:
needs: lint
runs-on: ubuntu-latest

env:
COLLECTION_NAMESPACE: NETWAYS
COLLECTION_NAME: elasticstack

strategy:
fail-fast: false
max-parallel: 1
matrix:
distro: [debian11, rockylinux8, ubuntu2204]
scenario: [beats_default, beats_full_stack, beats_peculiar]

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-test.txt

- name: Install collection
run: |
mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE
cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME

- name: Test with molecule
run: |
molecule test -s ${{ matrix.scenario }}
env:
MOLECULE_DISTRO: ${{ matrix.distro }}
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
100 changes: 100 additions & 0 deletions .github/workflows/test_role_elasticsearch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
---
name: Test Role elasticsearch
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
push:
branches:
- 'feature/**'
- 'fix/**'
- '!doc/**'
paths:
- 'roles/elasticsearch/**'
- '.github/workflows/test_role_elasticsearch.yml'
- 'molecule/elasticsearch_**'
- '.config/ansible-lint.yml'
- '.yamllint'
pull_request:
branches:
- 'feature/**'
- 'fix/**'
- '!doc/**'
paths:
- 'roles/elasticsearch/**'
- '.github/workflows/test_role_elasticsearch.yml'
- 'molecule/elasticsearch_**'
- '.config/ansible-lint.yml'
- '.yamllint'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v3

- name: Set up Python 3.
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install test dependencies.
run: |
python3 -m pip install --upgrade pip
python3 -m pip install yamllint ansible-lint

- name: Lint code.
run: |
yamllint roles/elasticsearch/
ansible-lint roles/elasticsearch/

build:
needs: lint
runs-on: ubuntu-latest

env:
COLLECTION_NAMESPACE: NETWAYS
COLLECTION_NAME: elasticstack

strategy:
fail-fast: false
max-parallel: 1
matrix:
distro: [ubuntu2204]
scenario: [elasticsearch_default, elasticsearch_cluster, elasticsearch_cluster-oss, elasticsearch_no-security]

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-test.txt

- name: Install collection
run: |
mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE
cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME

- name: Test with molecule
run: |
molecule test -s ${{ matrix.scenario }}
env:
MOLECULE_DISTRO: ${{ matrix.distro }}
PY_COLORS: '1'
ANSIBLE_FORCE_COLOR: '1'
98 changes: 98 additions & 0 deletions .github/workflows/test_role_kibana.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
name: Test Role Kibana
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
push:
branches:
- 'feature/**'
- 'fix/**'
- '!doc/**'
paths:
- 'roles/kibana/**'
- '.github/workflows/test_role_kibana.yml'
- 'molecule/kibana_**'
- '.config/ansible-lint.yml'
- '.yamllint'
pull_request:
branches:
- 'feature/**'
- 'fix/**'
- '!doc/**'
paths:
- 'roles/kibana/**'
- '.github/workflows/test_role_kibana.yml'
- 'molecule/kibana_**'
- '.config/ansible-lint.yml'
- '.yamllint'

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out the codebase.
uses: actions/checkout@v3

- name: Set up Python 3.
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install test dependencies.
run: |
python3 -m pip install --upgrade pip
python3 -m pip install yamllint ansible-lint

- name: Lint code.
run: |
yamllint roles/kibana/
ansible-lint roles/kibana/

build:
needs: lint
runs-on: ubuntu-latest

env:
COLLECTION_NAMESPACE: NETWAYS
COLLECTION_NAME: elasticstack

strategy:
fail-fast: false
max-parallel: 3
matrix:
distro: [ubuntu2204]
scenario: [kibana_default, kibana_full_stack, kibana_full_stack-oss]

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements-test.txt

- name: Install collection
run: |
mkdir -p ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE
cp -a ../ansible-collection-$COLLECTION_NAME ~/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME

- name: Test with molecule
run: |
molecule test -s ${{ matrix.scenario }}
env:
MOLECULE_DISTRO: ${{ matrix.distro }}
Loading