Skip to content

Commit 3e87bc0

Browse files
committed
re-introduce basic ci/cd
1 parent 1e21f0d commit 3e87bc0

File tree

2 files changed

+60
-19
lines changed

2 files changed

+60
-19
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,23 @@ name: CI for chi-in-a-box script
44
on:
55
push:
66
branches:
7-
- master
7+
- main
8+
- stable/*
89
pull_request:
910
branches:
10-
- master
11+
- main
12+
- stable/*
13+
workflow_dispatch: {}
1114

1215
jobs:
13-
test:
14-
name: test cc-ansible
15-
runs-on: [self-hosted, kvm, ciab, ubuntu-18.04]
16-
env:
17-
CC_ANSIBLE_SITE: /opt/site-config
18-
defaults:
19-
run:
20-
shell: bash
16+
ci:
17+
name: basic setup checks
18+
runs-on: [ ubuntu-22.04 ]
2119
steps:
22-
- name: Checkout code base
23-
uses: actions/checkout@v2
24-
- name: init site-config
25-
run: "./cc-ansible init"
26-
continue-on-error: true
27-
- run: "./cc-ansible bootstrap-servers"
28-
- run: "./cc-ansible prechecks"
29-
- run: "./cc-ansible pull"
30-
- run: "./cc-ansible genconfig"
20+
- name: checkout chi-in-a-box
21+
uses: actions/checkout@v5
22+
with:
23+
submodules: true
24+
25+
- name: run test script
26+
run: tests/setup_ciab.sh

tests/setup_ciab.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/bin/bash
2+
3+
# This script sets up chi-in-a-box for testing
4+
# It assumes that you have already cloned the chi-in-a-box repository
5+
6+
# Rather than assume anything about the network interfaces, it creates dummy interfaces
7+
# for external and internal api networks
8+
9+
# Features not tested!
10+
# - federated identity
11+
# - baremetal nodes
12+
# - floating IPs
13+
14+
15+
setup_networking () {
16+
# Create dummy interfaces
17+
18+
19+
# kolla public/external iface
20+
sudo ip link add veth_publica type veth peer veth_publicb
21+
sudo ip addr add 192.168.200.10/24 dev veth_publica
22+
sudo ip link set veth_publica up
23+
sudo ip link set veth_publicb up
24+
25+
# kolla internal iface
26+
sudo ip link add veth_inta type veth peer veth_intb
27+
sudo ip addr add 10.10.10.10/24 dev veth_inta
28+
sudo ip link set veth_inta up
29+
sudo ip link set veth_intb up
30+
31+
# neutron external iface
32+
sudo ip link add veth_neutrona type veth peer veth_neutronb
33+
sudo ip link set veth_neutrona up
34+
sudo ip link set veth_neutronb up
35+
}
36+
37+
### Start main section
38+
39+
setup_networking
40+
41+
# setup venv and install deps
42+
./cc-ansible install_deps
43+
44+
# initialize cc-ansible site
45+
./cc-ansible init --site ../site-config

0 commit comments

Comments
 (0)