Preserve environment variables when doing sudo

This commit adds the '-E' option for all the sudo commands
in build script of agent which causes it to preserve environment
variables.

Change-Id: Ic3fbc4ee8189cc82ef99359bf61eef33dae40a5a
Closes-Bug: 1371418
This commit is contained in:
Ramakrishnan G 2014-09-19 10:43:25 +05:30
parent 75248efb48
commit 6ff2830247
2 changed files with 6 additions and 6 deletions

View File

@ -16,9 +16,9 @@
# all requirements then perform the build.
if [[ -x /usr/bin/docker.io ]]; then
sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker
sudo -E ln -sf /usr/bin/docker.io /usr/local/bin/docker
fi
cd imagebuild/coreos
sudo pip install -r requirements.txt
sudo make clean
sudo make
sudo -E pip install -r requirements.txt
sudo -E make clean
sudo -E make

View File

@ -3,8 +3,8 @@
# From a base-trusty node, this should build a CoreOS IPA image
# suitable for use in testing or production.
#
sudo apt-get update
sudo apt-get install -y docker.io
sudo -E apt-get update
sudo -E apt-get install -y docker.io
imagebuild/coreos/build_coreos_image.sh