Skip to content

Commit

Permalink
Follow up to d3e188a to ensure CPI uses gem path at runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
jpalermo committed Apr 16, 2024
1 parent d3e188a commit a09c77d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions jobs/aws_cpi/templates/cpi.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ set -e

BOSH_PACKAGES_DIR=${BOSH_PACKAGES_DIR:-/var/vcap/packages}
source ${BOSH_PACKAGES_DIR}/aws-cpi-ruby-3.2/bosh/runtime.env
ruby_major_minor=$(ruby -v | grep -E -o "[0-9]+\.[0-9]")
BOSH_JOBS_DIR=${BOSH_JOBS_DIR:-/var/vcap/jobs}
export HOME=~

Expand All @@ -27,6 +28,7 @@ export BOSH_CA_CERT_FILE=$BOSH_JOBS_DIR/aws_cpi/config/cacert.pem
<% end %>

export BUNDLE_GEMFILE=$BOSH_PACKAGES_DIR/bosh_aws_cpi/Gemfile
export GEM_HOME="${BOSH_PACKAGES_DIR}/bosh_aws_cpi/gem_home/ruby/${ruby_major_minor}.0"

exec bundle exec $BOSH_PACKAGES_DIR/bosh_aws_cpi/bin/aws_cpi \
$BOSH_JOBS_DIR/aws_cpi/config/cpi.json

0 comments on commit a09c77d

Please sign in to comment.