Skip to content

Commit

Permalink
Merge pull request #13 from mrlesmithjr/mrlesmithjr/issue12_Refactor-…
Browse files Browse the repository at this point in the history
…for-latest-Cookiecutter-template

Mrlesmithjr/issue12 refactor for latest cookiecutter template
  • Loading branch information
mrlesmithjr authored May 5, 2021
2 parents acdb50d + 94a4cdf commit 11bd67b
Show file tree
Hide file tree
Showing 36 changed files with 542 additions and 264 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skip_list: []
3 changes: 3 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[flake8]
exclude = .venv/
max-line-length = 88
14 changes: 14 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Configuration for request-info - https://github.com/behaviorbot/request-info

# *Required* Comment to reply with
requestInfoReplyComment: >
We would appreciate it if you could provide us with more info about this issue/pr!
# *OPTIONAL* default titles to check against for lack of descriptiveness
# MUST BE ALL LOWERCASE
requestInfoDefaultTitles:
- update readme.md
- updates

# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
requestInfoLabelToAdd: needs-more-info
32 changes: 32 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name-template: "v$RESOLVED_VERSION 🌈"
tag-template: "v$RESOLVED_VERSION"
categories:
- title: "🚀 Features"
labels:
- "feature"
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- title: "🧰 Maintenance"
label: "chore"
- title: "🧺 Miscellaneous" #Everything except ABAP
label: "misc"
change-template: "- $TITLE @$AUTHOR (#$NUMBER)"
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
patch:
labels:
- "patch"
default: patch
template: |
## Changes
$CHANGES
13 changes: 13 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These settings are synced to GitHub by https://probot.github.io/apps/settings/

repository:
# See https://developer.github.com/v3/repos/#edit for all available settings.

# The name of the repository. Changing this will rename the repository
name: ansible-guacamole

# A short description of the repository that will show up on GitHub
description: Ansible role to install/configure Guacamole

# A comma-separated list of topics to set on the repository
topics: ansible, ansible-role
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
42 changes: 26 additions & 16 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,42 @@ jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: [3.5, 3.6, 3.7]
molecule_distro:
- centos7
# - centos8
# - debian8
# - debian9
# - debian10
# - fedora
- ubuntu1604
- ubuntu1804
# - ubuntu2004

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
path: ansible-guacamole
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
sudo apt install docker
python -m pip install --upgrade pip
pip3 install -r requirements.txt
ansible --version
molecule --version
pip install -r requirements.txt -r requirements-dev.txt
pip install pre-commit
- name: Run pre-commit checks
run: |
SKIP=no-commit-to-branch pre-commit run --all-files
- name: Test with molecule
run: |
molecule test --scenario-name centos7
# molecule test --scenario-name centos8
# molecule test --scenario-name debian8
# molecule test --scenario-name debian9
# molecule test --scenario-name debian10
# molecule test --scenario-name fedora
molecule test --scenario-name ubuntu1604
molecule test --scenario-name ubuntu1804
molecule test --scenario-name ${{ matrix.molecule_distro }}
17 changes: 17 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- main
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

poetry.lock
55 changes: 47 additions & 8 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,64 @@ image: docker:git
services:
- docker:dind

stages:
- molecule-test

before_script:
- apk update && apk add --no-cache docker
python3-dev py3-pip docker gcc git curl build-base
autoconf automake py3-cryptography linux-headers
musl-dev libffi-dev openssl-dev openssh
- docker info
- python3 --version
- pip3 install -r requirements.txt
- python3 -m venv venv
- source venv/bin/activate
- pip3 install --upgrade pip pip-tools
- pip-sync requirements.txt requirements-dev.txt
- ansible --version
- molecule --version

molecule:
stage: test
centos7:
stage: molecule-test
script:
- molecule test --scenario-name centos7
# - molecule test --scenario-name centos8
# - molecule test --scenario-name debian8
# - molecule test --scenario-name debian9
# - molecule test --scenario-name debian10
# - molecule test --scenario-name fedora

# centos8:
# stage: molecule-test
# script:
# - molecule test --scenario-name centos8

# debian8:
# stage: molecule-test
# script:
# - molecule test --scenario-name debian8

# debian9:
# stage: molecule-test
# script:
# - molecule test --scenario-name debian9

# debian10:
# stage: molecule-test
# script:
# - molecule test --scenario-name debian10

# fedora:
# stage: molecule-test
# script:
# - molecule test --scenario-name fedora

ubuntu1604:
stage: molecule-test
script:
- molecule test --scenario-name ubuntu1604

ubuntu1804:
stage: molecule-test
script:
- molecule test --scenario-name ubuntu1804

# ubuntu2004:
# stage: molecule-test
# script:
# - molecule test --scenario-name ubuntu2004
32 changes: 32 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [--branch, develop, --branch, master, --branch, main]
- id: trailing-whitespace
- repo: https://github.com/ansible-community/ansible-lint
rev: v5.0.7
hooks:
- id: ansible-lint
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 3.9.1
hooks:
- id: flake8
- repo: https://github.com/adrienverge/yamllint
rev: v1.26.1
hooks:
- id: yamllint
25 changes: 14 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,21 @@ services:
- docker
before_install:
- sudo apt-get -qq update
env:
- molecule_distro=centos7
# - molecule_distro=centos8
# - molecule_distro=debian8
# - molecule_distro=debian9
# - molecule_distro=debian10
# - molecule_distro=fedora
- molecule_distro=ubuntu1604
- molecule_distro=ubuntu1804
# - molecule_distro=ubuntu2004
install:
- pip3 install -r requirements.txt
- ansible --version
- molecule --version
- python -m pip install --upgrade pip
- pip install -r requirements.txt -r requirements-dev.txt
- pip install pre-commit
script:
- molecule test --scenario-name centos7
# - molecule test --scenario-name centos8
# - molecule test --scenario-name debian8
# - molecule test --scenario-name debian9
# - molecule test --scenario-name debian10
# - molecule test --scenario-name fedora
- molecule test --scenario-name ubuntu1604
- molecule test --scenario-name ubuntu1804
- molecule test --scenario-name "$molecule_distro"
notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
2 changes: 1 addition & 1 deletion .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
extends: default

ignore: |
venv/
.venv/

rules:
braces:
Expand Down
Loading

0 comments on commit 11bd67b

Please sign in to comment.