Skip to content

Commit 02b88bc

Browse files
committed
CI: remove (future) deprecated --preserve-env flag
- explicitly pass GEM_HOME Fixes: ``` sudo: preserving the entire environment is not supported, '--preserve-env' is ignored ubuntu@21f652d6-b208-4386-b0c0-097e26578228:/tmp/build/44575cf5$ set -e ubuntu@21f652d6-b208-4386-b0c0-097e26578228:/tmp/build/44575cf5$ ubuntu@21f652d6-b208-4386-b0c0-097e26578228:/tmp/build/44575cf5$ cd "/tmp/build/44575cf5/bosh-linux-stemcell-builder" ubuntu@21f652d6-b208-4386-b0c0-097e26578228:/tmp/build/44575cf5/bosh-linux-stemcell-builder$ bundle install Bundler 4.0.13 is running, but your lockfile was generated with 2.5.23. Installing Bundler 2.5.23 and restarting using that version. Fetching gem metadata from https://rubygems.org/. Fetching bundler 2.5.23 Retrying download gem from https://rubygems.org/ due to error (2/4): Bundler::PermissionError There was an error while trying to write to `/usr/local/lib/ruby/gems/3.3.0/cache/bundler-2.5.23.gem`. It is likely that you need to grant write permissions for that path. ``` ^ https://bosh.ci.cloudfoundry.org/teams/stemcell/pipelines/ubuntu-resolute-builder/jobs/build-os-image/builds/1#L6a052874:4:13
1 parent b042519 commit 02b88bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ci/tasks/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ chown -R ubuntu:ubuntu "${REPO_PARENT}/bosh-linux-stemcell-builder"
7777
chown -R ubuntu:ubuntu /mnt
7878
sudo chmod u+s "$(which sudo)"
7979

80-
sudo --preserve-env --set-home --user ubuntu -- /bin/bash --login -i <<SUDO
80+
sudo --set-home --user ubuntu GEM_HOME="${GEM_HOME}" -- /bin/bash --login -i <<SUDO
8181
set -e
8282
8383
cd "${REPO_PARENT}/bosh-linux-stemcell-builder"

0 commit comments

Comments
 (0)