diff --git a/jobs/backup-restore-notifications/spec b/jobs/backup-restore-notifications/spec index ead97a2b..507513a1 100644 --- a/jobs/backup-restore-notifications/spec +++ b/jobs/backup-restore-notifications/spec @@ -40,6 +40,9 @@ properties: description: 'Client id of the UAA' notifications.uaa.client_secret: description: 'Client secret of the UAA' + notifications.cli_path: + description: 'path where the cli binary is stored' + default: /var/vcap/packages/cf-cli-8-linux/bin ssl.skip_cert_verify: description: 'Whether to verify SSL certs when making HTTP and SMTP requests' notifications.bbr.metadata: diff --git a/jobs/backup-restore-notifications/templates/common.sh.erb b/jobs/backup-restore-notifications/templates/common.sh.erb index 4f34d3cf..c4c467be 100644 --- a/jobs/backup-restore-notifications/templates/common.sh.erb +++ b/jobs/backup-restore-notifications/templates/common.sh.erb @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -ex -PATH="/var/vcap/packages/cf-cli-8-linux/bin:$PATH" +PATH="<%= properties.notifications.cli_path %>:$PATH" SCHEME="https" DOMAIN="<%= properties.domain %>" diff --git a/jobs/deploy-notifications/spec b/jobs/deploy-notifications/spec index b938d370..8cdae38f 100644 --- a/jobs/deploy-notifications/spec +++ b/jobs/deploy-notifications/spec @@ -97,4 +97,7 @@ properties: description: 'External log service URL' notifications.error_on_misconfiguration: description: 'Throw error on service misconfiguration during deployment' - default: true \ No newline at end of file + default: true + notifications.cli_path: + description: 'path where the cli binary is stored' + default: /var/vcap/packages/cf-cli-8-linux/bin \ No newline at end of file diff --git a/jobs/deploy-notifications/templates/deploy.sh.erb b/jobs/deploy-notifications/templates/deploy.sh.erb index def3b324..55b6b54c 100644 --- a/jobs/deploy-notifications/templates/deploy.sh.erb +++ b/jobs/deploy-notifications/templates/deploy.sh.erb @@ -1,6 +1,6 @@ #!/bin/bash -exu -export PATH="/var/vcap/packages/cf-cli-8-linux/bin:/var/vcap/packages/notifications-jq/bin:$PATH" +export PATH="<%= properties.notifications.cli_path %>:/var/vcap/packages/notifications-jq/bin:$PATH" export CF_HOME="/var/vcap/data/deploy-notifications/cf-home" export CF_DIAL_TIMEOUT=<%= properties.notifications.cf.dial_timeout %> diff --git a/jobs/destroy-notifications/spec b/jobs/destroy-notifications/spec index c720b3fb..1925c412 100644 --- a/jobs/destroy-notifications/spec +++ b/jobs/destroy-notifications/spec @@ -23,5 +23,8 @@ properties: description: 'Organization where the app is deployed' notifications.space: description: 'Space where the app is deployed' + notifications.cli_path: + description: 'path where the cli binary is stored' + default: /var/vcap/packages/cf-cli-8-linux/bin ssl.skip_cert_verify: description: 'Whether to verify SSL certs when making HTTP and SMTP requests' diff --git a/jobs/destroy-notifications/templates/destroy.sh.erb b/jobs/destroy-notifications/templates/destroy.sh.erb index a88cb081..bc4607a9 100644 --- a/jobs/destroy-notifications/templates/destroy.sh.erb +++ b/jobs/destroy-notifications/templates/destroy.sh.erb @@ -1,6 +1,6 @@ #!/bin/bash -ex -export PATH="/var/vcap/packages/cf-cli-8-linux/bin:$PATH" +export PATH="<%= properties.notifications.cli_path %>:$PATH" export CF_HOME=/var/vcap/data/destroy-notifications/tmp/cf-home export CF_DIAL_TIMEOUT=<%= properties.notifications.cf.dial_timeout %> diff --git a/jobs/test-notifications/spec b/jobs/test-notifications/spec index 9e6cda7c..87558085 100644 --- a/jobs/test-notifications/spec +++ b/jobs/test-notifications/spec @@ -31,3 +31,6 @@ properties: description: 'Space that contains the app' notifications.tests.performance: description: 'Toggle for running the performance tests' + notifications.cli_path: + description: 'path where the cli binary is stored' + default: /var/vcap/packages/cf-cli-8-linux/bin diff --git a/jobs/test-notifications/templates/test.sh.erb b/jobs/test-notifications/templates/test.sh.erb index 2f1d85e8..d205dc63 100644 --- a/jobs/test-notifications/templates/test.sh.erb +++ b/jobs/test-notifications/templates/test.sh.erb @@ -7,7 +7,7 @@ pushd /var/vcap/packages/acceptance export TMPDIR=${TMPDIR:-/tmp} echo TMPDIR=${TMPDIR} - export PATH=$PATH:/var/vcap/packages/cf-cli-8-linux/bin + export PATH=$PATH:<%= properties.notifications.cli_path %> export HOME=${TMPDIR}/home export CF_HOME=${TMPDIR}/cf-home export GOTMPDIR=${TMPDIR}/go/