blob: 73193778e45bda7f128e420863ff35bd6815f4bb [file] [log] [blame]
Mohammed Nasereb257cb2024-04-10 21:14:24 -04001# Copyright (c) 2024 VEXXHOST, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
Mohammed Naser42ae9752025-01-16 01:54:26 -050015- name: Generate release notes
16 ansible.builtin.import_playbook: ../common/generate-changelog.yml
17
Mohammed Naser7bbd1302024-06-18 21:01:07 -040018- name: Configure Buildset Registry
Mohammed Naserfe5e63b2025-01-18 15:49:44 -050019 ansible.builtin.import_playbook: ../common/configure-ci-registry.yml
Mohammed Naser7bbd1302024-06-18 21:01:07 -040020
Mohammed Naserdf3a3202024-06-17 22:03:26 -040021- name: Prepare for collection build
Mohammed Nasereb257cb2024-04-10 21:14:24 -040022 hosts: all
Mohammed Nasercf511fc2025-01-26 12:50:42 -050023 pre_tasks:
24 - name: Ensure "go" is installed
25 ansible.builtin.include_role:
26 name: ensure-go
27 vars:
28 go_version: "1.22.3"
29
Mohammed Nasereb257cb2024-04-10 21:14:24 -040030 tasks:
Mohammed Naserb3d475c2024-07-24 15:46:06 -040031 - name: Find all roles
32 find:
33 paths: "{{ zuul.project.src_dir }}/roles/"
34 file_type: directory
35 register: role_dirs
36
37 - name: Check for README.md in each role
38 stat:
39 path: "{{ item.path }}/README.md"
40 register: readme_check
41 loop: "{{ role_dirs.files }}"
42 loop_control:
43 label: "{{ item.path }}"
44
45 - name: Fail if any role is missing README.md
46 fail:
47 msg: "Missing README.md in role {{ item.item.path }}"
48 when: not item.stat.exists
49 loop: "{{ readme_check.results }}"
50 loop_control:
51 label: "{{ item.item.path }}"
52
Mohammed Naserdf3a3202024-06-17 22:03:26 -040053 - name: Pin all image digests
54 ansible.builtin.include_role:
Mohammed Nasercf511fc2025-01-26 12:50:42 -050055 name: go
Mohammed Naserdf3a3202024-06-17 22:03:26 -040056 vars:
Mohammed Nasercf511fc2025-01-26 12:50:42 -050057 go_command: run cmd/pinimages/pinimages.go
Mohammed Nasereb257cb2024-04-10 21:14:24 -040058
Mohammed Naserdf3a3202024-06-17 22:03:26 -040059 - name: Print out the new image manifest file
60 ansible.builtin.command: |
61 cat {{ zuul.project.src_dir }}/roles/defaults/vars/main.yml