summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml15
-rw-r--r--README.md1
-rw-r--r--playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml8
-rw-r--r--requirements.txt2
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py10
5 files changed, 33 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..001bfdc39
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,15 @@
+sudo: false
+
+language: python
+python:
+ - "2.7"
+
+install:
+ - pip install -r requirements.txt
+
+script:
+ # TODO(rhcarvalho): check syntax of other important entrypoint playbooks
+ - ansible-playbook --syntax-check playbooks/byo/config.yml
+ # TODO(rhcarvalho): update make ci to pick up these tests
+ - nosetests --tests=test
+ - cd utils && make ci
diff --git a/README.md b/README.md
index 65ac13032..bb8f56824 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
[![Join the chat at https://gitter.im/openshift/openshift-ansible](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/openshift/openshift-ansible)
+[![Build Status](https://travis-ci.org/openshift/openshift-ansible.svg?branch=master)](https://travis-ci.org/openshift/openshift-ansible)
# OpenShift Ansible
diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
index 6b567e2e2..764563d28 100644
--- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml
@@ -24,7 +24,7 @@
- openshift_facts:
role: master
local_facts:
- embedded_etcd: "{{ groups.oo_etcd_to_config | length == 0 }}"
+ embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}"
- name: Backup etcd
hosts: etcd_hosts_to_backup
@@ -228,6 +228,12 @@
when: origin_reconcile_bindings | bool or ent_reconcile_bindings | bool
run_once: true
+ - name: Reconcile Jenkins Pipeline Role Bindings
+ command: >
+ {{ openshift.common.client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig policy reconcile-cluster-role-bindings system:build-strategy-jenkinspipeline --confirm
+ run_once: true
+ when: openshift.common.version_gte_3_4_or_1_4 | bool
+
- name: Reconcile Security Context Constraints
command: >
{{ openshift.common.client_binary }} adm policy reconcile-sccs --confirm --additive-only=true
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 000000000..e55ef5f0b
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,2 @@
+ansible>=2.1
+pyOpenSSL
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index 9754687cf..ceee43441 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -832,23 +832,29 @@ def set_version_facts_if_unset(facts):
version_gte_3_1_1_or_1_1_1 = LooseVersion(version) >= LooseVersion('1.1.1')
version_gte_3_2_or_1_2 = LooseVersion(version) >= LooseVersion('1.2.0')
version_gte_3_3_or_1_3 = LooseVersion(version) >= LooseVersion('1.3.0')
+ version_gte_3_4_or_1_4 = LooseVersion(version) >= LooseVersion('1.4.0')
else:
version_gte_3_1_or_1_1 = LooseVersion(version) >= LooseVersion('3.0.2.905')
version_gte_3_1_1_or_1_1_1 = LooseVersion(version) >= LooseVersion('3.1.1')
version_gte_3_2_or_1_2 = LooseVersion(version) >= LooseVersion('3.1.1.901')
version_gte_3_3_or_1_3 = LooseVersion(version) >= LooseVersion('3.3.0')
+ version_gte_3_4_or_1_4 = LooseVersion(version) >= LooseVersion('3.4.0')
else:
version_gte_3_1_or_1_1 = True
version_gte_3_1_1_or_1_1_1 = True
version_gte_3_2_or_1_2 = True
- version_gte_3_3_or_1_3 = False
+ version_gte_3_3_or_1_3 = True
+ version_gte_3_4_or_1_4 = False
facts['common']['version_gte_3_1_or_1_1'] = version_gte_3_1_or_1_1
facts['common']['version_gte_3_1_1_or_1_1_1'] = version_gte_3_1_1_or_1_1_1
facts['common']['version_gte_3_2_or_1_2'] = version_gte_3_2_or_1_2
facts['common']['version_gte_3_3_or_1_3'] = version_gte_3_3_or_1_3
+ facts['common']['version_gte_3_4_or_1_4'] = version_gte_3_4_or_1_4
- if version_gte_3_3_or_1_3:
+ if version_gte_3_4_or_1_4:
+ examples_content_version = 'v1.4'
+ elif version_gte_3_3_or_1_3:
examples_content_version = 'v1.3'
elif version_gte_3_2_or_1_2:
examples_content_version = 'v1.2'