diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2016-06-15 15:04:13 -0300 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2016-06-15 15:04:13 -0300 |
commit | 955d295652c59f0e8ed4ddd77f50d4c6e09293a5 (patch) | |
tree | 402960470685efde3ceb095410f3c4e7f7f36e3b /roles | |
parent | 5346266575045e1a42914e10249dc6e9874da7ec (diff) | |
download | openshift-955d295652c59f0e8ed4ddd77f50d4c6e09293a5.tar.gz openshift-955d295652c59f0e8ed4ddd77f50d4c6e09293a5.tar.bz2 openshift-955d295652c59f0e8ed4ddd77f50d4c6e09293a5.tar.xz openshift-955d295652c59f0e8ed4ddd77f50d4c6e09293a5.zip |
Support origin alpha tags.
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_version/tasks/main.yml | 1 | ||||
-rw-r--r-- | roles/openshift_version/tasks/set_version_containerized.yml | 19 | ||||
-rw-r--r-- | roles/openshift_version/tasks/set_version_rpm.yml | 1 |
3 files changed, 17 insertions, 4 deletions
diff --git a/roles/openshift_version/tasks/main.yml b/roles/openshift_version/tasks/main.yml index d896eb151..ee277d1ca 100644 --- a/roles/openshift_version/tasks/main.yml +++ b/roles/openshift_version/tasks/main.yml @@ -22,6 +22,7 @@ - debug: var=openshift_release - debug: var=openshift_pkg_version - debug: var=openshift_image_tag +- debug: var=openshift.common.version - name: Set openshift_version for rpm installation include: set_version_rpm.yml diff --git a/roles/openshift_version/tasks/set_version_containerized.yml b/roles/openshift_version/tasks/set_version_containerized.yml index 6d31d0ddc..7a09c0310 100644 --- a/roles/openshift_version/tasks/set_version_containerized.yml +++ b/roles/openshift_version/tasks/set_version_containerized.yml @@ -2,7 +2,6 @@ - name: Set containerized version to configure if openshift_image_tag specified set_fact: # Expects a leading "v" in inventory, strip it off here: - # openshift_version should always just be "3.2" or "3.2.0.44" openshift_version: "{{ openshift_image_tag[1:].split('-')[0] }}" when: openshift_image_tag is defined and openshift_version is not defined @@ -19,12 +18,26 @@ - debug: var=cli_image_version +# Origin latest = released version (i.e. 1.2.0) - set_fact: - openshift_version: "{{ cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0:2][1:] | join('-') if openshift.common.deployment_type == 'origin' else cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0][1:] }}" - when: openshift_version is not defined + openshift_version: "{{ cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0][1:] }}" + when: openshift_version is not defined and openshift.common.deployment_type == 'origin' and cli_image_version.stdout_lines[0].split('-') | length == 0 + + +# Origin latest = pre-release version (i.e. v1.3.0-alpha.1-321-gb095e3a) +- set_fact: + openshift_version: "{{ (cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0:2] | join('-'))[1:] }}" + when: openshift_version is not defined and openshift.common.deployment_type == 'origin' and cli_image_version.stdout_lines[0].split('-') | length > 1 + +# OSE +- set_fact: + openshift_version: "{{ cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0][1:] }}" + when: openshift_version is not defined and openshift.common.deployment_type != 'origin' - debug: msg="{{ openshift_version }}" + + # If we got an openshift_version like "3.2", lookup the latest 3.2 container version # and use that value instead. - name: Set precise containerized version to configure if openshift_release specified diff --git a/roles/openshift_version/tasks/set_version_rpm.yml b/roles/openshift_version/tasks/set_version_rpm.yml index 90229b0e9..889ecc56c 100644 --- a/roles/openshift_version/tasks/set_version_rpm.yml +++ b/roles/openshift_version/tasks/set_version_rpm.yml @@ -3,7 +3,6 @@ - name: Set rpm version to configure if openshift_pkg_version specified set_fact: # Expects a leading "-" in inventory, strip it off here, and remove trailing release, - # openshift_version should always just be "3.2" or "3.2.0.44" openshift_version: "{{ openshift_pkg_version[1:].split('-')[0] }}" when: openshift_pkg_version is defined and openshift_version is not defined |