Skip to content

Commit e4b7595

Browse files
authored
Merge pull request #19 from bobuhiro11/check_pulled_images
ci: Run test.bash for pulled images
2 parents 6b48100 + 2c62172 commit e4b7595

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

.github/workflows/action.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ jobs:
1818
runs-on: ubuntu-20.04
1919
steps:
2020
- uses: actions/checkout@v2
21-
- name: Init docker-compose
21+
- name: Build Images
2222
run: |
2323
docker-compose --file docker-compose.build.yaml up -d
2424
sleep 1800
25-
- name: Build Images
26-
run: |
2725
docker-compose --file docker-compose.build.yaml logs -t --tail=100
2826
docker-compose --file docker-compose.build.yaml exec -T --user stack controller /bin/test.bash
2927
for c in controller compute-1 compute-2; do
@@ -44,3 +42,12 @@ jobs:
4442
docker commit $c bobuhiro11/containerized-devstack-$c:$tag
4543
docker push bobuhiro11/containerized-devstack-$c:$tag
4644
done
45+
- name: Test Images
46+
if: github.event_name != 'schedule'
47+
env:
48+
tag: "${{ github.ref == 'refs/heads/main' && 'latest' || github.sha }}"
49+
run: |
50+
sed -i -e "s/image:.*/&:$tag/g" docker-compose.yaml
51+
docker-compose up -d
52+
sleep 180
53+
docker-compose exec -T --user stack controller /bin/test.bash

pre-commit.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -xe
22

3-
systemctl disable devstack
3+
systemctl disable devstack.service
44

55
# Disable loading kmod for openvswitch on "ovs-ctl start"
66
sed -i -e 's/insert_mod_if_required.*return 1/#&/' /usr/share/openvswitch/scripts/ovs-ctl

test.bash

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
#!/bin/bash -xe
22

3+
nova-manage cell_v2 discover_hosts --verbose
34
openstack compute service list
5+
openstack network agent list
46
net_id=$(openstack network show private -f json 2>/dev/null | jq -r .id | tr -d "\r\n")
57
nova boot --image cirros-0.5.2-x86_64-disk --flavor m1.medium --nic net-id=$net_id testvm
6-
sleep 10
8+
sleep 15
79
nova list
10+
nova show testvm
811
nova list | grep ACTIVE
12+
nova delete testvm
13+
14+
sudo journalctl --no-pager -n 300 -eu devstack@n-cpu
15+
sudo journalctl --no-pager -n 300 -eu devstack@q-agt

0 commit comments

Comments
 (0)