Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
Happy Newmanium 2024/Update Role.
Browse files Browse the repository at this point in the history
  • Loading branch information
buluma committed Jan 2, 2024
1 parent ae1901a commit 8fd3e5a
Show file tree
Hide file tree
Showing 15 changed files with 165 additions and 73 deletions.
5 changes: 2 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Bug report
about: Create a report to help me improve
about: Create a report to help me improve this role.

---

Expand All @@ -20,12 +20,11 @@ YOUR PLAYBOOK HERE

## Output

Show at least the error, possible related output, maybe just all the output.
Show at least the error, possible related output, if possible all the output.

## Environment

- Control node OS: [e.g. Debian 9] (`cat /etc/os-release`)
- Control node Ansible version: [e.g. 2.9.1] (`ansible --version`)
- Managed node OS: [e.g. CentOS 7] (`cat /etc/os-release`)

Please consider [sponsoring me](https://github.com/sponsors/buluma).
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@ Why is this feature required?

Add any other context about the feature request here.

Please consider [sponsoring me](https://github.com/sponsors/buluma).
11 changes: 6 additions & 5 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
name-template: 'v$RESOLVED_VERSION 🌈'
tag-template: 'v$RESOLVED_VERSION'
name-template: 'v$NEXT_MINOR_VERSION'
tag-template: 'v$NEXT_MINOR_VERSION'
categories:
- title: '🚀 Features'
labels:
- 'feature'
- 'enhancement'
- title: '🐛 Bug Fixes'
- 'dependencies'
- title: '🐛 Role Fixes'
labels:
- 'fix'
- 'bugfix'
Expand All @@ -25,8 +26,8 @@ version-resolver:
patch:
labels:
- 'patch'
default: patch
default: minor
template: |
## Rifle, Rifle, Rifle!
## What’s Changed
$CHANGES
35 changes: 35 additions & 0 deletions .github/workflows/depandabot_merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
#
# Ansible managed
#

name: "Dependabot Merge"

on:
pull_request:
pull_request_target:

permissions:
contents: write
pull-requests: write

jobs:
build:
runs-on: "ubuntu-20.04"
steps:
- uses: "actions/checkout@master"
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Merge Dependabot PR"
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ jobs:
uses: robertdebock/galaxy-action@1.2.1
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
git_branch: ${{ github.event.repository.default_branch }}
16 changes: 6 additions & 10 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ jobs:
tag: "focal"
- image: "docker-ubuntu-systemd"
tag: "bionic"
- image: "docker-ubuntu-systemd"
tag: "lunar"
- image: "enterpriselinux"
tag: "7"
- image: "enterpriselinux"
Expand All @@ -62,22 +60,20 @@ jobs:
- image: "debian-systemd"
tag: "bullseye"
- image: "fedora-systemd"
tag: "37"
tag: "38"
- image: "fedora-systemd"
tag: "latest"
- image: "fedora-systemd"
tag: "rawhide"
- image: "docker-opensuse-systemd"
tag: "latest"
steps:
- name: checkout
- name: Checkout Role
uses: actions/checkout@v4
with:
path: "${{ github.repository }}"
# - name: disable apparmor for mysql
# run: sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
# - name: parse apparmor for mysql
# run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- name: molecule
uses: buluma/molecule-action@v5.1.1
- name: Running Molecule Test
uses: buluma/molecule-action@v6.0.0
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
33 changes: 22 additions & 11 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,64 @@ name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
# branches to consider in the event; optional, defaults to default
branches:
- master
- main
- testing
paths-ignore:
- '**/README.md'
- '**/CHANGELOG.md'
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]

permissions:
contents: write

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
update_release_draft:
permissions:
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write
runs-on: ubuntu-latest
steps:

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
with:
config-name: release-drafter.yml
disable-autolabeler: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
changelog_draft:
runs-on: ubuntu-latest

steps:
- name: Checkout dj-wasabi-release repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: dj-wasabi/dj-wasabi-release
path: dj-wasabi-release

- name: Checkout current repo
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: master

path: ${{ github.event.repository.default_branch }}
- name: Commit Changelog file
run: |
# We are cloned in the 'main' directory and the dj-wasabi-release
# repository is the 'dj-wasabi-release' next to 'main'
cd master
# We are cloned in the 'default' directory and the dj-wasabi-release
# repository is the 'dj-wasabi-release' next to 'default'
cd ${{ github.event.repository.default_branch }}
# Generate CHANGELOG.md file
../dj-wasabi-release/release.sh -d
# Let commit the changes if there are any? (Well there should be!)
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/requirements2png.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@
# Ansible managed
#

name: Ansible Graphviz
on:
push:
branches:
- master
- main
paths:
- '.github/workflows/requirements2png.yml'
name: Ansible Graphviz
tags_ignore:
- '*'

jobs:
build:
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@ name: "TODO 2 Issue"

on:
push:
branches:
- master
- main
paths-ignore:
- '**/README.md'
- '**/CHANGELOG.md'
tags_ignore:
- '*'

jobs:
build:
runs-on: "ubuntu-20.04"
steps:
- uses: "actions/checkout@master"
- uses: "actions/checkout@v4"
- name: "TODO to Issue"
uses: "alstr/todo-to-issue-action@v2.3" # TODO: Update buluma/todo-to-issue-action@v1.0.1 @buluma
uses: "buluma/todo-to-issue-action@v2.0.2"
id: "todo"
with:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
46 changes: 46 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behaviour that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behaviour by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behaviour and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by contacting the project team at me@buluma.me.ke. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
13 changes: 6 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Here is how you can help, a lot of steps are related to GitHub, not specifically

When you spot an issue, [create an issue](https://github.com/buluma/ansible-role-gitlab_ee/issues).

Making the issue help me and others to find similar problems in the future.
Raising the issue helps me and others to find similar problems and solutions in the future.

### [2. Fork the project.](#2-fork-the-project)

Expand All @@ -29,7 +29,7 @@ In you own GitHub namespace, make the required changes.

I typically do that by cloning the repository (in your namespace) locally:

```
```shell
git clone git@github.com:YOURNAMESPACE/ansible-role-gitlab_ee.git
```

Expand All @@ -39,19 +39,19 @@ Now you can start to edit on your laptop.

Install [molecule](https://molecule.readthedocs.io/en/stable/) and [Tox](https://tox.readthedocs.io/):

```
```shell
pip install molecule tox ansible-lint docker
```

And run `molecule test`. If you want to test a specific distribution, set `image` and optionally `tag`:

```
```shell
image=centos tag=7 molecule test
```

Once it start to work, you can test multiple version of Ansible:

```
```shell
image=centos tag=7 tox
```

Expand All @@ -71,6 +71,5 @@ In the comment-box, you can [refer to the issue number](https://help.github.com/

Now I'll get a message that you've added some code. Thank you, really.

CI starts to test your changes. You can follow the progress on GitHub.
CI starts to test your changes once pull request is reviewed. You can follow the progress on GitHub.

Please consider [sponsoring me](https://github.com/sponsors/buluma).
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2023 Shadow Walker (bulumaknight@gmail.com)
Copyright 2024 Shadow Walker (bulumaknight@gmail.com)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit 8fd3e5a

Please sign in to comment.