Drop old image building code
diff --git a/roles/build_openstack_requirements/defaults/main.yml b/roles/build_openstack_requirements/defaults/main.yml
deleted file mode 100644
index e9afac1..0000000
--- a/roles/build_openstack_requirements/defaults/main.yml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-# .. vim: foldmarker=[[[,]]]:foldmethod=marker
-
-# .. Copyright (C) 2022 VEXXHOST, Inc.
-# .. SPDX-License-Identifier: Apache-2.0
-
-# Default variables
-# =================
-
-# .. contents:: Sections
-# :local:
-
-
-# .. envvar:: build_openstack_requirements_wheels_directory [[[
-#
-# Root directory where all work for wheels is built.
-build_openstack_requirements_wheels_directory: /tmp
-
- # ]]]
-# .. envvar:: build_openstack_requirements_wheels_folder [[[
-#
-# Folder name inside the ``build_openstack_requirements_wheels_directory``
-build_openstack_requirements_wheels_folder:
- wheels-{{ build_openstack_requirements_release }}-{{ ansible_distribution_release }}-{{ ansible_architecture }}
-
- # ]]]
-# .. envvar:: build_openstack_requirements_wheels_path [[[
-#
-# Path to generate the wheels inside of
-build_openstack_requirements_wheels_path:
- "{{ build_openstack_requirements_wheels_directory }}/{{ build_openstack_requirements_wheels_folder }}"
-
- # ]]]
-# .. envvar:: build_openstack_requirements_archive_path [[[
-#
-# Path to the archive of the wheels
-build_openstack_requirements_archive_path:
- "{{ build_openstack_requirements_wheels_path }}.tar.gz"
-
- # ]]]
diff --git a/roles/build_openstack_requirements/tasks/main.yml b/roles/build_openstack_requirements/tasks/main.yml
deleted file mode 100644
index 46d9a80..0000000
--- a/roles/build_openstack_requirements/tasks/main.yml
+++ /dev/null
@@ -1,105 +0,0 @@
-# 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.
-
-- name: Generate temporary file for upper-constraints.txt
- ansible.builtin.tempfile:
- state: file
- prefix: upper-constraints-
- register: _upper_constraints_file
-
-- name: Fetch the exact version of upper-constraints.txt
- ansible.builtin.get_url:
- url: "https://releases.openstack.org/constraints/upper/{{ build_openstack_requirements_release }}"
- dest: "{{ _upper_constraints_file.path }}"
- mode: 0644
-
-- name: Install Ubuntu Cloud Archive keyring
- become: true
- ansible.builtin.apt:
- name: ubuntu-cloud-keyring
- state: present
-
-- name: Add the Ubuntu Cloud Archive repository
- become: true
- ansible.builtin.apt_repository:
- 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
- ansible.builtin.apt:
- name:
- - liberasurecode-dev
- - libkrb5-dev
- - libldap2-dev
- - libnss3-dev
- - libpcre3-dev
- - libsasl2-dev
- - libssl-dev
- - libsystemd-dev
- - libvirt-dev
- - pkg-config
- state: present
-
-- name: Remove certain dependencies from upper-constraints.txt
- ansible.builtin.lineinfile:
- path: "{{ _upper_constraints_file.path }}"
- regexp: "^{{ item.name }}"
- state: absent
- when: item.when | default(true)
- loop:
- # confluent-kafka-python requires librdkafka v1.6.0 or later.
- - name: confluent-kafka
- when: ansible_architecture == 'aarch64'
- # We don't support or use PostgreSQL
- - name: psycopg2
- # Not used in any projects that we build
- - name: grpcio
- - name: APScheduler
-
-- name: Generate temporary directory for wheels
- ansible.builtin.file:
- path: "{{ build_openstack_requirements_wheels_path }}"
- state: directory
- mode: 0755
-
-- name: Build all wheels
- changed_when: false
- ansible.builtin.command:
- pip wheel --no-deps -r {{ _upper_constraints_file.path }}
- args:
- chdir: "{{ build_openstack_requirements_wheels_path }}"
- environment:
- CASS_DRIVER_BUILD_CONCURRENCY: "{{ ansible_processor_vcpus }}"
- MAKEFLAGS: "-j{{ ansible_processor_vcpus }}"
-
-- name: Build wheels for extra packages
- changed_when: false
- ansible.builtin.command:
- pip wheel --no-deps -c {{ _upper_constraints_file.path }} uwsgi
- args:
- chdir: "{{ build_openstack_requirements_wheels_path }}"
- environment:
- MAKEFLAGS: "-j{{ ansible_processor_vcpus }}"
-
-- name: Create archive with all wheels
- # TODO(mnaser): Switch this to "community.general.archive" once Zuul is using
- # a new enough Ansible.
- archive:
- path: "{{ build_openstack_requirements_wheels_path }}/*.whl"
- dest: "{{ build_openstack_requirements_archive_path }}"
- mode: 0644
diff --git a/zuul.d/images-master.yaml b/zuul.d/images-master.yaml
deleted file mode 100644
index 3e9346d..0000000
--- a/zuul.d/images-master.yaml
+++ /dev/null
@@ -1,99 +0,0 @@
-# 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-images-master
- parent: ansible-collection-atmosphere-build-images
- abstract: true
- dependencies: &image_dependencies
- - name: ansible-collection-atmosphere-buildset-registry
- soft: false
- - name: ansible-collection-atmosphere-merge-wheels-master
- soft: true
- requires: &image_requires
- - ansible-collection-atmosphere-wheels-master
- files: &image_files
- - images/master.yml
- vars: &image_vars
- openstack_release: master
-
-- job:
- name: ansible-collection-atmosphere-build-images-master-amd64
- parent: ansible-collection-atmosphere-build-images-master
- nodeset: ubuntu-focal
-
-- job:
- name: ansible-collection-atmosphere-build-images-master-aarch64
- parent: ansible-collection-atmosphere-build-images-master
- nodeset: ubuntu-focal-arm64
-
-- job:
- name: ansible-collection-atmosphere-build-images-manifest-master
- parent: ansible-collection-atmosphere-build-images-manifest
- dependencies:
- - name: ansible-collection-atmosphere-buildset-registry
- soft: false
- - name: ansible-collection-atmosphere-build-images-master-amd64
- soft: false
- - name: ansible-collection-atmosphere-build-images-master-aarch64
- soft: false
- files: *image_files
- vars: &manifest_vars
- openstack_release: master
-
-
-- job:
- name: ansible-collection-atmosphere-upload-images-master
- parent: ansible-collection-atmosphere-upload-images
- abstract: true
- dependencies: *image_dependencies
- requires: *image_requires
- files: *image_files
- vars: *image_vars
-
-- job:
- name: ansible-collection-atmosphere-upload-images-master-amd64
- parent: ansible-collection-atmosphere-upload-images-master
- nodeset: ubuntu-focal
-
-- job:
- name: ansible-collection-atmosphere-upload-images-master-aarch64
- parent: ansible-collection-atmosphere-upload-images-master
- nodeset: ubuntu-focal-arm64
-
-- job:
- name: ansible-collection-atmosphere-upload-images-manifest-master
- parent: ansible-collection-atmosphere-upload-images-manifest
- dependencies:
- - name: ansible-collection-atmosphere-buildset-registry
- soft: false
- - name: ansible-collection-atmosphere-upload-images-master-amd64
- soft: false
- - name: ansible-collection-atmosphere-upload-images-master-aarch64
- soft: false
- files: *image_files
- vars: *manifest_vars
-
-
-- project:
- check:
- jobs:
- - ansible-collection-atmosphere-build-images-master-amd64
- - ansible-collection-atmosphere-build-images-master-aarch64
- - ansible-collection-atmosphere-build-images-manifest-master
- gate:
- jobs:
- - ansible-collection-atmosphere-upload-images-master-amd64
- - ansible-collection-atmosphere-upload-images-master-aarch64
- - ansible-collection-atmosphere-upload-images-manifest-master
\ No newline at end of file
diff --git a/zuul.d/images.yaml b/zuul.d/images.yaml
deleted file mode 100644
index 8dfe728..0000000
--- a/zuul.d/images.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-# 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-buildset-registry
- parent: opendev-buildset-registry
-
-- job:
- name: ansible-collection-atmosphere-build-images
- parent: opendev-build-docker-image
- abstract: true
- required-projects:
- - openstack/loci
- pre-run:
- - zuul.d/playbooks/ansible-collection-atmosphere-build-images/pre-run.yml
- run:
- - zuul.d/playbooks/ansible-collection-atmosphere-build-images/run.yml
-
-- job:
- name: ansible-collection-atmosphere-upload-images
- parent: ansible-collection-atmosphere-build-images
- abstract: true
- secrets:
- name: docker_credentials
- secret: gar-credentials
- pass-to-parent: true
-
-- job:
- name: ansible-collection-atmosphere-build-images-manifest
- pre-run:
- - zuul.d/playbooks/ansible-collection-atmosphere-build-images-manifest/pre-run.yml
- run:
- - zuul.d/playbooks/ansible-collection-atmosphere-build-images-manifest/run.yml
-
-- job:
- name: ansible-collection-atmosphere-upload-images-manifest
- parent: ansible-collection-atmosphere-build-images-manifest
- secrets:
- name: docker_credentials
- secret: gar-credentials
- pass-to-parent: true
-
-- project:
- check:
- jobs:
- - ansible-collection-atmosphere-buildset-registry
- gate:
- jobs:
- - ansible-collection-atmosphere-buildset-registry
diff --git a/zuul.d/playbooks/ansible-collection-atmosphere-build-images-manifest/pre-run.yml b/zuul.d/playbooks/ansible-collection-atmosphere-build-images-manifest/pre-run.yml
deleted file mode 100644
index f390d11..0000000
--- a/zuul.d/playbooks/ansible-collection-atmosphere-build-images-manifest/pre-run.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-- hosts: all
- roles:
- - ensure-podman
- - use-buildset-registry
\ No newline at end of file
diff --git a/zuul.d/playbooks/ansible-collection-atmosphere-build-images-manifest/run.yml b/zuul.d/playbooks/ansible-collection-atmosphere-build-images-manifest/run.yml
deleted file mode 100644
index 98eb70a..0000000
--- a/zuul.d/playbooks/ansible-collection-atmosphere-build-images-manifest/run.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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.
-
-- hosts: all
- tasks:
- - name: Include manifest file with all the image information
- ansible.builtin.include_vars:
- file: "../../../images/{{ openstack_release }}.yml"
- name: image_manifest
-
- - name: Login container registry
- when: zuul.job is not search("build")
- command:
- podman login -u {{ docker_credentials.username }} -p {{ docker_credentials.password }} {{ image_manifest.registry }}
-
- - name: Create manifest for every project built
- command:
- podman manifest create {{ item | basename }}:{{ image_manifest['projects'][item.rsplit('/')[-1]]['tag'] }}
- loop: "{{ zuul.artifacts | selectattr('metadata.repository', 'defined') | map(attribute='metadata.repository') | sort | unique }}"
-
- - name: Add image to their manifest
- command:
- podman manifest add
- --arch {{ (item.metadata.arch == "aarch64") | ternary("arm64", "amd64") }}
- {{ item.metadata.project }}:{{ image_manifest['projects'][item.metadata.project]['tag'] }}
- {{ item.url }}
- loop: "{{ zuul.artifacts | selectattr('metadata.type', 'defined') | selectattr('metadata.type', 'equalto', 'image') | list }}"
-
- - name: Push manifests to container registry
- command:
- podman manifest push
- {{ item | basename }}:{{ image_manifest['projects'][item.rsplit('/')[-1]]['tag'] }}
- {{ item }}:{{ image_manifest['projects'][item.rsplit('/')[-1]]['tag'] }}
- loop: "{{ zuul.artifacts | selectattr('metadata.repository', 'defined') | map(attribute='metadata.repository') | sort | unique }}"
diff --git a/zuul.d/playbooks/ansible-collection-atmosphere-build-images/pre-run.yml b/zuul.d/playbooks/ansible-collection-atmosphere-build-images/pre-run.yml
deleted file mode 100644
index 1032b4c..0000000
--- a/zuul.d/playbooks/ansible-collection-atmosphere-build-images/pre-run.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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.
-
-- hosts: all
- roles:
- - ensure-pip
diff --git a/zuul.d/playbooks/ansible-collection-atmosphere-build-images/run.yml b/zuul.d/playbooks/ansible-collection-atmosphere-build-images/run.yml
deleted file mode 100644
index 1c153c9..0000000
--- a/zuul.d/playbooks/ansible-collection-atmosphere-build-images/run.yml
+++ /dev/null
@@ -1,163 +0,0 @@
-# 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.
-
-- hosts: all
- tasks:
- - name: Include manifest file with all the image information
- ansible.builtin.include_vars:
- file: "../../../images/{{ openstack_release }}.yml"
- name: image_manifest
-
- - name: Check if the image is already built
- ansible.builtin.command:
- docker manifest inspect {{ image_manifest.registry }}/{{ item.key }}:{{ item.value.tag }}
- register: _docker_manifest_inspect
- with_dict: "{{ image_manifest.projects }}"
- loop_control:
- label: "{{ item.key }}"
- # NOTE(mnaser): We want to mark the task as "changed" if we have to do
- # any work (i.e if the image is not already built).
- failed_when: false
- changed_when: _docker_manifest_inspect.rc != 0
-
- - name: Fail the job if all the images are already built
- ansible.builtin.fail:
- msg: All the images are already built, did you forget to bump the tag?
- when: _docker_manifest_inspect is not changed
-
- - name: Generate a fact with the list of projects to be built
- ansible.builtin.set_fact:
- images_to_build: "{{ _docker_manifest_inspect.results | select('changed') | list | map(attribute='item.key') | list }}"
-
- - name: Clone projects that need to be built
- ansible.builtin.git:
- repo: "https://opendev.org/openstack/{{ item }}"
- dest: "/tmp/{{ item }}"
- version: "{{ image_manifest['projects'][item]['revision'] }}"
- loop: "{{ images_to_build }}"
-
- - name: Generate the PBR version for the projects
- ansible.builtin.shell:
- /usr/bin/python3 setup.py --version
- args:
- chdir: "/tmp/{{ item }}"
- environment:
- PYTHONWARNINGS: "ignore:Unverified HTTPS request"
- register: _pbr_version
- loop: "{{ images_to_build }}"
-
- - name: Assert that the PBR version exists in the tag
- ansible.builtin.assert:
- that: item.stdout.strip() in image_manifest['projects'][item.item].tag
- loop: "{{ _pbr_version.results }}"
- loop_control:
- label: "{{ item.item }}"
-
- - name: Set fact for wheels tarball from artifacts
- ansible.builtin.set_fact:
- wheels_path: "{{ item.url }}"
- loop: "{{ (zuul.artifacts | default([])) | selectattr('metadata.type', 'defined') | selectattr('metadata.type', 'equalto', 'wheels') | list }}"
-
- - name: Set the fact for wheels path to default if none is detected
- ansible.builtin.set_fact:
- wheels_path: "https://tarballs.opendev.org/vexxhost/ansible-collection-atmosphere/ansible-collection-atmosphere-wheels-{{ openstack_release }}-master.tar.gz"
- when: wheels_path is not defined
-
- - name: Build the images
- ansible.builtin.include_role:
- name: build-docker-image
- register: _build_docker_image
- loop: "{{ images_to_build }}"
- vars:
- zuul_work_dir: "{{ zuul.projects['opendev.org/openstack/loci'].src_dir }}"
- docker_registry: "{{ image_manifest.registry }}"
- docker_images:
- - context: .
- repository: "{{ item }}"
- tags:
- - "{{ image_manifest['projects'][item]['tag'] }}-{{ ansible_architecture }}"
- build_args:
- # TODO(mnaser): build base image
- - FROM="ubuntu:focal"
- - PROJECT="{{ item }}"
- - PROJECT_REF="{{ image_manifest['projects'][item]['revision'] }}"
- - PROJECT_RELEASE="{{ openstack_release }}"
- - WHEELS="{{ wheels_path }}"
- - PROFILES="{{ image_manifest['projects'][item].get('profies', []) | join(' ') }}"
- - PIP_PACKAGES="{{ image_manifest['projects'][item].get('pip_packages', []) | join(' ') }}"
- - DIST_PACKAGES="{{ image_manifest['projects'][item].get('dist_packages', []) | join(' ') }}"
-
- - name: Upload the images
- ansible.builtin.include_role:
- name: upload-docker-image
- register: _build_docker_image
- when: zuul.job is search("upload")
- loop: "{{ images_to_build }}"
- vars:
- zuul_work_dir: "{{ zuul.projects['opendev.org/openstack/loci'].src_dir }}"
- docker_registry: "{{ image_manifest.registry }}"
- docker_images:
- - context: .
- repository: "{{ item }}"
- tags:
- - "{{ image_manifest['projects'][item]['tag'] }}-{{ ansible_architecture }}"
-
- - name: Return artifacts to Zuul
- block:
- - name: Return artifacts to Zuul for build
- when: zuul.job is search("build")
- zuul_return:
- data:
- zuul:
- artifacts:
- - name: "{{ item }} ({{ ansible_architecture }})"
- url: "docker://{{ _docker_registry }}/{{ item }}:{{ image_manifest['projects'][item]['tag'] }}-{{ ansible_architecture }}"
- metadata:
- type: image
- repository: "docker://{{ _docker_registry }}/{{ item }}"
- project: "{{ item }}"
- arch: "{{ ansible_architecture }}"
- vars:
- _docker_registry: "zuul-jobs.buildset-registry:5000"
- loop: "{{ _build_docker_image.results | map(attribute='item') | list }}"
-
- - name: Return artifacts to Zuul for upload
- when: zuul.job is search("upload")
- zuul_return:
- data:
- zuul:
- artifacts:
- - name: "{{ item }} ({{ ansible_architecture }})"
- url: "docker://{{ image_manifest.registry }}/{{ item }}:{{ ('change_' + zuul.change) if (zuul.change is defined) else zuul.pipeline }}_{{ image_manifest['projects'][item]['tag'] }}-{{ ansible_architecture }}"
- metadata:
- type: image
- repository: "docker://{{ image_manifest.registry }}/{{ item }}"
- project: "{{ item }}"
- arch: "{{ ansible_architecture }}"
- loop: "{{ _build_docker_image.results | map(attribute='item') | list }}"
-
- - name: Return artifacts to Zuul for promote
- when: zuul.job is search("promote")
- zuul_return:
- data:
- zuul:
- artifacts:
- - name: "{{ item }} ({{ ansible_architecture }})"
- url: "docker://{{ image_manifest.registry }}/{{ item }}:{{ image_manifest['projects'][item]['tag'] }}-{{ ansible_architecture }}"
- metadata:
- type: image
- repository: "docker://{{ image_manifest.registry }}/{{ item }}"
- project: "{{ item }}"
- arch: "{{ ansible_architecture }}"
- loop: "{{ _build_docker_image.results | map(attribute='item') | list }}"
diff --git a/zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/post-run.yml b/zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/post-run.yml
deleted file mode 100644
index 09b306e..0000000
--- a/zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/post-run.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-# 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.
-
-- hosts: all
- tasks:
- - name: Find tarballs in the project directory
- find:
- file_type: file
- paths: "{{ build_openstack_requirements_wheels_directory }}"
- patterns: "*.tar.gz"
- register: result
-
- - name: Display stat for tarballs
- stat:
- path: "{{ item.path }}"
- with_items: "{{ result.files }}"
-
- - name: Create destination directory on executor
- delegate_to: localhost
- file:
- path: "{{ zuul.executor.work_root }}/artifacts"
- state: directory
- mode: 0755
-
- - name: Collect tarball artifacts
- synchronize:
- dest: "{{ zuul.executor.work_root }}/artifacts"
- mode: pull
- src: "{{ item.path }}"
- verify_host: true
- owner: no
- group: no
- with_items: "{{ result.files }}"
-
- - name: Return artifacts to Zuul
- loop: "{{ result.files }}"
- zuul_return:
- data:
- zuul:
- artifacts:
- - name: "Wheels ({{ ansible_architecture }})"
- url: "artifacts/{{ item.path | basename }}"
- metadata:
- type: wheels
\ No newline at end of file
diff --git a/zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/pre-run.yml b/zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/pre-run.yml
deleted file mode 100644
index 17680c5..0000000
--- a/zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/pre-run.yml
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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.
-
-- hosts: all
- roles:
- - ensure-pip
\ No newline at end of file
diff --git a/zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/run.yml b/zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/run.yml
deleted file mode 100644
index e5977a6..0000000
--- a/zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/run.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-# 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.
-
-- name: Build wheels for OpenStack requirements
- hosts: all
- roles:
- - build_openstack_requirements
\ No newline at end of file
diff --git a/zuul.d/playbooks/ansible-collection-atmosphere-merge-wheels/post-run.yml b/zuul.d/playbooks/ansible-collection-atmosphere-merge-wheels/post-run.yml
deleted file mode 100644
index 073c2fe..0000000
--- a/zuul.d/playbooks/ansible-collection-atmosphere-merge-wheels/post-run.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-# 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.
-
-- hosts: all
- tasks:
- - name: Display stat for tarballs
- stat:
- path: /tmp/wheels.tar.gz
-
- - name: Create destination directory on executor
- delegate_to: localhost
- file:
- path: "{{ zuul.executor.work_root }}/artifacts"
- state: directory
- mode: 0755
-
- - name: Collect tarball artifacts
- synchronize:
- dest: "{{ zuul.executor.work_root }}/artifacts"
- mode: pull
- src: /tmp/wheels.tar.gz
- verify_host: true
- owner: no
- group: no
-
- - name: Return artifacts to Zuul
- zuul_return:
- data:
- zuul:
- artifacts:
- - name: Wheels
- url: artifacts/wheels.tar.gz
- metadata:
- type: wheels
\ No newline at end of file
diff --git a/zuul.d/playbooks/ansible-collection-atmosphere-merge-wheels/run.yml b/zuul.d/playbooks/ansible-collection-atmosphere-merge-wheels/run.yml
deleted file mode 100644
index 8a75cd9..0000000
--- a/zuul.d/playbooks/ansible-collection-atmosphere-merge-wheels/run.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-# 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.
-
-- hosts: all
- gather_facts: false
- tasks:
- - name: Download all artifacts
- ansible.builtin.get_url:
- url: "{{ item.url }}"
- dest: "/tmp/{{ item.url | basename }}"
- mode: '0440'
- loop: "{{ zuul.artifacts }}"
- when: item.metadata.get("type") == "wheels"
-
- - name: Create a folder for all wheels
- ansible.builtin.file:
- path: "/tmp/wheels"
- state: directory
-
- - name: Extract all wheels into the same folder
- ansible.builtin.unarchive:
- src: "/tmp/{{ item.url | basename }}"
- dest: /tmp/wheels
- remote_src: true
- loop: "{{ zuul.artifacts }}"
- when: item.metadata.get("type") == "wheels"
-
- - name: Add upper-constraints.txt to the folder
- ansible.builtin.get_url:
- url: "https://releases.openstack.org/constraints/upper/{{ build_openstack_requirements_release }}"
- dest: /tmp/wheels/upper-constraints.txt
- mode: 0644
-
- - name: Create archive with all wheels
- # TODO(mnaser): Switch this to "community.general.archive" once Zuul is using
- # a new enough Ansible.
- archive:
- dest: /tmp/wheels.tar.gz
- path:
- - /tmp/wheels/*.whl
- - /tmp/wheels/*.txt
\ No newline at end of file
diff --git a/zuul.d/wheels-master.yaml b/zuul.d/wheels-master.yaml
deleted file mode 100644
index ebd4f66..0000000
--- a/zuul.d/wheels-master.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
-# 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
deleted file mode 100644
index bb9c41a..0000000
--- a/zuul.d/wheels-wallaby.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
-# 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-wallaby
- parent: ansible-collection-atmosphere-build-wheels
- files: &build-wheels-files
- - roles/build_openstack_requirements/.*
- - zuul.d/wheels-wallaby.yaml
- vars:
- build_openstack_requirements_release: wallaby
-
-- job:
- name: ansible-collection-atmosphere-build-wheels-wallaby-amd64
- parent: ansible-collection-atmosphere-build-wheels-wallaby
- nodeset: ubuntu-focal
-
-- job:
- name: ansible-collection-atmosphere-build-wheels-wallaby-aarch64
- parent: ansible-collection-atmosphere-build-wheels-wallaby
- nodeset: ubuntu-focal-arm64
-
-- 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
- provides:
- - ansible-collection-atmosphere-wheels-wallaby
- vars:
- build_openstack_requirements_release: wallaby
-
-- job:
- name: ansible-collection-atmosphere-promote-wheels-wallaby
- parent: ansible-collection-atmosphere-promote-wheels
- files: *build-wheels-files
- vars:
- artifact_extra_name: wheels-wallaby
-
-- project:
- check:
- jobs:
- - ansible-collection-atmosphere-build-wheels-wallaby-amd64
- - ansible-collection-atmosphere-build-wheels-wallaby-aarch64
- - ansible-collection-atmosphere-merge-wheels-wallaby
- gate:
- jobs:
- - ansible-collection-atmosphere-build-wheels-wallaby-amd64
- - ansible-collection-atmosphere-build-wheels-wallaby-aarch64
- - ansible-collection-atmosphere-merge-wheels-wallaby
- promote:
- jobs:
- - ansible-collection-atmosphere-promote-wheels-wallaby
\ No newline at end of file
diff --git a/zuul.d/wheels.yaml b/zuul.d/wheels.yaml
deleted file mode 100644
index 9c3c5fc..0000000
--- a/zuul.d/wheels.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
-# 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
- abstract: true
- pre-run:
- - zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/pre-run.yml
- run:
- - zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/run.yml
- post-run:
- - zuul.d/playbooks/ansible-collection-atmosphere-build-wheels/post-run.yml
- vars:
- build_openstack_requirements_wheels_directory: /tmp
-
-- job:
- name: ansible-collection-atmosphere-merge-wheels
- abstract: true
- run:
- - zuul.d/playbooks/ansible-collection-atmosphere-merge-wheels/run.yml
- post-run:
- - zuul.d/playbooks/ansible-collection-atmosphere-merge-wheels/post-run.yml
-
-- job:
- name: ansible-collection-atmosphere-promote-wheels
- parent: opendev-promote-python
- abstract: true
- vars:
- download_artifact_job: "{{ zuul.job | replace('promote', 'merge') }}"
- download_artifact_type:
- - wheels
\ No newline at end of file