Skip to content
This repository was archived by the owner on May 24, 2023. It is now read-only.

Actions-conversion #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
offline: true
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
### Describe the bug
A clear and concise description of what the bug is.

### To reproduce
Steps to reproduce the behavior:
1. Deploy NGINX Controller Integration role using playbook.yml
2. View output/logs/configuration on '...'
3. See error

### Expected behavior
A clear and concise description of what you expected to happen.

### Your environment:
- Version of the NGINX Controller Integration role or specific commit
- Version of Ansible
- Version of Jinja2 (if you are using any templating capability)
- Target deployment platform

### Additional context
Add any other context about the problem here.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
### Is your feature request related to a problem? Please describe
A clear and concise description of what the problem is. Ex. I'm always frustrated when ...

### Describe the solution you'd like
A clear and concise description of what you want to happen.

### Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

### Additional context
Add any other context or screenshots about the feature request here.
9 changes: 9 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Security Policy

## Supported Versions

This role mainly consists of Ansible tasks. Ansible applies security fixes to the most recent three releases. Please find more information in [the Ansible docs](https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#release-status).

## Reporting a Vulnerability

If you find a security vulnerability that affects Ansible, we encourage you to report it according to the [Ansible guidelines](https://docs.ansible.com/ansible/devel/community/reporting_bugs_and_features.html#reporting-a-bug).
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pip"
directory: "/.github/workflows/requirements"
schedule:
interval: "daily"
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### Proposed changes
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue using one of the [supported keywords](https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue) here in this description (not in the title of the PR).

### Checklist
Before creating a PR, run through this checklist and mark each as complete.

- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/ansible-role-nginx_controller_integration_role/blob/main/CONTRIBUTING.md) document
- [ ] I have added Molecule tests that prove my fix is effective or that my feature works
- [ ] I have checked that any relevant Molecule tests pass after adding my changes
- [ ] I have updated any relevant documentation (`defaults/main/*.yml`, `README.md` and `CHANGELOG.md`)
99 changes: 99 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
name-template: "$RESOLVED_VERSION"
tag-template: "$RESOLVED_VERSION"
categories:
- title: "💣 Breaking Changes"
labels:
- "breaking change"
- title: "🔔 Deprecation Warnings"
labels:
- "deprecation"
- title: "🚀 Features"
labels:
- "feature"
- title: "🎉 Enhancements"
labels:
- "enhancement"
- title: "🐛 Bug Fixes"
labels:
- "bug"
- title: "📝 Documentation"
labels:
- "documentation"
- title: "⬆️ Dependencies"
labels:
- "dependencies"
exclude-labels:
- "skip-changelog"
version-resolver:
minor:
labels:
- "breaking change"
- "deprecation"
patch:
labels:
- "bug"
- "dependencies"
- "documentation"
- "feature"
- "enhancement"
default: patch
autolabeler:
- label: "breaking change"
body:
- "/breaking/i"
- label: "deprecation"
branch:
- "/deprecate\/.+/"
title:
- "/deprecate/i"
- label: "feature"
branch:
- "/feat\/.+/"
- "/feature\/.+/"
- "/implement\/.+/"
title:
- "/feat/i"
- "/feature/i"
- "/implement/i"
- label: "enhancement"
branch:
- "/add\/.+/"
- "/enhancement\/.+/"
title:
- "/add/i"
- "/enhancement/i"
- label: "bug"
branch:
- "/fix\/.+/"
title:
- "/fix/i"
- label: "documentation"
branch:
- "/docs\/.+/"
files:
- "**/!(changelog).md"
title:
- "/docs/i"
- "/documentation/i"
- label: "dependencies"
files:
- ".github/workflows/requirements/*"
template: |
👾 *Help make the NGINX Controller Integration Ansible role better by participating in our [survey](https://forms.office.com/Pages/ResponsePage.aspx?id=L_093Ttq0UCb4L-DJ9gcUKLQ7uTJaE1PitM_37KR881UM0NCWkY5UlE5MUYyWU1aTUcxV0NRUllJSC4u)!* 👾

## What's new in NGINX's Controller Integration Ansible role $RESOLVED_VERSION!

$CHANGES

## Install & Upgrade

* To install the Ansible NGINX Controller Integration role on a fresh environment, run `ansible-galaxy install nginxinc.nginx_controller_integration`.
* To upgrade the Ansible NGINX Controller Integration role to the latest release, run `ansible-galaxy install -f nginxinc.nginx_controller_integration`.
* To install or upgrade to this specific Ansible NGINX Controller Integration role release ($RESOLVED_VERSION), run `ansible-galaxy install -f nginxinc.nginx_controller_integration,v$RESOLVED_VERSION`.

## Resources

* Functional configuration examples (check `converge.yml` under each `molecule` scenario) -- [github.com/nginxinc/ansible-role-nginx_controller_integration/tree/$RESOLVED_VERSION/molecule](https://github.com/nginxinc/ansible-role-nginx_controller_integration/tree/$RESOLVED_VERSION/molecule).
* Ansible Galaxy repository -- [galaxy.ansible.com/nginxinc/nginx_controller_integration](https://galaxy.ansible.com/nginxinc/nginx_controller_integration).
* NGINX: Better with Ansible demo -- [github.com/alessfg/nginx-ansible-demo](https://github.com/alessfg/nginx-ansible-demo).
24 changes: 24 additions & 0 deletions .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Ansible Galaxy import
"on":
release:
types:
- published
jobs:
galaxy:
name: Galaxy
runs-on: ubuntu-20.04
steps:
- name: Check out the codebase
uses: actions/[email protected]

- name: Set up Python 3
uses: actions/[email protected]
with:
python-version: 3.x

- name: Install Ansible
run: pip3 install -r .github/workflows/requirements/requirements_galaxy.txt

- name: Import release to Ansible Galaxy
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
42 changes: 42 additions & 0 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Molecule CI/CD
"on":
pull_request:
branches:
- main
push:
branches:
- main
ignore-tags:
- "*"
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:
jobs:
molecule:
name: Molecule
runs-on: ubuntu-20.04
strategy:
matrix:
scenario:
- default
steps:
- name: Check out the codebase
uses: actions/[email protected]

- name: Set up Python 3
uses: actions/[email protected]
with:
python-version: 3.x

- name: Install Molecule dependencies
run: pip3 install -r .github/workflows/requirements/requirements_molecule.txt

- name: Install Ansible base dependencies
run: ansible-galaxy install -r .github/workflows/requirements/requirements_ansible.yml

- name: Run Molecule tests
run: molecule test -s ${{ matrix.scenario }}
env:
PY_COLORS: "1"
ANSIBLE_FORCE_COLOR: "1"
19 changes: 19 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Release Drafter
"on":
pull_request:
types:
- opened
- reopened
- synchronize
push:
branches:
- main
jobs:
update_release_draft:
name: Update release draft
runs-on: ubuntu-20.04
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .github/workflows/requirements/requirements_ansible.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
collections:
- name: community.docker
version: 1.7.0
1 change: 1 addition & 0 deletions .github/workflows/requirements/requirements_galaxy.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ansible-core==2.11.4
6 changes: 6 additions & 0 deletions .github/workflows/requirements/requirements_molecule.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ansible-core==2.11.4
Jinja2==3.0.1
ansible-lint==5.1.2
yamllint==1.26.3
molecule[docker]==3.4.0
docker==5.0.0
23 changes: 23 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Any private crt and keys #
############################
*.crt
*.key
*~
\#*
!molecule.crt
!molecule.key

# OS Specific #
###############
Thumbs.db
.DS_Store
.vscode

# Ansible specific #
####################
.cache
*.retry

# Python specific #
###################
__pycache__
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .yamllint
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
extends: default

rules:
Expand All @@ -9,4 +10,3 @@ rules:
level: error
comments-indentation: disable
line-length: disable
truthy: disable
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog

## 0.1.0 (Unreleased)

ENHANCEMENTS:

* Implement GitHub Actions CI/CD workflow for repo.
* Add Molecule tests for role.
Loading