Skip to content

Commit 0767fa0

Browse files
authored
Merge pull request #7 from stackhpc/zuul_ci
Zuul CI deployment
2 parents 69dec16 + 1efe475 commit 0767fa0

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

.github/workflows/pr.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: On Pull Request
3+
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
types: [opened, reopened]
8+
9+
jobs:
10+
deploy-zuul:
11+
12+
runs-on: self-hosted
13+
14+
env:
15+
ANSIBLE_FORCE_COLOR: True
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Generate kubeconfig
21+
env:
22+
KUBE: ${{secrets.KUBE}}
23+
OS_CLOUD: "smslab-stackhpc-ci"
24+
run: |
25+
mkdir -p ~/.kube
26+
echo "$KUBE" > ~/.kube/config
27+
28+
- name: Run playbook
29+
run: >
30+
ansible-playbook -i ansible/inventory ansible/run.yml
31+

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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
kubernetes

0 commit comments

Comments
 (0)