Skip to content

Commit

Permalink
Enable zuul builds
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <[email protected]>
  • Loading branch information
berendt committed Sep 15, 2023
1 parent 1e6112d commit e358f57
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
27 changes: 17 additions & 10 deletions .zuul.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
---
- job:
name: k8s-capi-images-build
abstract: true
parent: base
pre-run: playbooks/pre.yml
run: playbooks/build.yml
required-projects:
- kubernetes-sigs/image-builder

- job:
name: k8s-capi-images-build-124
parent: k8s-capi-images-build
vars:
kubernetes_version: 124

- job:
name: k8s-capi-images-build-125
parent: k8s-capi-images-build
Expand All @@ -25,17 +20,29 @@
vars:
kubernetes_version: 126

- job:
name: k8s-capi-images-build-127
parent: k8s-capi-images-build
vars:
kubernetes_version: 127

- job:
name: k8s-capi-images-build-128
parent: k8s-capi-images-build
vars:
kubernetes_version: 128

- project:
merge-mode: squash-merge
default-branch: main
check:
jobs:
- flake8
- yamllint
gate:
jobs:
- flake8
- yamllint
- k8s-capi-images-build-125
- k8s-capi-images-build-126
- k8s-capi-images-build-127
- k8s-capi-images-build-128
periodic-daily:
jobs:
- flake8
Expand Down
10 changes: 7 additions & 3 deletions playbooks/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
connection: local

vars:
repo_path: "/home/ubuntu/src/github.com"

extra_vars_openstack_directory: "{{ repo_path }}/osism/k8s-capi-images"
working_directory: "{{ repo_path }}/kubernetes-sigs/image-builder/images/capi"

distro: "{{ lookup('ansible.builtin.env', 'DISTRO', default='ubuntu') }}"
distro_version: "{{ lookup('ansible.builtin.env', 'DISTRO_VERSION', default='2204') }}"
extra_vars_openstack_directory: "{{ repo_path }}/osism/k8s-capi-images"
kubernetes_version: "{{ lookup('ansible.builtin.env', 'KUBERNETES_VERSION', default='124') }}"
repo_path: "{{ ansible_user_dir|default('~') }}/src/github.com"
working_directory: "{{ repo_path }}/kubernetes-sigs/image-builder/images/capi"

tasks:
- debug: msg="{{ ansible_user_dir }}"

- name: Run build script
ansible.builtin.shell:
executable: /bin/bash
Expand Down
3 changes: 1 addition & 2 deletions playbooks/pre.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
---
- name: Pre tasks - part 1
# hosts: all
hosts: localhost
connection: local

vars:
working_directory: "{{ zuul.project.src_dir|default('~') }}"
working_directory: "{{ ansible_user_dir }}/src/github.com/osism/k8s-capi-images"

tasks:
- name: Run install script
Expand Down

0 comments on commit e358f57

Please sign in to comment.