Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing #54

Merged
merged 6 commits into from
May 13, 2022
Merged
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
18 changes: 18 additions & 0 deletions .github/workflows/auto-merge-dependabot-updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
#
# Ansible managed
#

name: Auto Merge Dependency Updates

on:
- pull_request_target

jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Auto Merge Dependabot Updates
uses: buluma/gh-action-auto-merge-dependabot-updates@1.0.5
with:
allowed-actors: buluma, dependabot-preview[bot], dependabot[bot]
3 changes: 2 additions & 1 deletion .github/workflows/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: galaxy
uses: buluma/galaxy-action@1.1.0
uses: buluma/galaxy-action@v1.0.3
with:
galaxy_api_key: ${{ secrets.galaxy_api_key }}
git_branch: master
23 changes: 23 additions & 0 deletions .github/workflows/labelassign-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
#
# Ansible managed
#

name: "Set Label and Assignee"

on:
issues:
types: [opened]
pull_request:
types: [opened]

jobs:
build:
runs-on: "ubuntu-20.04"
steps:
- name: "Label and Assign Issue/PR"
uses: "Naturalclar/issue-action@v2.0.2"
with:
title-or-body: "both"
parameters: '[ {"keywords": ["bug", "error"], "labels": ["BUG"], "assignees": ["buluma"]}, {"keywords": ["help", "guidance"], "labels": ["help-wanted"], "assignees": ["buluma"]}, {"keywords": ["feature", "request"], "labels": ["enhancement"], "assignees": ["buluma"]}]'
github-token: ${{ secrets.GITHUB_TOKEN }}
14 changes: 8 additions & 6 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
schedule:
- cron: '15 8 * * *'
workflow_dispatch:
push: {branches: ["master", "main", "testing"]}
push: {branches: ["master", "main"]}

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
Expand All @@ -25,7 +25,7 @@ jobs:
with:
path: "${{ github.repository }}"
- name: molecule
uses: buluma/molecule-action@v4.0.6
uses: buluma/molecule-action@v4.0.7
with:
command: lint
test:
Expand All @@ -45,17 +45,19 @@ jobs:
- image: "fedora-systemd"
tag: "34"
- image: "fedora-systemd"
tag: "latest"
tag: "35"
- image: "fedora-systemd"
tag: "rawhide"
- image: "opensuse"
tag: "latest"
- image: "docker-opensuse-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"
- image: "docker-ubuntu-systemd"
tag: "focal"
- image: "docker-ubuntu-systemd"
tag: "jammy"
steps:
- name: checkout
uses: actions/checkout@v3
Expand All @@ -66,7 +68,7 @@ jobs:
- name: parse apparmor for mysql
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- name: molecule
uses: buluma/molecule-action@v4.0.6
uses: buluma/molecule-action@v4.0.7
with:
image: ${{ matrix.config.image }}
tag: ${{ matrix.config.tag }}
37 changes: 37 additions & 0 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]

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

jobs:
update_release_draft:
runs-on: ubuntu-latest
Expand All @@ -30,3 +34,36 @@ jobs:
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
changelog_draft:
runs-on: ubuntu-latest

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

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

- 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
# Generate CHANGELOG.md file
../dj-wasabi-release/release.sh -d
# Let commit the changes if there are any? (Well there should be!)
if [[ $(git status | grep -c 'CHANGELOG.md' || true) -gt 0 ]]
then echo "Committing file"
git config --global user.name 'Shadow Walker [GH bot]'
git config --global user.email 'github@buluma.me.ke'
git add CHANGELOG.md
git commit -m "Updated CHANGELOG.md on \"$(date "+%Y-%m-%d %H:%M:%S")\"" CHANGELOG.md
git push
fi
env:
CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ jobs:
uses: "buluma/todo-to-issue-action@v1.0.1"
id: "todo"
with:
USER_PROJECTS: $buluma/Ansible/To do
USER_PROJECTS: buluma/Ansible/To do
PROJECTS_SECRET: ${{ secrets.PROJECTS_SECRET }}
83 changes: 42 additions & 41 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
image: "buluma/github-action-molecule:4.0.6"
image: "buluma/github-action-molecule:4.0.7"

services:
- docker:dind
Expand All @@ -9,10 +9,10 @@ variables:
PY_COLORS: 1

molecule:
stage: build
allow_failure: true
script:
- image=${image} tag=${tag} molecule test
rules:
- if: $CI_COMMIT_REF_NAME == "master"
retry: 1
parallel:
matrix:
Expand All @@ -25,19 +25,23 @@ molecule:
- image: "fedora-systemd"
tag: "34"
- image: "fedora-systemd"
tag: "latest"
tag: "35"
- image: "fedora-systemd"
tag: "rawhide"
- image: "opensuse"
tag: "latest"
- image: "docker-opensuse-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"
- image: "docker-ubuntu-systemd"
tag: "focal"
- image: "docker-ubuntu-systemd"
tag: "jammy"

testing:
stage: test
needs: []
script:
- image=${image} tag=${tag} molecule test
rules:
Expand All @@ -54,52 +58,29 @@ testing:
- image: "fedora-systemd"
tag: "34"
- image: "fedora-systemd"
tag: "latest"
tag: "35"
- image: "fedora-systemd"
tag: "rawhide"
- image: "opensuse"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"
- image: "docker-ubuntu-systemd"
tag: "focal"

role_testing:
script:
- image=${image} tag=${tag} ansible-galaxy install buluma.haproxy
rules:
- if: $CI_COMMIT_REF_NAME == "testing"
retry: 1
parallel:
matrix:
- image: "enterpriselinux"
tag: "latest"
- image: "debian-systemd"
tag: "latest"
- image: "debian-systemd"
tag: "bookworm"
- image: "fedora-systemd"
tag: "34"
- image: "fedora-systemd"
tag: "latest"
- image: "fedora-systemd"
tag: "rawhide"
- image: "opensuse"
- image: "docker-opensuse-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"
- image: "docker-ubuntu-systemd"
tag: "focal"
- image: "docker-ubuntu-systemd"
tag: "jammy"

galaxy:
stage: deploy
needs: []
script:
- ansible-galaxy role info buluma.haproxy

role_testing_live:
role_testing:
stage: test
needs: []
script:
- image=${image} tag=${tag} ansible-galaxy install buluma.haproxy
retry: 1
Expand All @@ -114,14 +95,34 @@ role_testing_live:
- image: "fedora-systemd"
tag: "34"
- image: "fedora-systemd"
tag: "latest"
tag: "35"
- image: "fedora-systemd"
tag: "rawhide"
- image: "opensuse"
tag: "latest"
- image: "docker-opensuse-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"
- image: "docker-ubuntu-systemd"
tag: "focal"
- image: "docker-ubuntu-systemd"
tag: "jammy"

release_job:
stage: .post
needs: [molecule]
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- echo "Running the release job."
release:
tag_name: $CI_COMMIT_TAG
name: 'Release $CI_COMMIT_TAG'
description: 'Release created using the release-cli.'
artifacts:
name: "$CI_JOB_STAGE-$CI_COMMIT_REF_NAME"
paths:
- /
expire_in: 1 day
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v4.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -14,7 +14,7 @@ repos:
args: [-c=.yamllint]

- repo: https://github.com/buluma/pre-commit
rev: v1.0.0
rev: v1.0.2
hooks:
- id: ansible_role_find_unused_variable
- id: ansible_role_find_empty_files
Expand Down
Loading