-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Deploy from CI
committed
Apr 3, 2024
0 parents
commit 1172783
Showing
73 changed files
with
15,290 additions
and
0 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
*.yml linguist-detectable=true |
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,50 @@ | ||
--- | ||
name: mdbook | ||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- 'docs/**' | ||
- 'README.md' | ||
pull_request: | ||
paths: | ||
- 'docs/**' | ||
- 'README.md' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install latest mdbook | ||
run: | | ||
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name') | ||
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz" | ||
mkdir mdbook | ||
curl -sSL $url | tar -xz --directory=./mdbook | ||
echo `pwd`/mdbook >> $GITHUB_PATH | ||
- name: Build mdbook | ||
run: | | ||
cd docs | ||
mdbook build | ||
- name: Deploy to GitHub Pages | ||
run: | | ||
git worktree add gh-pages | ||
git config user.name "Deploy from CI" | ||
git config user.email "" | ||
cd gh-pages | ||
# Delete the ref to avoid keeping history. | ||
git update-ref -d refs/heads/gh-pages | ||
rm -rf * | ||
mv ../docs/book/* . | ||
git add . | ||
git commit -m "Deploy $GITHUB_SHA to gh-pages" | ||
git push --force --set-upstream origin gh-pages |
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,41 @@ | ||
name: molecule | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
molecule: | ||
runs-on: macos-10.15 | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Cache pip dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: pip-ansible | ||
|
||
- name: Cache Vagrant box | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.vagrant.d/boxes | ||
key: ${{ runner.os }}-vagrant-${{ hashFiles('ansible/molecule/common/molecule.yml') }} | ||
restore-keys: | | ||
${{ runner.os }}-vagrant- | ||
- name: Install dependencies | ||
run: | | ||
pip install -q --disable-pip-version-check wheel | ||
pip install -q --disable-pip-version-check ansible molecule-vagrant | ||
env: | ||
PIP_CACHE_DIR: ~/.cache/pip | ||
|
||
- name: Test common | ||
run: molecule test -s common | ||
working-directory: ansible | ||
env: | ||
ANSIBLE_FORCE_COLOR: "True" |
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,22 @@ | ||
--- | ||
name: pre-commit | ||
on: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout codebase | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Pre-commit | ||
uses: pre-commit/action@v3.0.0 | ||
with: | ||
extra_args: --all-files |
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,36 @@ | ||
.cache/* | ||
.venv/* | ||
cloud-config | ||
|
||
# secrets | ||
certs/* | ||
!certs/.gitkeep | ||
*.crt | ||
secrets.* | ||
vault.txt | ||
|
||
# ansible | ||
**/test.yml | ||
**/testca/vault/vault* | ||
|
||
# terraform | ||
**/.terraform/* | ||
*.tfstate | ||
*.tfstate.* | ||
*.tfvars | ||
tf_ansible_* | ||
|
||
# packer | ||
*.pkrvars.hcl | ||
**/builds/* | ||
|
||
# vagrant | ||
**/.vagrant/* | ||
|
||
# nomad | ||
input.vars | ||
|
||
# docs | ||
**/site/* | ||
**/book/* | ||
**/public/* |
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,9 @@ | ||
[extend] | ||
useDefault = true | ||
|
||
[allowlist] | ||
# testing CA for Vault | ||
paths = [ | ||
'''ansible/molecule/vault/testca''', | ||
'''ansible/molecule/vault/testca\/\.*''', | ||
] |
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,52 @@ | ||
default_stages: [push, commit] | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-merge-conflict | ||
- id: check-added-large-files | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: detect-private-key | ||
exclude: ansible/molecule/vault/testca | ||
|
||
- repo: https://github.com/zricethezav/gitleaks | ||
rev: v8.18.0 | ||
hooks: | ||
- id: gitleaks-docker | ||
|
||
- repo: https://github.com/antonbabenko/pre-commit-terraform | ||
rev: v1.83.5 | ||
hooks: | ||
- id: terraform_fmt | ||
args: | ||
- --args=-diff | ||
- --args=-recursive | ||
- id: terraform_validate | ||
|
||
- repo: local | ||
hooks: | ||
- id: packer_fmt | ||
name: Packer fmt | ||
description: Rewrites all Packer files in canonical format | ||
language: script | ||
entry: ./bin/packer-fmt | ||
files: (\.pkr\.(hcl|json)|\.pkrvars\.hcl)$ | ||
require_serial: true | ||
|
||
- repo: https://github.com/gruntwork-io/pre-commit | ||
rev: v0.1.22 | ||
hooks: | ||
- id: packer-validate | ||
|
||
# - repo: https://github.com/ansible-community/ansible-lint | ||
# rev: v6.22.0 | ||
# hooks: | ||
# - id: ansible-lint | ||
# entry: ansible-lint -c ansible/.ansible-lint ansible | ||
# pass_filenames: false |
Oops, something went wrong.