Skip to content

Commit

Permalink
Merge pull request #79 from pb82/asb-compat-fix
Browse files Browse the repository at this point in the history
dont require service binding id
  • Loading branch information
pb82 authored Jul 16, 2018
2 parents ff346ff + 799ef70 commit aae3e02
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ OiBpb3NJc1Byb2R1Y3Rpb24KICAgICAgdGl0bGU6IElzIHRoaXMgYSBwcm9kdWN0aW9uIGNlcnRp\
ZmljYXRlPwogICAgICBkZWZhdWx0OiBmYWxzZQogICAgICB0eXBlOiBib29sZWFuCiAgICAgIGRp\
c3BsYXlfdHlwZTogY2hlY2tib3gKICAgICAgZGlzcGxheV9ncm91cDogaU9TCg=="


COPY playbooks /opt/apb/actions
COPY roles /opt/ansible/roles
COPY vars /opt/ansible/vars
Expand Down
7 changes: 6 additions & 1 deletion roles/bind-unifiedpush-apb/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# Store the name of the service instance. It's required for some purposes like adding
# annotations to the mobile client

- name: "Get the name of the service insance"
- name: "Get the name of the service instance"
shell: oc get serviceinstance --namespace={{ namespace }} -o jsonpath='{.items[?(@.spec.externalID=="{{ _apb_service_instance_id }}")].metadata.name}'
register: serviceinstance_name

- name: "Ensure compatibility with older ASB versions"
set_fact:
_apb_service_binding_id: "DUMMY"
when: _apb_service_binding_id is not defined

- set_fact:
UPS_NAME: "{{ serviceinstance_name.stdout }}"

Expand Down
4 changes: 2 additions & 2 deletions roles/provision-unifiedpush-apb/tasks/provision-ups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
until: ups_result.stdout.find("3") != -1
retries: 30
delay: 5

- name: "Create {{ namespace }} PushApplication on service host {{ unifiedpush_service.service.spec.cluster_ip }}"
uri:
url: "http://{{ unifiedpush_service.service.spec.cluster_ip }}/rest/applications"
Expand All @@ -127,7 +127,7 @@
validate_certs: no
body_format: json
status_code: 201
retries: 5
retries: 30
until: namespace_push_app.status == 201
delay: 5
register: namespace_push_app
Expand Down

0 comments on commit aae3e02

Please sign in to comment.