Skip to content

Commit

Permalink
Add steps to run minor version update
Browse files Browse the repository at this point in the history
Signed-off-by: Mikołaj Ciecierski <[email protected]>
  • Loading branch information
ciecierski committed Jul 8, 2024
1 parent 1b6e9ac commit 66b3452
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
3 changes: 3 additions & 0 deletions roles/update/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
- name: Hello World
ansible.builtin.debug:
msg: "Hello World from update"

- name: Run update-csv tasks
ansible.builtin.include_tasks: update-csv.yml
34 changes: 34 additions & 0 deletions roles/update/tasks/update-csv.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
# 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: Save current csv for openstack-operator
ansible.builtin.shell:
cmd: >-
oc get csv openstack-operator.v0.0.1 -o yaml -n openstack-operators > csv.yaml
- name: Get OpenStackVersion
kubernetes.core.k8s_info:
kubeconfig: "{{ cifmw_openshift_kubeconfig }}"
api_key: "{{ cifmw_openshift_token | default(omit) }}"
context: "{{ cifmw_openshift_context | default(omit) }}"
kind: OpenStackVersion
namespace: openstack-operators
register: osv_info

- name: Print return information from OpenStackVersion
ansible.builtin.debug:
var: osv_info
verbosity: 2

0 comments on commit 66b3452

Please sign in to comment.