Skip to content

Commit

Permalink
Quote all proxy environment variables in CPI job
Browse files Browse the repository at this point in the history
- also fail if error occurs (`set -e`)

[#128004109](https://www.pivotaltracker.com/story/show/128004109)

Signed-off-by: Lyle Franklin <[email protected]>
  • Loading branch information
Forrest Sill authored and ljfranklin committed Aug 10, 2016
1 parent bf0d4d1 commit 47f0309
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions jobs/aws_cpi/templates/cpi.erb
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
#!/bin/bash

set -e

BOSH_PACKAGES_DIR=${BOSH_PACKAGES_DIR:-/var/vcap/packages}
BOSH_JOBS_DIR=${BOSH_JOBS_DIR:-/var/vcap/jobs}

<% if_p('env.http_proxy') do |http_proxy| %>
export HTTP_PROXY=<%= http_proxy %>
export http_proxy=<%= http_proxy %>
export HTTP_PROXY="<%= http_proxy %>"
export http_proxy="<%= http_proxy %>"
<% end %>

<% if_p('env.https_proxy') do |https_proxy| %>
export HTTPS_PROXY=<%= https_proxy %>
export https_proxy=<%= https_proxy %>
export HTTPS_PROXY="<%= https_proxy %>"
export https_proxy="<%= https_proxy %>"
<% end %>

<% if_p('env.no_proxy') do |no_proxy| %>
export NO_PROXY=<%= no_proxy %>
export no_proxy=<%= no_proxy %>
export NO_PROXY="<%= no_proxy %>"
export no_proxy="<%= no_proxy %>"
<% end %>

<% if_p('aws.connection_options.ca_cert') do %>
Expand Down

0 comments on commit 47f0309

Please sign in to comment.