wheels: build wheels for master branch
We need to build wheels for the master branch since Tempest is
branchless so we'll use them for building those images.
Sem-Ver: bugfix
Change-Id: I95d1ac8c64b0a3b21a4dfe751e9c58945d08c0bc
diff --git a/releasenotes/notes/add-master-wheels-3f8e8de9d4988472.yaml b/releasenotes/notes/add-master-wheels-3f8e8de9d4988472.yaml
new file mode 100644
index 0000000..a4b5576
--- /dev/null
+++ b/releasenotes/notes/add-master-wheels-3f8e8de9d4988472.yaml
@@ -0,0 +1,3 @@
+---
+fixes:
+ - Added wheels for master branches to allow for building Tempest images.
diff --git a/roles/build_openstack_requirements/tasks/main.yml b/roles/build_openstack_requirements/tasks/main.yml
index eb9c3cb..46d9a80 100644
--- a/roles/build_openstack_requirements/tasks/main.yml
+++ b/roles/build_openstack_requirements/tasks/main.yml
@@ -33,8 +33,11 @@
- name: Add the Ubuntu Cloud Archive repository
become: true
ansible.builtin.apt_repository:
- repo: deb http://ubuntu-cloud.archive.canonical.com/ubuntu focal-updates/wallaby main
+ repo: deb http://ubuntu-cloud.archive.canonical.com/ubuntu {{ ansible_distribution_release }}-updates/{{ _uca_release }} main
state: present
+ vars:
+ # NOTE(mnaser): If we're building master, we'll use the latest possible Ubuntu cloud archive.
+ _uca_release: "{{ (build_openstack_requirements_release == 'master') | ternary('yoga', build_openstack_requirements_release) }}"
- name: Install build requirements
become: true
@@ -49,6 +52,7 @@
- libssl-dev
- libsystemd-dev
- libvirt-dev
+ - pkg-config
state: present
- name: Remove certain dependencies from upper-constraints.txt
diff --git a/zuul.d/wheels-master.yaml b/zuul.d/wheels-master.yaml
new file mode 100644
index 0000000..ebd4f66
--- /dev/null
+++ b/zuul.d/wheels-master.yaml
@@ -0,0 +1,66 @@
+# Copyright (c) 2022 VEXXHOST, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+
+- job:
+ name: ansible-collection-atmosphere-build-wheels-master
+ parent: ansible-collection-atmosphere-build-wheels
+ files: &build-wheels-files
+ - roles/build_openstack_requirements/.*
+ - zuul.d/wheels-master.yaml
+ vars:
+ build_openstack_requirements_release: master
+
+- job:
+ name: ansible-collection-atmosphere-build-wheels-master-amd64
+ parent: ansible-collection-atmosphere-build-wheels-master
+ nodeset: ubuntu-focal
+
+- job:
+ name: ansible-collection-atmosphere-build-wheels-master-aarch64
+ parent: ansible-collection-atmosphere-build-wheels-master
+ nodeset: ubuntu-focal-arm64
+
+- job:
+ name: ansible-collection-atmosphere-merge-wheels-master
+ parent: ansible-collection-atmosphere-merge-wheels
+ files: *build-wheels-files
+ dependencies:
+ - ansible-collection-atmosphere-build-wheels-master-amd64
+ - ansible-collection-atmosphere-build-wheels-master-aarch64
+ provides:
+ - ansible-collection-atmosphere-wheels-master
+ vars:
+ build_openstack_requirements_release: master
+
+- job:
+ name: ansible-collection-atmosphere-promote-wheels-master
+ parent: ansible-collection-atmosphere-promote-wheels
+ files: *build-wheels-files
+ vars:
+ artifact_extra_name: wheels-master
+
+- project:
+ check:
+ jobs:
+ - ansible-collection-atmosphere-build-wheels-master-amd64
+ - ansible-collection-atmosphere-build-wheels-master-aarch64
+ - ansible-collection-atmosphere-merge-wheels-master
+ gate:
+ jobs:
+ - ansible-collection-atmosphere-build-wheels-master-amd64
+ - ansible-collection-atmosphere-build-wheels-master-aarch64
+ - ansible-collection-atmosphere-merge-wheels-master
+ promote:
+ jobs:
+ - ansible-collection-atmosphere-promote-wheels-master
\ No newline at end of file
diff --git a/zuul.d/wheels-wallaby.yaml b/zuul.d/wheels-wallaby.yaml
index 342025d..bb9c41a 100644
--- a/zuul.d/wheels-wallaby.yaml
+++ b/zuul.d/wheels-wallaby.yaml
@@ -15,7 +15,8 @@
- job:
name: ansible-collection-atmosphere-build-wheels-wallaby
parent: ansible-collection-atmosphere-build-wheels
- files:
+ files: &build-wheels-files
+ - roles/build_openstack_requirements/.*
- zuul.d/wheels-wallaby.yaml
vars:
build_openstack_requirements_release: wallaby
@@ -33,6 +34,7 @@
- job:
name: ansible-collection-atmosphere-merge-wheels-wallaby
parent: ansible-collection-atmosphere-merge-wheels
+ files: *build-wheels-files
dependencies:
- ansible-collection-atmosphere-build-wheels-wallaby-amd64
- ansible-collection-atmosphere-build-wheels-wallaby-aarch64
@@ -44,6 +46,7 @@
- job:
name: ansible-collection-atmosphere-promote-wheels-wallaby
parent: ansible-collection-atmosphere-promote-wheels
+ files: *build-wheels-files
vars:
artifact_extra_name: wheels-wallaby
diff --git a/zuul.d/wheels.yaml b/zuul.d/wheels.yaml
index fb3b68d..9c3c5fc 100644
--- a/zuul.d/wheels.yaml
+++ b/zuul.d/wheels.yaml
@@ -21,8 +21,6 @@
- zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/run.yml
post-run:
- zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/post-run.yml
- files: &build-wheels-files
- - roles/build_openstack_requirements/.*
vars:
build_openstack_requirements_wheels_directory: /tmp
@@ -33,7 +31,6 @@
- zuul.d/playbooks/ansible-collection-atmosphere-merge-wheels/run.yml
post-run:
- zuul.d/playbooks/ansible-collection-atmosphere-merge-wheels/post-run.yml
- files: *build-wheels-files
- job:
name: ansible-collection-atmosphere-promote-wheels
@@ -42,5 +39,4 @@
vars:
download_artifact_job: "{{ zuul.job | replace('promote', 'merge') }}"
download_artifact_type:
- - wheels
- files: *build-wheels-files
\ No newline at end of file
+ - wheels
\ No newline at end of file