Skip to content

Commit

Permalink
build(COOKIECUTTER): standardize template
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed Jun 4, 2023
1 parent 666e7fe commit 2a40efb
Show file tree
Hide file tree
Showing 62 changed files with 81 additions and 81 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/.job-00-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:

- name: Start -- Report Job Status on Success
run: |
"./{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: workflow has started!"
"./{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: workflow has started!"
- name: Start -- Report Job Status on Failure
if: failure()
run: |
"./{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: error reporting job status!"
"./{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: error reporting job status!"
4 changes: 2 additions & 2 deletions .github/workflows/.job-00-success.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:

- name: Success -- Report Job Status on Success
run: |
"./{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: all checks were successful!"
"./{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: all checks were successful!"
- name: Success -- Report Job Status on Failure
if: failure()
run: |
"./{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: error reporting job status!"
"./{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: error reporting job status!"
6 changes: 3 additions & 3 deletions .github/workflows/.job-10-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Security Test Repo -- Setup Environment
run: |
source "./.github/scripts/workflow-setup-environment.sh"
source "./{{cookiecutter.profile_slug}}/.github/scripts/workflow-determine-pushed-commits.sh"
source "./{{cookiecutter.project_slug}}/.github/scripts/workflow-determine-pushed-commits.sh"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
Expand All @@ -47,9 +47,9 @@ jobs:
- name: Security Test Repo -- Report Job Status on Success
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: repo security checks succeeded!"
"./{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: repo security checks succeeded!"
- name: Security Test Repo -- Report Job Status on Failure
if: failure()
run: |
"./{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: repo security checks failed!"
"./{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: repo security checks failed!"
8 changes: 4 additions & 4 deletions .github/workflows/.job-30-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Documentation Test -- Check Markdown Links For Template
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: 'template/{{cookiecutter.profile_slug}}/.github/config/actions/gaurav-nelson-github-action-markdown-link-check.json'
config-file: 'template/{{cookiecutter.project_slug}}/.github/config/actions/gaurav-nelson-github-action-markdown-link-check.json'
use-quiet-mode: 'no'
use-verbose-mode: 'yes'
folder-path: 'template, template/.github/workflows'
Expand All @@ -60,7 +60,7 @@ jobs:
- name: Documentation Test -- Check Markdown Links For Rendered Template
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
config-file: 'template/{{cookiecutter.profile_slug}}/.github/config/actions/gaurav-nelson-github-action-markdown-link-check.json'
config-file: 'template/{{cookiecutter.project_slug}}/.github/config/actions/gaurav-nelson-github-action-markdown-link-check.json'
use-quiet-mode: 'no'
use-verbose-mode: 'yes'
folder-path: ${{ env.TEMPLATED_NAME }}
Expand All @@ -69,9 +69,9 @@ jobs:
- name: Documentation Test -- Report Job Status on Success
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: documentation checks succeeded!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: documentation checks succeeded!"
- name: Documentation Test -- Report Job Status on Failure
if: failure()
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: documentation checks failed!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: documentation checks failed!"
10 changes: 5 additions & 5 deletions .github/workflows/.job-40-ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,20 @@ jobs:
- name: Ansible Lint -- Initialize Cache Locations
run: |
mkdir -p ~/.cache/pypoetry/virtualenvs
source "./template/{{cookiecutter.profile_slug}}/.github/scripts/task-setup-ansible-cache.sh" \
source "./template/{{cookiecutter.project_slug}}/.github/scripts/task-setup-ansible-cache.sh" \
"$(pwd)/ansible_cache" \
~/.ansible
- name: Ansible Lint -- Mount Ansible Cache
uses: actions/cache@v3
with:
key: ansible-${{ hashFiles('./template/{{cookiecutter.profile_slug}}/profile/requirements.yml') }}-${{ env.CACHE_TTL }}
key: ansible-${{ hashFiles('./template/{{cookiecutter.project_slug}}/profile/requirements.yml') }}-${{ env.CACHE_TTL }}
path: ansible_cache

- name: Ansible Lint -- Mount Poetry Cache
uses: actions/cache@v3
with:
key: poetry-${{ hashFiles('./template/{{cookiecutter.profile_slug}}/pyproject.toml') }}-${{ runner.os }}-${{ env.CACHE_TTL }}
key: poetry-${{ hashFiles('./template/{{cookiecutter.project_slug}}/pyproject.toml') }}-${{ runner.os }}-${{ env.CACHE_TTL }}
path: ~/.cache/pypoetry/virtualenvs

