This repository has been archived by the owner on Jun 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(IMPORT): import role from legacy provisioner project
- Loading branch information
1 parent
46b5418
commit ed024df
Showing
26 changed files
with
397 additions
and
543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
--- | ||
# .ansible-lint | ||
skip_list: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"_template": "https://github.com/shared-vision-solutions/ansible-workbench.git", | ||
"author": "Niall Byrne", | ||
"company": "Shared Vision Solutions", | ||
"description": "Ansible role that wraps geerlingguy.homebrew in a retry loop to deal with connectivity issues.", | ||
"email": "[email protected]", | ||
"galaxy_namespace_slug": "osx_provisioner", | ||
"galaxy_role_slug": "homebrew_retry", | ||
"github_handle": "osx-provisioner", | ||
"project_name": "role-homebrew-retry", | ||
"project_slug": "role-homebrew-retry" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -o pipefail | ||
|
||
main() { | ||
|
||
pip install poetry | ||
poetry install | ||
|
||
} | ||
|
||
main "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,6 @@ main() { | |
} | ||
|
||
main | ||
|
||
# Create Empty Results File | ||
touch /tmp/results.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,55 +10,21 @@ on: | |
|
||
jobs: | ||
|
||
build: | ||
documentation_test: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.7] | ||
|
||
steps: | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Build -- Checkout Repository | ||
- name: Documentation Test -- Checkout Repository | ||
uses: actions/checkout@v1 | ||
|
||
- name: Build -- Setup Environment | ||
- name: Documentation Test -- Setup Environment | ||
run: | | ||
source ./.github/scripts/setup.sh | ||
env: | ||
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
- name: Build -- Install Requirements | ||
run: | | ||
pip install poetry | ||
poetry install | ||
- name: Build -- Run Linter | ||
run: | | ||
poetry run molecule lint | ||
- name: Build -- Run docker1 Scenario | ||
run: | | ||
poetry run molecule test -s docker1 | ||
- name: Build -- Report Job Status (Success) | ||
run: | | ||
./.github/scripts/notifications.sh "${NOTIFICATION}" "build was successful!" | ||
- name: Build -- Report Job Status (Failure) | ||
if: failure() | ||
run: | | ||
./.github/scripts/notifications.sh "${NOTIFICATION}" "build has failed!" | ||
documentation_test: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Documentation Test -- Checkout Repository | ||
uses: actions/checkout@v1 | ||
- name: Documentation Test -- Documentation Validation | ||
uses: gaurav-nelson/[email protected] | ||
with: | ||
|
@@ -67,70 +33,124 @@ 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!" | ||
security_test: | ||
molecule_lint: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.7] | ||
python-version: [3.8] | ||
|
||
steps: | ||
- name: Security Test -- Set up Python ${{ matrix.python-version }} | ||
|
||
- name: Molecule Lint -- Checkout Repository | ||
uses: actions/checkout@v1 | ||
|
||
- name: Molecule Lint -- Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Security Test -- Checkout Repository | ||
uses: actions/checkout@v1 | ||
|
||
- name: Security Test -- Run Gitleaks | ||
uses: zricethezav/gitleaks-action@master | ||
- name: Molecule Lint -- Setup Environment | ||
run: | | ||
source ./.github/scripts/setup.sh | ||
env: | ||
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
- name: Security Test -- Check Dependencies | ||
- name: Molecule Lint -- Install Requirements | ||
run: | | ||
pip install safety poetry | ||
pip install --upgrade pip | ||
pip install poetry | ||
poetry install | ||
safety check | ||
- name: Shellcheck -- Report Job Status on Success | ||
- name: Molecule Lint -- Run Linter | ||
run: | | ||
poetry run molecule lint | ||
- name: Molecule Lint -- Report Job Status (Success) | ||
run: | | ||
./.github/scripts/notifications.sh "${NOTIFICATION}" "security checks succeeded!" | ||
- name: Shellcheck -- Report Job Status on Failure | ||
./.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}" "security checks failed!" | ||
release: | ||
needs: [build, documentation_test, security_test] | ||
|
||
runs-on: ubuntu-latest | ||
./.github/scripts/notifications.sh "${NOTIFICATION}" ":x: molecule linting has failed!" | ||
osx_build: | ||
|
||
runs-on: macos-${{ matrix.os }} | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
os: [10.15] | ||
platform: [x86_64] | ||
python-version: [3.8.10] | ||
scenario: ["one_of_each"] | ||
|
||
steps: | ||
- name: Release -- Checkout | ||
- name: OSX Build -- Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Release -- Setup Environment | ||
|
||
- name: OSX Build -- Setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: OSX Build -- Setup Environment | ||
run: | | ||
source ./.github/scripts/setup.sh | ||
source ./.github/scripts/build.sh | ||
env: | ||
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
- name: Release -- Prepare Content | ||
|
||
- name: OSX Build -- Molecule Scenario | ||
run: | | ||
touch /tmp/results.yml | ||
poetry run molecule test -s "${SCENARIO}" | ||
env: | ||
SCENARIO: ${{ matrix.scenario}} | ||
|
||
- name: OSX Build -- Report Job Status (Success) | ||
run: | | ||
./.github/scripts/notifications.sh "${NOTIFICATION}" ":white_check_mark: OSX ${{ matrix.os }}, molecule test scenario '${SCENARIO}' was successful" | ||
env: | ||
SCENARIO: ${{ matrix.scenario}} | ||
|
||
- name: OSX Build -- Report Job Status (Failure) | ||
if: failure() | ||
run: | | ||
./.github/scripts/notifications.sh "${NOTIFICATION}" ":x: OSX ${{ matrix.os }}, molecule test scenario '${SCENARIO}' failed!" | ||
env: | ||
SCENARIO: ${{ matrix.scenario}} | ||
|
||
release: | ||
needs: [documentation_test, molecule_lint, osx_build, security_test] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Release -- Checkout Repository | ||
if: contains(github.ref, '/tags/v') | ||
uses: actions/checkout@v1 | ||
|
||
- name: Release -- Setup Environment | ||
if: contains(github.ref, '/tags/v') | ||
run: | | ||
source ./.github/scripts/setup.sh | ||
NEWTAG=${BRANCH_OR_TAG} | ||
echo "NEWTAG=${NEWTAG}" >> $GITHUB_ENV | ||
echo "{}" > package.json | ||
env: | ||
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
- name: Release -- Generate Changelog | ||
if: contains(github.ref, '/tags/v') | ||
uses: scottbrenner/generate-changelog-action@1.0.3 | ||
uses: scottbrenner/generate-changelog-action@v1.3.3 | ||
id: Changelog | ||
env: | ||
REPO: ${{ github.repository }} | ||
|
@@ -146,14 +166,91 @@ jobs: | |
${{ steps.Changelog.outputs.changelog }} | ||
draft: true | ||
prerelease: false | ||
|
||
- name: Release -- Report Job Status (Success) | ||
if: contains(github.ref, '/tags/v') | ||
run: | | ||
./.github/scripts/notifications.sh \ | ||
"${NOTIFICATION}" \ | ||
"automated release has been created: https://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: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
|
||
- name: Security Test -- Checkout Repository | ||
uses: actions/checkout@v1 | ||
- name: Security Test -- Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Security Test -- Setup Environment | ||
run: | | ||
source ./.github/scripts/setup.sh | ||
env: | ||
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
- name: Security Test -- Run Gitleaks | ||
uses: zricethezav/gitleaks-action@master | ||
|
||
- name: Security Test -- Check Dependencies | ||
run: | | ||
pip install safety poetry | ||
pip install --upgrade pip | ||
poetry install | ||
safety check | ||
- name: Security Test -- Report Job Status on Success | ||
run: | | ||
./.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}" ":x: security checks failed!" | ||
workflow_lint: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
|
||
- name: Workflow Lint -- Checkout Repository | ||
uses: actions/checkout@v1 | ||
- name: Workflow Lint -- Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Workflow Lint -- Setup Environment | ||
run: | | ||
source ./.github/scripts/setup.sh | ||
env: | ||
WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
- name: Workflow Lint -- Install Requirements | ||
run: | | ||
pip install yamllint | ||
- name: Workflow Lint -- Run Linter | ||
run: | | ||
yamllint .github/workflows -f standard | ||
- name: Workflow Lint -- Report Job Status (Success) | ||
run: | | ||
./.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}" ":x: workflow linting has failed!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.