blob: 73193778e45bda7f128e420863ff35bd6815f4bb [file] [log] [blame]
Mohammed Naser841686a2024-04-11 14:31:47 -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 Naser462fb6e2025-01-16 01:54:26 -050015- name: Generate release notes
16 ansible.builtin.import_playbook: ../common/generate-changelog.yml
17
vexxhost-bot278de762024-06-18 04:33:30 +020018- name: Configure Buildset Registry
Mohammed Naser7bda44d2025-01-18 15:49:44 -050019 ansible.builtin.import_playbook: ../common/configure-ci-registry.yml
vexxhost-bot278de762024-06-18 04:33:30 +020020
vexxhost-bot9f370df2024-06-08 23:57:23 +020021- name: Prepare for collection build
Mohammed Naser841686a2024-04-11 14:31:47 -040022 hosts: all
Mohammed Naser65159da2025-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 Naser841686a2024-04-11 14:31:47 -040030 tasks:
Mohammed Nasere1834f62024-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
vexxhost-bot9f370df2024-06-08 23:57:23 +020053 - name: Pin all image digests
54 ansible.builtin.include_role:
Mohammed Naser65159da2025-01-26 12:50:42 -050055 name: go
vexxhost-bot9f370df2024-06-08 23:57:23 +020056 vars:
Mohammed Naser65159da2025-01-26 12:50:42 -050057 go_command: run cmd/pinimages/pinimages.go
Mohammed Naser841686a2024-04-11 14:31:47 -040058
vexxhost-bot9f370df2024-06-08 23:57:23 +020059 - name: Print out the new image manifest file
60 ansible.builtin.command: |
61 cat {{ zuul.project.src_dir }}/roles/defaults/vars/main.yml