Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To match two or more code owners with the same pattern, all the code owners must be on the same line.
# If the code owners are not on the same line, the pattern matches only the last mentioned code owner.

# Order is important; the last matching pattern takes the most precedence.

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @brianveltman will be requested for
# review when someone opens a pull request.

* @brianveltman

# These owners will be the default reviewers for everything inside
# the .github directory
/.github/ @brianveltman
55 changes: 55 additions & 0 deletions .github/workflows/ci-actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI Actions
run-name: ${{ github.actor }} is testing changes
on:
pull_request:
types:
[
opened,
reopened,
review_requested,
auto_merge_enabled,
ready_for_review,
edited,
synchronize,
]
merge_group:
types: [checks_requested]
jobs:
Linting:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.12"]
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ansible ansible-lint molecule molecule-plugins docker flake8 flake8-bugbear flake8-docstrings flake8-import-order flake8-pylint pytest pytest-testinfra yamllint
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
sudo apt-get install groovy -y
- name: Run lint
run: |
./tests/test_groovySyntax.sh
yamllint . --format github
- name: Run yamllint
run: |
yamllint . --format github
- name: Run flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with Molecule
run: molecule test --all
env:
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
- run: echo "🍏 This job's status is ${{ job.status }}."
67 changes: 66 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,69 @@
---
name: CI

on:
push:
branches:
- main

env:
TRAVIS_BUILD_DIR: /home/runner/work/ansible-thoteam.nexus3-oss

jobs:
lint:
name: Checking overall syntax (groovy, yaml, python)
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install dependencies
run: pip install --upgrade --upgrade-strategy eager -r requirements.txt

- name: Run linting
run: |
./tests/test_groovySyntax.sh
molecule test

test-centos7:
name: Test on centos7
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install dependencies
run: pip install --upgrade --upgrade-strategy eager -r requirements.txt

- name: Run tests on centos7
run: molecule test -s default-centos7

test-debian-bullseye:
name: Test on Debian Bullseye
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install dependencies
run: pip install --upgrade --upgrade-strategy eager -r requirements.txt

- name: Run tests on Debian Bullseye
run: molecule test -s default-debian_bullseye
branches:
only:
- main
Expand Down
5 changes: 4 additions & 1 deletion .yamllint
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
---
extends: default

ignore-from-file: .gitignore
ignore:
- .github/
- ".travis.yml"
- ".pre-commit-config.yaml"

rules:
indentation:
Expand Down
17 changes: 8 additions & 9 deletions molecule/default-centos7/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@ dependency:
enabled: false

driver:
name: docker
safe_files:
- nexus-downloads

lint: |
set -e
yamllint .
ansible-lint
flake8
name: default
options:
managed: True
login_cmd_template: "docker exec -ti {instance} bash"
ansible_connection_options:
ansible_connection: docker

platforms:
- name: nexus3-oss-centos-7
Expand Down Expand Up @@ -45,6 +42,8 @@ platforms:

provisioner:
name: ansible
lint:
name: ansible-lint

scenario:
check_sequence:
Expand Down
3 changes: 0 additions & 3 deletions molecule/default-centos8/converge.yml

This file was deleted.

72 changes: 0 additions & 72 deletions molecule/default-centos8/molecule.yml

This file was deleted.

1 change: 0 additions & 1 deletion molecule/default-centos8/tests/test_default.py

This file was deleted.

3 changes: 0 additions & 3 deletions molecule/default-debian_bullseye/converge.yml

This file was deleted.

71 changes: 0 additions & 71 deletions molecule/default-debian_bullseye/molecule.yml

This file was deleted.

Loading