forked from tim/k3s-ansible
Compare commits
57 Commits
v1.24.11+k
...
self-hoste
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ae9ee82f0 | ||
|
|
5380f93b64 | ||
|
|
a414453ad4 | ||
|
|
23c5d9ec89 | ||
|
|
6b339e1985 | ||
|
|
a031807660 | ||
|
|
7dd305aabc | ||
|
|
500931e2fd | ||
|
|
cf357cf164 | ||
|
|
215e0d10ed | ||
|
|
c6ed680dc1 | ||
|
|
8343a6199e | ||
|
|
b524f97552 | ||
|
|
f741040e44 | ||
|
|
09bc628ba6 | ||
|
|
71ff6b86cd | ||
|
|
23729ddbbe | ||
|
|
e254c407f0 | ||
|
|
713b4694e1 | ||
|
|
952d513124 | ||
|
|
dd1e596332 | ||
|
|
6af47f96d0 | ||
|
|
664deec6c3 | ||
|
|
646459e7f5 | ||
|
|
64242d9729 | ||
|
|
f4864ddb64 | ||
|
|
6a83cde0c6 | ||
|
|
77ac928c0d | ||
|
|
8300a7aaac | ||
|
|
bdc6af5f46 | ||
|
|
dc8276157a | ||
|
|
37f0cb11d2 | ||
|
|
68e7c77b22 | ||
|
|
d82c4feac8 | ||
|
|
9217d8607b | ||
|
|
fbc15aa1a1 | ||
|
|
b55ec046ad | ||
|
|
b3cc178045 | ||
|
|
13be424187 | ||
|
|
d9cecd5364 | ||
|
|
afb96dbee2 | ||
|
|
30ffc69192 | ||
|
|
94e385c28e | ||
|
|
dbb2cda17a | ||
|
|
d24cdb97db | ||
|
|
5bebec930b | ||
|
|
ac52acdec1 | ||
|
|
105b2c2f1e | ||
|
|
d20f485fca | ||
|
|
f9bb9dabae | ||
|
|
6f15ef260e | ||
|
|
de1966fe02 | ||
|
|
fc823122d8 | ||
|
|
2f8d94bb5e | ||
|
|
9c3814ce72 | ||
|
|
0e60f4643b | ||
|
|
bb20514a6a |
7
.github/download-boxes.sh
vendored
7
.github/download-boxes.sh
vendored
@@ -5,10 +5,15 @@
|
||||
# already present on the system.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
YQ_VERSION=v4.29.2
|
||||
YQ_BINARY=yq_linux_amd64
|
||||
GIT_ROOT=$(git rev-parse --show-toplevel)
|
||||
PROVIDER=virtualbox
|
||||
|
||||
# get yq used for filtering
|
||||
sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY} -O /usr/bin/yq &&\
|
||||
sudo chmod +x /usr/bin/yq
|
||||
|
||||
# Read all boxes for all platforms from the "molecule.yml" files
|
||||
all_boxes=$(cat "${GIT_ROOT}"/molecule/*/molecule.yml |
|
||||
yq -r '.platforms[].box' | # Read the "box" property of each node under "platforms"
|
||||
|
||||
49
.github/workflows/lint.yml
vendored
49
.github/workflows/lint.yml
vendored
@@ -5,20 +5,42 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
paths-ignore:
|
||||
- '**/README.md'
|
||||
jobs:
|
||||
pre-commit-ci:
|
||||
name: Pre-Commit
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: self-hosted
|
||||
env:
|
||||
PYTHON_VERSION: "3.10"
|
||||
|
||||
steps:
|
||||
- name: Check out the codebase
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # 3.0.2
|
||||
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@b55428b1882923874294fa556849718a1d7f2ca5 #4.0.2
|
||||
with:
|
||||
python-version: "3.x"
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # 4.3.0
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: 'pip' # caching pip dependencies
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache Ansible
|
||||
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11
|
||||
with:
|
||||
path: ~/.ansible/collections
|
||||
key: ${{ runner.os }}-ansible-${{ hashFiles('collections/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ansible-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -35,4 +57,17 @@ jobs:
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Run pre-commit
|
||||
uses: pre-commit/action@v3.0.0
|
||||
uses: pre-commit/action@646c83fcd040023954eafda54b4db0192ce70507 # 3.0.0
|
||||
|
||||
ensure-pinned-actions:
|
||||
name: Ensure SHA Pinned Actions
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # 3.0.2
|
||||
- name: Ensure SHA pinned actions
|
||||
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@6ca5574367befbc9efdb2fa25978084159c5902d # 1.3.0
|
||||
with:
|
||||
allowlist: |
|
||||
aws-actions/
|
||||
docker/login-action
|
||||
|
||||
55
.github/workflows/test.yml
vendored
55
.github/workflows/test.yml
vendored
@@ -10,7 +10,7 @@ on:
|
||||
jobs:
|
||||
molecule:
|
||||
name: Molecule
|
||||
runs-on: macos-12
|
||||
runs-on: self-hosted
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
@@ -21,10 +21,39 @@ jobs:
|
||||
fail-fast: false
|
||||
env:
|
||||
PYTHON_VERSION: "3.10"
|
||||
VAGRANT_DEFAULT_PROVIDER: virtualbox
|
||||
|
||||
steps:
|
||||
- name: Check out the codebase
|
||||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # 3.0.2
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Install Virtual Box from Oracle
|
||||
run: |
|
||||
echo "::group::Virtual Box"
|
||||
wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg
|
||||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee -a /etc/apt/sources.list.d/virtualbox.list
|
||||
sudo apt update && sudo apt install -y linux-headers-generic linux-headers-5.15.0-52-generic build-essential dkms virtualbox-dkms virtualbox-6.1
|
||||
echo "::endgroup::"
|
||||
echo "::group::Virtual Box Test"
|
||||
vboxmanage --version
|
||||
sudo /sbin/vboxconfig
|
||||
sudo modprobe vboxdrv
|
||||
vboxmanage --version
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Install Vagrant
|
||||
run: |
|
||||
echo "::group::Install Vagrant"
|
||||
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
|
||||
sudo apt update && sudo apt install -y vagrant
|
||||
vagrant version
|
||||
vagrant plugin list
|
||||
vagrant plugin install vagrant-vbguest
|
||||
vagrant plugin list
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Configure VirtualBox
|
||||
run: |-
|
||||
@@ -34,8 +63,16 @@ jobs:
|
||||
* fdad:bad:ba55::/64
|
||||
EOF
|
||||
|
||||
- name: Cache pip
|
||||
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('./requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache Vagrant boxes
|
||||
uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77 # 3.0.8
|
||||
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # 3.0.11
|
||||
with:
|
||||
path: |
|
||||
~/.vagrant.d/boxes
|
||||
@@ -50,14 +87,20 @@ jobs:
|
||||
run: ./.github/download-boxes.sh
|
||||
|
||||
- name: Set up Python ${{ env.PYTHON_VERSION }}
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@13ae5bb136fac2878aff31522b9efb785519f984 # 4.3.0
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: 'pip' # caching pip dependencies
|
||||
|
||||
- name: Install dependencies
|
||||
run: >-
|
||||
python3 -m pip install --upgrade pip &&
|
||||
run: |
|
||||
echo "::group::Upgrade pip"
|
||||
python3 -m pip install --upgrade pip
|
||||
echo "::endgroup::"
|
||||
|
||||
echo "::group::Install Python requirements from requirements.txt"
|
||||
python3 -m pip install -r requirements.txt
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Test with molecule
|
||||
run: molecule test --scenario-name ${{ matrix.scenario }}
|
||||
@@ -70,7 +113,7 @@ jobs:
|
||||
|
||||
- name: Upload log files
|
||||
if: always() # do this even if a step before has failed
|
||||
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # 3.1.0
|
||||
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # 3.1.1
|
||||
with:
|
||||
name: logs
|
||||
path: |
|
||||
|
||||
Reference in New Issue
Block a user