Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/dictionary/en-custom.txt
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ openstacksdk
openstackversion
operatorgroup
operatorhub
opm
opn
orchestrator
osd
Expand Down
4 changes: 4 additions & 0 deletions roles/install_yamls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ It contains a set of playbooks to deploy podified control plane.
* `cifmw_install_yamls_edpm_dir`: (String) Output directory for EDPM related artifacts (OUTPUT_BASEDIR). Defaults to `{{ cifmw_install_yamls_out_dir_basedir ~ '/artifacts/edpm' }}`
* `cifmw_install_yamls_checkout_openstack_ref`: (String) Enable the checkout from openstack-operator references
when cloning operator's repository using install_yamls make targets. Defaults to `"true"`
* `cifmw_install_yamls_opm_version`: (String) Override the opm version in install_yamls devsetup/vars/default.yaml. Example: `v1.30.0`
* `cifmw_install_yamls_sdk_version`: (String) Override the operator-sdk version in install_yamls devsetup/vars/default.yaml. Example: `v1.41.1`
* `cifmw_install_yamls_go_version`: (String) Override the golang version in install_yamls devsetup/vars/default.yaml. Example: `1.24.6`
* `cifmw_install_yamls_kustomize_version`: (String) Override the kustomize version in install_yamls devsetup/vars/default.yaml. Example: `v5.0.3`

## cifmw_install_yamls_vars patching

Expand Down
7 changes: 7 additions & 0 deletions roles/install_yamls/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,10 @@ cifmw_install_yamls_whitelisted_vars:
# Defines in install_yamls when we should clone and checkout based on
# openstack-operator references.
cifmw_install_yamls_checkout_openstack_ref: "true"

# Variables to customize install_yamls devsetup/vars/default.yaml
# These variables allow overriding the default versions of tools used by install_yamls
# cifmw_install_yamls_opm_version: v1.30.0
# cifmw_install_yamls_sdk_version: v1.41.1
# cifmw_install_yamls_go_version: 1.24.6
# cifmw_install_yamls_kustomize_version: v5.0.3
54 changes: 54 additions & 0 deletions roles/install_yamls/tasks/customize_devsetup_vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
# Copyright Red Hat, Inc.
# All Rights Reserved.
#
# 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: Customize install_yamls devsetup vars
when: >
cifmw_install_yamls_opm_version is defined or
cifmw_install_yamls_sdk_version is defined or
cifmw_install_yamls_go_version is defined or
cifmw_install_yamls_kustomize_version is defined
block:
- name: Update opm_version in install_yamls devsetup/vars/default.yaml
when: cifmw_install_yamls_opm_version is defined
ansible.builtin.lineinfile:
path: "{{ cifmw_install_yamls_repo }}/devsetup/vars/default.yaml"
regexp: '^opm_version:'
line: "opm_version: {{ cifmw_install_yamls_opm_version }}"
state: present

- name: Update sdk_version in install_yamls devsetup/vars/default.yaml
when: cifmw_install_yamls_sdk_version is defined
ansible.builtin.lineinfile:
path: "{{ cifmw_install_yamls_repo }}/devsetup/vars/default.yaml"
regexp: '^sdk_version:'
line: "sdk_version: {{ cifmw_install_yamls_sdk_version }}"
state: present

- name: Update go_version in install_yamls devsetup/vars/default.yaml
when: cifmw_install_yamls_go_version is defined
ansible.builtin.lineinfile:
path: "{{ cifmw_install_yamls_repo }}/devsetup/vars/default.yaml"
regexp: '^go_version:'
line: "go_version: {{ cifmw_install_yamls_go_version }}"
state: present

- name: Update kustomize_version in install_yamls devsetup/vars/default.yaml
when: cifmw_install_yamls_kustomize_version is defined
ansible.builtin.lineinfile:
path: "{{ cifmw_install_yamls_repo }}/devsetup/vars/default.yaml"
regexp: '^kustomize_version:'
line: "kustomize_version: {{ cifmw_install_yamls_kustomize_version }}"
state: present
7 changes: 7 additions & 0 deletions roles/install_yamls/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@
name: install_yamls
tasks_from: zuul_set_operators_repo.yml

- name: Customize install_yamls devsetup vars if needed
tags:
- bootstrap
ansible.builtin.include_role:
name: install_yamls
tasks_from: customize_devsetup_vars.yml

- name: Compute the cifmw_install_yamls_vars final value
tags:
- bootstrap
Expand Down