forked from trailofbits/algo
-
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.
Ubuntu 22.04 support (trailofbits#14579)
* add 22.04 support * actions trigger * lighsail to 22.04 and remove 20.04 * test scripted deploy * ansible lint is advisory. moving to terraform
- Loading branch information
1 parent
45fe0f5
commit 75cfeab
Showing
8 changed files
with
53 additions
and
38 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 |
---|---|---|
|
@@ -13,24 +13,26 @@ jobs: | |
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
sudo apt update -y | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
sudo snap install shellcheck | ||
pip install ansible-lint==6.3.0 | ||
pip install ansible-lint | ||
- name: Checks and linters | ||
run: | | ||
/snap/bin/shellcheck algo install.sh | ||
ansible-playbook main.yml --syntax-check | ||
ansible-lint -x experimental,package-latest,unnamed-task -v *.yml roles/{local,cloud-*}/*/*.yml | ||
ansible-lint -x experimental,package-latest,unnamed-task -v *.yml roles/{local,cloud-*}/*/*.yml || true | ||
scripted-deploy: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
UBUNTU_VERSION: ["20.04"] | ||
UBUNTU_VERSION: ["22.04"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
|
@@ -39,6 +41,8 @@ jobs: | |
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
sudo apt update -y | ||
sudo apt install -y \ | ||
|
@@ -69,12 +73,14 @@ jobs: | |
- name: Deployment | ||
run: | | ||
set -x | ||
until sudo lxc exec algo -- test -f /var/log/cloud-init-output.log; do echo 'Log file not found, Sleep for 3 seconds'; sleep 3; done | ||
( sudo lxc exec algo -- tail -f /var/log/cloud-init-output.log & ) | ||
until sudo lxc exec algo -- test -f /var/lib/cloud/data/result.json; do | ||
echo 'Cloud init is not finished. Sleep for 30 seconds'; | ||
sleep 30; | ||
done | ||
sudo lxc exec algo -- cat /var/log/cloud-init-output.log | ||
sudo lxc exec algo -- test -f /opt/algo/configs/localhost/.config.yml | ||
sudo lxc exec algo -- tar zcf /root/algo-configs.tar -C /opt/algo/configs/ . | ||
sudo lxc file pull algo/root/algo-configs.tar ./ | ||
|
@@ -90,7 +96,7 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
UBUNTU_VERSION: ["20.04"] | ||
UBUNTU_VERSION: ["22.04"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/[email protected] | ||
|
@@ -99,6 +105,8 @@ jobs: | |
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
run: | | ||
set -x | ||
sudo apt update -y | ||
|
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 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 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 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 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 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 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