- name: Ansible Lint -- Render Template
Expand All @@ -76,9 +76,9 @@ jobs:
- name: Ansible Lint -- Report Job Status on Success
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: ansible linting checks succeeded!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: ansible linting checks succeeded!"
- name: Ansible Lint -- Report Job Status on Failure
if: failure()
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: ansible linting checks failed!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: ansible linting checks failed!"
10 changes: 5 additions & 5 deletions .github/workflows/.job-50-precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ jobs:
- name: Pre-Commit -- Initialize Cache Locations
run: |
mkdir -p ~/.cache/pypoetry/virtualenvs
source "./template/{{cookiecutter.profile_slug}}/.github/scripts/task-setup-ansible-cache.sh" \
source "./template/{{cookiecutter.project_slug}}/.github/scripts/task-setup-ansible-cache.sh" \
"$(pwd)/ansible_cache" \
~/.ansible
- name: Pre-Commit -- Mount Ansible Cache
uses: actions/cache@v3
with:
key: ansible-${{ hashFiles('./template/{{cookiecutter.profile_slug}}/profile/requirements.yml') }}-${{ env.CACHE_TTL }}
key: ansible-${{ hashFiles('./template/{{cookiecutter.project_slug}}/profile/requirements.yml') }}-${{ env.CACHE_TTL }}
path: ansible_cache

- name: Pre-Commit Test -- Mount Poetry Cache
uses: actions/cache@v3
with:
key: poetry-${{ hashFiles('./template/{{cookiecutter.profile_slug}}/pyproject.toml') }}-${{ runner.os }}-${{ env.CACHE_TTL }}
key: poetry-${{ hashFiles('./template/{{cookiecutter.project_slug}}/pyproject.toml') }}-${{ runner.os }}-${{ env.CACHE_TTL }}
path: ~/.cache/pypoetry/virtualenvs

- name: Pre-Commit Test -- Render Template
Expand Down Expand Up @@ -108,9 +108,9 @@ jobs:
- name: Pre-Commit Test -- Report Job Status on Success
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: pre-commit (toml-${{ matrix.cookiecutter-toml-selection }}, workflow-${{ matrix.cookiecutter-workflow-selection }}) hook test has passed!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: pre-commit (toml-${{ matrix.cookiecutter-toml-selection }}, workflow-${{ matrix.cookiecutter-workflow-selection }}) hook test has passed!"
- name: Pre-Commit Test -- Report Job Status on Failure
if: failure()
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: pre-commit hook (toml-${{ matrix.cookiecutter-toml-selection }}, workflow-${{ matrix.cookiecutter-workflow-selection }}) test has failed!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: pre-commit hook (toml-${{ matrix.cookiecutter-toml-selection }}, workflow-${{ matrix.cookiecutter-workflow-selection }}) test has failed!"
4 changes: 2 additions & 2 deletions .github/workflows/.job-60-remote-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ jobs:
- name: Push Test -- Report Job Status on Success
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: remote push (all-optionals-${{ matrix.cookiecutter-optionals-selection }}) has been triggered!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: remote push (all-optionals-${{ matrix.cookiecutter-optionals-selection }}) has been triggered!"
- name: Push Test -- Report Job Status on Failure
if: failure()
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: remote push (all-optionals-${{ matrix.cookiecutter-optionals-selection }}) failed to trigger!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: remote push (all-optionals-${{ matrix.cookiecutter-optionals-selection }}) failed to trigger!"
10 changes: 5 additions & 5 deletions .github/workflows/.job-80-commit-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Commit Lint Test -- Setup Environment
run: |
source ./.github/scripts/workflow-setup-environment.sh
source "./{{cookiecutter.profile_slug}}/.github/scripts/workflow-determine-pushed-commits.sh"
source "./{{cookiecutter.project_slug}}/.github/scripts/workflow-determine-pushed-commits.sh"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
Expand All @@ -45,7 +45,7 @@ jobs:

- name: Commit Lint Test -- Install Poetry
run: |
source "./{{cookiecutter.profile_slug}}/.github/scripts/task-use-poetry.sh" "install-poetry"
source "./{{cookiecutter.project_slug}}/.github/scripts/task-use-poetry.sh" "install-poetry"
- name: Commit Lint Test -- Initialize Cache Locations
run: |
Expand All @@ -59,7 +59,7 @@ jobs:

