Browse Source

Merge pull request #7647 from smarterclayton/refactor_5

Automatic merge from submit-queue.

Remove complex version logic and fix f27 build

All images are now published with vX.Y variants

Extracted from #7486
OpenShift Merge Robot 7 years ago
parent
commit
53fd5c21e1

+ 1 - 0
.papr.inventory

@@ -7,6 +7,7 @@ etcd
 ansible_ssh_user=root
 ansible_python_interpreter=/usr/bin/python3
 openshift_deployment_type=origin
+openshift_release="{{ lookup('env', 'target_branch') }}"
 openshift_master_default_subdomain="{{ lookup('env', 'RHCI_ocp_node1_IP') }}.xip.io"
 openshift_check_min_host_disk_gb=1.5
 openshift_check_min_host_memory_gb=1.9

+ 3 - 2
.papr.sh

@@ -16,6 +16,7 @@ else
   dnf install -y sed
   target_branch="$( git describe | sed 's/^openshift-ansible-\([0-9]*\.[0-9]*\)\.[0-9]*-.*/\1/' )"
 fi
+export target_branch
 
 pip install -r requirements.txt
 
@@ -32,10 +33,10 @@ upload_journals() {
 trap upload_journals ERR
 
 # make all nodes ready for bootstrapping
-ansible-playbook -vvv -i .papr.inventory playbooks/openshift-node/private/image_prep.yml
+ansible-playbook -v -i .papr.inventory playbooks/openshift-node/private/image_prep.yml
 
 # run the actual installer
-ansible-playbook -vvv -i .papr.inventory playbooks/deploy_cluster.yml -e "openshift_release=${target_branch}"
+ansible-playbook -v -i .papr.inventory playbooks/deploy_cluster.yml
 
 ### DISABLING TESTS FOR NOW, SEE:
 ### https://github.com/openshift/openshift-ansible/pull/6132

+ 1 - 9
roles/openshift_version/tasks/first_master_containerized_version.yml

@@ -25,14 +25,6 @@
 
 # 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
-  - openshift_deployment_type == 'origin'
-  - cli_image_version.stdout_lines[0].split('-') | length > 1
-  - not openshift_use_crio_only
-
-- set_fact:
     openshift_version: "{{ cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0][1:] }}"
   when: openshift_version is not defined
 
@@ -48,7 +40,7 @@
   - not openshift_use_crio_only
 
 - set_fact:
-    openshift_version: "{{ cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0:2][1:] | join('-') if openshift_deployment_type == 'origin' else cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0][1:] }}"
+    openshift_version: "{{ cli_image_version.stdout_lines[0].split(' ')[1].split('-')[0][1:] }}"
   when:
   - openshift_version is defined
   - openshift_version.split('.') | length == 2