Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ci/tasks/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ chown -R ubuntu:ubuntu "${REPO_PARENT}/bosh-linux-stemcell-builder"
chown -R ubuntu:ubuntu /mnt
sudo chmod u+s "$(which sudo)"

# pass SHLVL or '~ubuntu/.bash_logout' will exit 1
sudo --set-home --user ubuntu \
--preserve-env=GEM_HOME,UBUNTU_ADVANTAGE_TOKEN,UBUNTU_FIPS_USE_IAAS_KERNEL \
-- /bin/bash --login -i <<SUDO
--preserve-env=GEM_HOME,SHLVL,UBUNTU_ADVANTAGE_TOKEN,UBUNTU_FIPS_USE_IAAS_KERNEL \
-- /bin/bash --login <<SUDO
set -e

cd "${REPO_PARENT}/bosh-linux-stemcell-builder"
Expand Down
5 changes: 3 additions & 2 deletions ci/tasks/os-images/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ chown -R ubuntu:ubuntu "${REPO_PARENT}/bosh-linux-stemcell-builder"
chown -R ubuntu:ubuntu /mnt
sudo chmod u+s "$(which sudo)"

# pass SHLVL or '~ubuntu/.bash_logout' will exit 1
sudo --set-home --user ubuntu \
--preserve-env=GEM_HOME,BUILD_TIME,UBUNTU_ADVANTAGE_TOKEN,UBUNTU_DEBOOTSTRAP_MIRROR \
-- /bin/bash --login -i <<SUDO
--preserve-env=GEM_HOME,SHLVL,BUILD_TIME,UBUNTU_ADVANTAGE_TOKEN,UBUNTU_DEBOOTSTRAP_MIRROR \
-- /bin/bash --login <<SUDO
set -e

cd "${REPO_PARENT}/bosh-linux-stemcell-builder"
Expand Down
Loading