Skip to content

Commit 8abbc29

Browse files
committed
Zuul CI deployment
1 parent 69dec16 commit 8abbc29

File tree

4 files changed

+55
-0
lines changed

4 files changed

+55
-0
lines changed

.github/workflows/pr.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
KUBE: ${{secrets.KUBECONFIG}}
28+
OS_CLOUD: "smslab-stackhpc-ci"
29+
run: |
30+
mkdir -p ~/.config/openstack/
31+
echo "$CLOUDS_YAML" > ~/.config/openstack/clouds.yaml
32+
mkdir -p ~/.kube
33+
echo "$KUBE" > ~/.kube/config
34+
ls -l ~/.kube/config
35+
36+
- name: Run playbook
37+
run: >
38+
ansible-playbook -i ansible/inventory ansible/run.yml
39+

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)