-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a scenario for testing upgrade between version
- Loading branch information
Showing
5 changed files
with
142 additions
and
2 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,6 +1,6 @@ | ||
--- | ||
name: basic | ||
on: # yamllint disable-line rule:truthy | ||
on: # yamllint disable-line rule:truthy rule:line-length | ||
push: | ||
pull_request: | ||
|
||
|
@@ -27,3 +27,56 @@ jobs: | |
run: find -iname '*.yaml' | xargs yamllint | ||
- name: verify yml files | ||
run: find -iname '*.yml' | xargs yamllint | ||
check-lava-upgrade: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: install lavacli | ||
run: sudo apt-get -y install lavacli | ||
- run: ./lavalab-gen.py boards-ci-2022.01.yaml | ||
- run: cat output/local/docker-compose.yml | ||
- name: Verify DNS query in docker | ||
run: sh .github/docker-resolv.sh | ||
- name: Build lava-docker | ||
run: cd output/local && docker-compose build | ||
- name: Launch lava-docker | ||
run: cd output/local && docker-compose up -d | ||
- name: Wait for LAVA to be started | ||
run: sh .github/workflows/wait-for-docker.sh | ||
- name: Wait for first job to be completed | ||
# yamllint disable-line rule:line-length | ||
run: lavacli --uri http://admin:[email protected]:10080/RPC2 jobs wait 1 | ||
|
||
- name: Run backup | ||
run: ./backup.sh | ||
- name: stop docker | ||
run: cd output/local && docker-compose down | ||
|
||
- name: Clean old install | ||
run: rm -r output | ||
- name: Copy backup | ||
run: cp -v backup-latest/* lava-master/backup/ | ||
- name: Run lavalab-gen | ||
run: ./lavalab-gen.py boards-ci-2023.01.yaml | ||
- name: Build lava-docker | ||
run: cd output/local && docker-compose build | ||
- name: Launch lava-docker | ||
run: cd output/local && docker-compose up -d | ||
- name: Wait for LAVA to be started | ||
run: sh .github/workflows/wait-for-docker.sh | ||
- name: Wait for first job to be completed | ||
# yamllint disable-line rule:line-length | ||
run: lavacli --uri http://admin:[email protected]:10080/RPC2 jobs wait 2 | ||
- name: Verify we still have logs | ||
# yamllint disable-line rule:line-length | ||
run: lavacli --uri http://admin:[email protected]:10080/RPC2 jobs logs 1 | ||
- name: Verify we still have logs really | ||
# yamllint disable-line rule:line-length | ||
run: lavacli --uri http://admin:[email protected]:10080/RPC2 jobs logs 1 > log1 && [[ -s log1 ]] || exit 1 | ||
- name: stop docker | ||
run: cd output/local && docker-compose down | ||
|
||
- name: restart lava-docker | ||
run: cd output/local && docker-compose up -d | ||
- name: Wait for LAVA to be started | ||
run: sh .github/workflows/wait-for-docker.sh |
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,29 @@ | ||
#!/bin/sh | ||
|
||
cd output/local | ||
|
||
TIMEOUT=0 | ||
|
||
while [ $TIMEOUT -le 1200 ] | ||
do | ||
lavacli --uri http://admin:[email protected]:10080/RPC2 devices list > devices.list | ||
if [ $? -eq 0 ];then | ||
grep -q qemu devices.list | ||
if [ $? -eq 0 ];then | ||
lavacli --uri http://admin:[email protected]:10080/RPC2 devices list | ||
# now wait for a job | ||
lavacli --uri http://admin:[email protected]:10080/RPC2 jobs list > joblist | ||
grep -q Running joblist | ||
if [ $? -eq 0 ];then | ||
exit 0 | ||
lavacli --uri http://admin:[email protected]:10080/RPC2 jobs logs --no-follow 1 | ||
else | ||
cat joblist | ||
fi | ||
fi | ||
fi | ||
docker-compose logs --tail=50 | ||
sleep 10 | ||
TIMEOUT=$((TIMEOUT+10)) | ||
done | ||
exit 1 |
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,29 @@ | ||
--- | ||
masters: | ||
- name: masterci1 | ||
version: "2022.01" | ||
host: local | ||
healthcheck_url: http://healthcheck | ||
users: | ||
- name: admin | ||
token: tokenforci | ||
password: passwordforci | ||
superuser: true | ||
staff: true | ||
tokens: | ||
- username: admin | ||
token: dfjdfkfkdjfkdsjfslforci | ||
description: no description | ||
slaves: | ||
- name: lab-ci-0 | ||
version: "2022.01" | ||
host: local | ||
remote_master: masterci1 | ||
remote_user: admin | ||
use_overlay_server: false | ||
use_tftp: false | ||
host_healthcheck: true | ||
|
||
boards: | ||
- name: qemu-01 | ||
type: qemu |
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,29 @@ | ||
--- | ||
masters: | ||
- name: masterci1 | ||
version: "2023.01" | ||
host: local | ||
healthcheck_url: http://healthcheck | ||
users: | ||
- name: admin | ||
token: tokenforci | ||
password: passwordforci | ||
superuser: true | ||
staff: true | ||
tokens: | ||
- username: admin | ||
token: dfjdfkfkdjfkdsjfslforci | ||
description: no description | ||
slaves: | ||
- name: lab-ci-0 | ||
version: "2023.01" | ||
host: local | ||
remote_master: masterci1 | ||
remote_user: admin | ||
use_overlay_server: false | ||
use_tftp: false | ||
host_healthcheck: true | ||
|
||
boards: | ||
- name: qemu-01 | ||
type: qemu |
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