Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
ci(GITHUB): upgrade notifications for better visibillity
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed May 22, 2021
1 parent 18a8d02 commit 78c8c18
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/self-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ jobs:

- name: Documentation Test -- Report Job Status on Success
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "documentation checks succeeded!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: documentation checks succeeded!"
- name: Documentation Test -- Report Job Status on Failure
if: failure()
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "documentation checks failed!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":x: documentation checks failed!"
molecule_lint_test:

Expand Down Expand Up @@ -96,11 +96,11 @@ jobs:
- name: Molecule Lint -- Report Job Status on Success
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "molecule linting checks succeeded!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: molecule linting checks succeeded!"
- name: Molecule Lint -- Report Job Status on Failure
if: failure()
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "molecule linting checks failed!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":x: molecule linting checks failed!"
push_repository_test:
needs: [documentation_test, molecule_lint_test, security_test, shellcheck_test, workflow_lint_test]
Expand Down Expand Up @@ -166,11 +166,11 @@ jobs:

- name: Push Test -- Report Job Status on Success
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "push has been triggered!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: push has been triggered!"
- name: Push Test -- Report Job Status on Failure
if: failure()
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "push failed to trigger!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":x: push failed to trigger!"
releases:
needs: [push_repository_test]
Expand Down Expand Up @@ -214,11 +214,11 @@ jobs:
- name: Create Release -- Report Job Status on Success
if: contains(github.ref, '/tags/v')
run: |
./{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "automated release has been created!\nhttps://github.com/${USERNAME}/${PROJECT_NAME}/releases"
./{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: automated release has been created!\nhttps://github.com/${USERNAME}/${PROJECT_NAME}/releases"
- name: Create Release -- Report Job Status on Failure
if: failure()
run: |
./{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "automated release creation has failed!"
./{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":x: automated release creation has failed!"
security_test:

Expand Down Expand Up @@ -259,11 +259,11 @@ jobs:
- name: Security Test -- Report Job Status on Success
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "security checks succeeded!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: security checks succeeded!"
- name: Security Test -- Report Job Status on Failure
if: failure()
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "security checks failed!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":x: security checks failed!"
shellcheck_test:

Expand Down Expand Up @@ -301,11 +301,11 @@ jobs:
- name: Shellcheck -- Report Job Status on Success
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "shellcheck checks succeeded!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: shellcheck checks succeeded!"
- name: Shellcheck -- Report Job Status on Failure
if: failure()
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "shellcheck checks failed!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":x: shellcheck checks failed!"
workflow_lint_test:

Expand Down Expand Up @@ -343,8 +343,8 @@ jobs:
- name: Workflow Lint -- Report Job Status on Success
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "workflow linting checks succeeded!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: workflow linting checks succeeded!"
- name: Workflow Lint -- Report Job Status on Failure
if: failure()
run: |
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" "workflow linting checks failed!"
./template/{{cookiecutter.project_slug}}/.github/scripts/notifications.sh "${NOTIFICATION}" ":x: workflow linting checks failed!"
24 changes: 12 additions & 12 deletions {{cookiecutter.project_slug}}/.github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:

- name: Documentation Test -- Report Success
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "documentation test has passed!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: documentation test was successful!"
- name: Documentation Test -- Report Failure
if: failure()
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "documentation test has failed!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":x: documentation test has failed!"
molecule_lint:

Expand Down Expand Up @@ -72,11 +72,11 @@ jobs:
- name: Molecule Lint -- Report Job Status (Success)
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "molecule linting was successful!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: molecule linting was successful!"
- name: Molecule Lint -- Report Job Status (Failure)
if: failure()
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "molecule linting has failed!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":x: molecule linting has failed!"
molecule_test:

Expand Down Expand Up @@ -111,11 +111,11 @@ jobs:
- name: Molecule Test -- Report Job Status (Success)
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "molecule test was successful!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: molecule test was successful!"
- name: Molecule Test -- Report Job Status (Failure)
if: failure()
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "molecule test has failed!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":x: molecule test has failed!"
release:
needs: [molecule_test, molecule_lint, documentation_test, security_test]
Expand Down Expand Up @@ -160,11 +160,11 @@ jobs:
- name: Release -- Report Job Status (Success)
if: contains(github.ref, '/tags/v')
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "automated release has been created:\nhttps://github.com/${USERNAME}/${PROJECT_NAME}/releases"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: automated release has been created:\nhttps://github.com/${USERNAME}/${PROJECT_NAME}/releases"
- name: Release -- Report Job Status (Failure)
if: failure() && contains(github.ref, '/tags/v')
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "automated release generation failed!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":x: automated release generation failed!"
security_test:

Expand Down Expand Up @@ -201,11 +201,11 @@ jobs:
- name: Security Test -- Report Job Status on Success
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "security checks succeeded!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: security checks were successful!"
- name: Security Test -- Report Job Status on Failure
if: failure()
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "security checks failed!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":x: security checks failed!"
workflow_lint:

Expand Down Expand Up @@ -239,9 +239,9 @@ jobs:
- name: Workflow Lint -- Report Job Status (Success)
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "workflow linting was successful!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: workflow linting was successful!"
- name: Workflow Lint -- Report Job Status (Failure)
if: failure()
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "workflow linting has failed!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":x: workflow linting has failed!"
{% endraw %}
4 changes: 2 additions & 2 deletions {{cookiecutter.project_slug}}/.github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ jobs:

- name: Publish to Galaxy -- Report Job Status (Success)
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "automated ansible galaxy import has been completed!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: automated ansible galaxy import has been completed!"
- name: Publish to Galaxy -- Report Job Status (Failure)
if: failure()
run: |
./.github/scripts/notifications.sh "${NOTIFICATION}" "automated ansible galaxy import has failed!"
./.github/scripts/notifications.sh "${NOTIFICATION}" ":x: automated ansible galaxy import has failed!"
{% endraw %}

0 comments on commit 78c8c18

Please sign in to comment.