| # Copyright (c) 2024 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 release notes |
| ansible.builtin.import_playbook: ../common/generate-changelog.yml |
| |
| - name: Configure Buildset Registry |
| ansible.builtin.import_playbook: ../common/configure-buildset-registry.yml |
| |
| - name: Prepare for collection build |
| hosts: all |
| pre_tasks: |
| - name: Ensure "go" is installed |
| ansible.builtin.include_role: |
| name: ensure-go |
| vars: |
| go_version: "1.22.3" |
| |
| tasks: |
| - name: Find all roles |
| find: |
| paths: "{{ zuul.project.src_dir }}/roles/" |
| file_type: directory |
| register: role_dirs |
| |
| - name: Check for README.md in each role |
| stat: |
| path: "{{ item.path }}/README.md" |
| register: readme_check |
| loop: "{{ role_dirs.files }}" |
| loop_control: |
| label: "{{ item.path }}" |
| |
| - name: Fail if any role is missing README.md |
| fail: |
| msg: "Missing README.md in role {{ item.item.path }}" |
| when: not item.stat.exists |
| loop: "{{ readme_check.results }}" |
| loop_control: |
| label: "{{ item.item.path }}" |
| |
| - name: Pin all image digests |
| ansible.builtin.include_role: |
| name: go |
| vars: |
| go_command: run cmd/pinimages/pinimages.go |
| |
| - name: Print out the new image manifest file |
| ansible.builtin.command: | |
| cat {{ zuul.project.src_dir }}/roles/defaults/vars/main.yml |