Mohammed Naser | eb257cb | 2024-04-10 21:14:24 -0400 | [diff] [blame] | 1 | # 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 Naser | 7607e5a | 2025-01-16 01:54:26 -0500 | [diff] [blame] | 15 | - name: Generate release notes |
| 16 | ansible.builtin.import_playbook: ../common/generate-changelog.yml |
| 17 | |
Mohammed Naser | b3454c2 | 2024-06-17 18:59:28 -0400 | [diff] [blame] | 18 | - name: Configure Buildset Registry |
Mohammed Naser | 564caa8 | 2025-01-18 15:49:44 -0500 | [diff] [blame] | 19 | ansible.builtin.import_playbook: ../common/configure-ci-registry.yml |
Mohammed Naser | b3454c2 | 2024-06-17 18:59:28 -0400 | [diff] [blame] | 20 | |
Mohammed Naser | 6870311 | 2024-06-07 16:31:48 -0400 | [diff] [blame] | 21 | - name: Prepare for collection build |
Mohammed Naser | eb257cb | 2024-04-10 21:14:24 -0400 | [diff] [blame] | 22 | hosts: all |
Mohammed Naser | 1b7432c | 2025-01-26 12:50:42 -0500 | [diff] [blame] | 23 | 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 Naser | eb257cb | 2024-04-10 21:14:24 -0400 | [diff] [blame] | 30 | tasks: |
Mohammed Naser | 558c4a6 | 2024-07-24 15:46:06 -0400 | [diff] [blame] | 31 | - 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 Naser | 6870311 | 2024-06-07 16:31:48 -0400 | [diff] [blame] | 53 | - name: Pin all image digests |
| 54 | ansible.builtin.include_role: |
Mohammed Naser | 1b7432c | 2025-01-26 12:50:42 -0500 | [diff] [blame] | 55 | name: go |
Mohammed Naser | 6870311 | 2024-06-07 16:31:48 -0400 | [diff] [blame] | 56 | vars: |
Mohammed Naser | 1b7432c | 2025-01-26 12:50:42 -0500 | [diff] [blame] | 57 | go_command: run cmd/pinimages/pinimages.go |
Mohammed Naser | eb257cb | 2024-04-10 21:14:24 -0400 | [diff] [blame] | 58 | |
Mohammed Naser | 6870311 | 2024-06-07 16:31:48 -0400 | [diff] [blame] | 59 | - name: Print out the new image manifest file |
| 60 | ansible.builtin.command: | |
| 61 | cat {{ zuul.project.src_dir }}/roles/defaults/vars/main.yml |