- name: Commit Lint Test -- Install Requirements
run: |
source "./{{cookiecutter.profile_slug}}/.github/scripts/task-use-poetry.sh" "install-project"
source "./{{cookiecutter.project_slug}}/.github/scripts/task-use-poetry.sh" "install-project"
- name: Commit Lint Test -- Lint Pushed Commits
run: |
Expand All @@ -68,9 +68,9 @@ jobs:
- name: Commit Lint Test -- Report Job Status on Success
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: commit lint checks succeeded!"
"./{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: commit lint checks succeeded!"
- name: Commit Lint Test -- Report Job Status on Failure
if: failure()
run: |
"./{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: commit lint checks failed!"
"./{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: commit lint checks failed!"
4 changes: 2 additions & 2 deletions .github/workflows/.job-80-shell-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ jobs:
- name: Shellcheck -- Report Job Status on Success
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: shellcheck checks succeeded!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: shellcheck checks succeeded!"
- name: Shellcheck -- Report Job Status on Failure
if: failure()
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: shellcheck checks failed!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: shellcheck checks failed!"
4 changes: 2 additions & 2 deletions .github/workflows/.job-80-toml-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ jobs:
- name: Toml Lint -- Report Job Status (Success)
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: toml linting was successful!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: toml linting was successful!"
- name: Toml Lint -- Report Job Status (Failure)
if: failure()
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: toml linting has failed!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: toml linting has failed!"
4 changes: 2 additions & 2 deletions .github/workflows/.job-80-workflow-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ jobs:
- name: Workflow Lint -- Report Job Status (Success)
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: workflow linting was successful!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: workflow linting was successful!"
- name: Workflow Lint -- Report Job Status (Failure)
if: failure()
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: workflow linting has failed!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: workflow linting has failed!"
4 changes: 2 additions & 2 deletions .github/workflows/.job-80-yaml-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ jobs:
- name: Yaml Lint Test -- Report Job Status on Success
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: YAML linting (toml-${{ matrix.cookiecutter-toml-selection }}, workflow-${{ matrix.cookiecutter-workflow-selection }}) checks succeeded!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: YAML linting (toml-${{ matrix.cookiecutter-toml-selection }}, workflow-${{ matrix.cookiecutter-workflow-selection }}) checks succeeded!"
- name: Yaml Lint Test -- Report Job Status on Failure
if: failure()
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: YAML linting (toml-${{ matrix.cookiecutter-toml-selection }}, workflow-${{ matrix.cookiecutter-workflow-selection }}) checks failed!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: YAML linting (toml-${{ matrix.cookiecutter-toml-selection }}, workflow-${{ matrix.cookiecutter-workflow-selection }}) checks failed!"
8 changes: 4 additions & 4 deletions .github/workflows/.job-95-mac-maker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ jobs:

- name: Apply Profile -- Initialize Cache Locations
run: |
source "./template/{{cookiecutter.profile_slug}}/.github/scripts/task-setup-ansible-cache.sh" \
source "./template/{{cookiecutter.project_slug}}/.github/scripts/task-setup-ansible-cache.sh" \
"$(pwd)/ansible_cache" \
"$(pwd)/installer.workspace/${TEMPLATED_NAME}-${PROFILE_GENERATOR_BRANCH_NAME_BASE}/profile"
- name: Apply Profile -- Mount Ansible Cache
uses: actions/cache@v3
with:
key: ansible-${{ hashFiles('./template/{{cookiecutter.profile_slug}}/profile/requirements.yml') }}-${{ env.CACHE_TTL }}
key: ansible-${{ hashFiles('./template/{{cookiecutter.project_slug}}/profile/requirements.yml') }}-${{ env.CACHE_TTL }}
path: ansible_cache

- name: Apply Profile -- Apply Pushed Profile
Expand All @@ -60,9 +60,9 @@ jobs:
- name: Apply Profile -- Report Job Status (Success)
if: fromJSON(inputs.CONFIGURATION)._GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS == true
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: OSX ${{ matrix.os }}, profile application was successful"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":white_check_mark: OSX ${{ matrix.os }}, profile application was successful"
- name: OSX Build -- Report Job Status (Failure)
if: failure()
run: |
"./template/{{cookiecutter.profile_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: OSX ${{ matrix.os }}, profile application failed!"
"./template/{{cookiecutter.project_slug}}/.github/scripts/task-slack-notification.sh" "${NOTIFICATION}" ":x: OSX ${{ matrix.os }}, profile application failed!"
Loading

0 comments on commit 2a40efb

Please sign in to comment.