Skip to content

Commit 3b157eb

Browse files
committed
Zuul CI deployment
1 parent 69dec16 commit 3b157eb

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

.github/workflows/pr.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: On Pull Request
3+
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
types: [opened, reopened]
8+
9+
jobs:
10+
run-ansible:
11+
12+
runs-on: ubuntu-latest
13+
14+
env:
15+
ANSIBLE_FORCE_COLOR: True
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Install pip dependencies
21+
run: |
22+
pip install -r test-requirements.txt
23+
24+
- name: Generate kubeconfig
25+
env:
26+
CLOUDS_YAML: ${{secrets.CLOUDS}}
27+
OS_CLOUD: "smslab-stackhpc-ci"
28+
run: |
29+
mkdir -p ~/.config/openstack/
30+
echo "$CLOUDS_YAML" > ~/.config/openstack/clouds.yaml
31+
openstack -vvv coe cluster config stackhpc-infra
32+
33+
- name: Run playbook
34+
run: >
35+
ansible-playbook -i ansible/inventory ansible/run.yml
36+

ansible/inventory/hosts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
localhost ansible_connection=local

ansible/run.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
- name: Ensure Zuul is configured
3+
gather_facts: false
4+
hosts: localhost
5+
6+
tasks:
7+
- name: Ensure Zuul namespace is created
8+
kubernetes.core.k8s:
9+
name: zuul
10+
api_version: v1
11+
kind: Namespace
12+
state: present

test-requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
kubernetes
2+
python-magnumclient
3+
python-openstackclient

0 commit comments

Comments
 (0)