Skip to content

Commit

Permalink
Merge pull request #10 from buluma/testing
Browse files Browse the repository at this point in the history
testing autogenerated
  • Loading branch information
buluma authored Feb 17, 2022
2 parents 0bbf302 + 2f1e50a commit e40fa50
Show file tree
Hide file tree
Showing 5 changed files with 147 additions and 11 deletions.
61 changes: 61 additions & 0 deletions .github/slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
#
# Ansible managed
#

username: GitHub-CI
icon_url: https://octodex.github.com/images/mona-the-rivetertocat.png

pretext: Triggered via {{eventName}} by {{actor}} {{or action "action"}} {{ref}} `{{diffRef}}`
title: GitHub Actions
title_link: https://support.github.com

text: |
*<{{workflowRunUrl}}|Workflow _{{workflow}}_ job _{{jobName}}_ triggered by _{{eventName}}_ is _{{jobStatus}}_>* for <{{refUrl}}|`{{ref}}`>
{{#if description}}<{{diffUrl}}|`{{diffRef}}`> - {{description}}{{/if}}
{{#if payload.commits}}
*Commits*
{{#each payload.commits}}
<{{this.url}}|`{{truncate this.id 8}}`> - {{this.message}}
{{/each}}
{{/if}}
fallback: |-
[GitHub] {{workflow}} #{{runNumber}} {{jobName}} is {{jobStatus}}
fields:
- title: Job Steps
value: "{{#each jobSteps}}{{icon this.outcome}} {{@key}}\n{{/each}}"
short: false
- title: Workflow
value: "<{{workflowUrl}}|{{workflow}}>"
short: true
- title: Git Ref
value: "{{ref}} ({{refType}})"
short: true
- title: Run ID
value: |-
<{{workflowRunUrl}}|{{runId}}>
short: true
- title: Run Number
value: "{{runNumber}}"
short: true
- title: Actor
value: "{{actor}}"
short: true
- title: Job Status
value: "{{jobStatus}}"
short: true

footer: >-
<{{repositoryUrl}}|{{repositoryName}}> {{workflow}} #{{runNumber}}
colors:
success: '#5DADE2'
failure: '#884EA0'
cancelled: '#A569BD'
default: '#7D3C98'

icons:
success: ':white_check_mark:'
failure: ':grimacing:'
cancelled: ':x:'
skipped: ':heavy_minus_sign:'
default: ':interrobang:'
17 changes: 16 additions & 1 deletion .github/workflows/gitlab_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,17 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}"
steps:
- uses: act10ns/slack@v1
with:
status: starting
channel: "#ansible"
message: Starting Ansible Aide GitLab Trigger...
if: always()
- uses: actions/[email protected]
- name: Mirror + trigger CI
- name: Mirror + trigger CI.
uses: SvanBoxel/gitlab-mirror-and-ci-action@master
with:
args: "buluma/ansible-role-selinux"
Expand All @@ -18,3 +26,10 @@ jobs:
GITLAB_PASSWORD: ${{ secrets.GITLAB_PASSWORD }}
GITLAB_PROJECT_ID: "33417367"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Slack Notification
uses: act10ns/slack@v1
with:
status: "${{ job.status }}"
steps: "${{ toJson(steps) }}"
channel: "#ansible"
if: always()
12 changes: 5 additions & 7 deletions .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
name: Ansible Molecule

on:
push:
branches:
- '**'
tags-ignore:
- '*'
pull_request:
# Schedule updates (once daily)
schedule:
- cron: '37 19 19 * *'
- cron: '37 19 * * *'
# Lines below let you run workflow manually and on each commit
workflow_dispatch:
push: {branches: ["master", "main"]}

jobs:
lint:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
---
#
# Ansible managed
#

name: Release Drafter

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master
- main
- testing
# pull_request event is required only for autolabeler
Expand Down
63 changes: 60 additions & 3 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.5"
image: "buluma/github-action-molecule:4.0.6"

services:
- docker:dind
Expand Down Expand Up @@ -46,8 +46,37 @@ testing:
- if: $CI_COMMIT_REF_NAME == "testing"
retry: 1
parallel:
matrix:
- image: "alpine-openrc"
matrix:- image: "alpine-openrc"
tag: "latest"
- image: "amazonlinux"
tag: "latest"
- image: "centos-systemd"
tag: "7"
- 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"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"

role_testing:
script:
- image=${image} tag=${tag} ansible-galaxy install buluma.selinux
rules:
- if: $CI_COMMIT_REF_NAME == "testing"
retry: 1
parallel:
matrix:- image: "alpine-openrc"
tag: "latest"
- image: "amazonlinux"
tag: "latest"
Expand All @@ -73,3 +102,31 @@ testing:
galaxy:
script:
- ansible-galaxy role info buluma.selinux

role_testing_live:
script:
- image=${image} tag=${tag} ansible-galaxy install buluma.selinux
retry: 1
parallel:
matrix:- image: "alpine-openrc"
tag: "latest"
- image: "amazonlinux"
tag: "latest"
- image: "centos-systemd"
tag: "7"
- 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"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "latest"
- image: "docker-ubuntu-systemd"
tag: "bionic"

0 comments on commit e40fa50

Please sign in to comment.