Bug 1289249 - Move environment variable declaration to build.yml; r?dustin
In preparation for eliminating Docker image inheritance for the
desktop-build image, we move declaring of environment variables
from the base image's Dockerfile to build.yml, which is inherited at
run-time for every task using the desktop-build image.
MozReview-Commit-ID: 5XlBMULHS6z
--- a/taskcluster/ci/legacy/tasks/build.yml
+++ b/taskcluster/ci/legacy/tasks/build.yml
@@ -28,16 +28,24 @@ task:
GECKO_HEAD_REPOSITORY: '{{head_repository}}'
GECKO_HEAD_REV: '{{head_rev}}'
GECKO_HEAD_REF: '{{head_ref}}'
TOOLTOOL_REPO: 'https://github.com/mozilla/build-tooltool'
TOOLTOOL_REV: 'master'
MOZ_BUILD_DATE: '{{pushdate}}'
MOZ_SCM_LEVEL: '{{level}}'
+ # Set variables normally configured at login by the shell's parent
+ # process. These are taken from the GNU su manual.
+ LOGNAME: 'worker'
+ HOME: '/home/worker'
+ HOSTNAME: 'taskcluster-worker'
+ SHELL: '/bin/bash'
+ USER: 'worker'
+
extra:
build_product: '{{build_product}}'
build_name: '{{build_name}}'
build_type: '{{build_type}}'
index:
rank: {{rank}}
treeherder:
jobKind: build
--- a/testing/docker/centos6-build/Dockerfile
+++ b/testing/docker/centos6-build/Dockerfile
@@ -9,18 +9,10 @@ WORKDIR /home/worker
# install non-build specific dependencies in a single layer
ADD system-setup.sh /tmp/system-setup.sh
RUN bash /tmp/system-setup.sh
# Builds need the share module enabled
ADD hgrc /home/worker/.hgrc
RUN chown -R worker:worker /home/worker/.hgrc
-# Set variable normally configured at login, by the shells parent process, these
-# are taken from GNU su manual
-ENV HOME /home/worker
-ENV SHELL /bin/bash
-ENV USER worker
-ENV LOGNAME worker
-ENV HOSTNAME taskcluster-worker
-
# Set a default command useful for debugging
CMD ["/bin/bash", "--login"]