Skip to content

Commit

Permalink
Set necessary environment variables during build
Browse files Browse the repository at this point in the history
Co-authored-by: Ralf Pannemans <[email protected]>
  • Loading branch information
pbusko and c0d1ngm0nk3y committed Apr 23, 2024
1 parent cdf9a78 commit ff6f1ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/cloud_controller/diego/cnb/staging_action_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ def task_environment_variables
[
::Diego::Bbs::Models::EnvironmentVariable.new(name: 'CNB_USER_ID', value: '2000'),
::Diego::Bbs::Models::EnvironmentVariable.new(name: 'CNB_GROUP_ID', value: '2000'),
::Diego::Bbs::Models::EnvironmentVariable.new(name: 'CNB_STACK_ID', value: lifecycle_stack)
::Diego::Bbs::Models::EnvironmentVariable.new(name: 'CNB_STACK_ID', value: lifecycle_stack),
::Diego::Bbs::Models::EnvironmentVariable.new(name: 'LANG', value: STAGING_DEFAULT_LANG)
]
end

Expand Down Expand Up @@ -135,7 +136,8 @@ def stage_action
user: 'vcap',
args: lifecycle_data[:buildpacks].map do |buildpack|
['--buildpack', buildpack[:url]]
end.flatten
end.flatten,
env: BbsEnvironmentBuilder.build(staging_details.environment_variables)
)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ module CNB
::Diego::Bbs::Models::RunAction.new(
path: '/tmp/lifecycle/builder',
user: 'vcap',
args: ['--buildpack', 'gcr.io/paketo-buildpacks/node-start', '--buildpack', 'gcr.io/paketo-buildpacks/node-engine']
args: ['--buildpack', 'gcr.io/paketo-buildpacks/node-start', '--buildpack', 'gcr.io/paketo-buildpacks/node-engine'],
env: generated_environment
)
end

Expand Down

0 comments on commit ff6f1ef

Please sign in to comment.