Where does go job take the environment variables from?

When I execute the printenv command on the go-agent

go@05f749b73185:/tmp$ printenv
LESSOPEN=| /usr/bin/lesspipe %s
LESSCLOSE=/usr/bin/lesspipe %s %s

But when I execute the printenv command from inside a job i get this result

  • NET I/O stats value missing inside GKE docker container
  • boot2docker host bind mount volume size limited to 1.8 GB
  • How can I provide application config to my .NET Core Web API services running in docker containers?
  • Docker: Connect to container (without exposing ports)
  • Using Docker for Asp.Net 5.0 Development on Linux
  • Kubernetes - Creating a specific namespace for “services”
  • 06:57:26.482 [go] Start to execute task: <exec command="printenv" />.
    06:57:26.493 GO_SERVER_URL=https://go-server:8154/go/
    06:57:26.493 JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre
    06:57:26.494 SHLVL=2
    06:57:26.494 MAVEN_HOME=/usr/share/maven
    06:57:26.495 LOG_DIR=/var/log/go-agent
    06:57:26.495 GO_TRIGGER_USER=anonymous
    06:57:26.495 GO_SERVER=go-server
    06:57:26.496 GO_PIPELINE_LABEL=8
    06:57:26.496 GO_STAGE_NAME=build
    06:57:26.497 HOSTNAME=05f749b73185
    06:57:26.497 PWD=/var/lib/go-agent
    06:57:26.498 GO_STAGE_COUNTER=1
    06:57:26.498 AGENT_WORK_DIR=/var/lib/go-agent
    06:57:26.499 GO_JOB_NAME=Compile
    06:57:26.499 MAVEN_VERSION=3.3.9
    06:57:26.499 OLDPWD=/etc/service/go-agent
    06:57:26.500 LC_CTYPE=en_US.UTF-8
    06:57:26.500 AGENT_STARTUP_ARGS=-Dcruise.console.publish.interval=10 -Xms128m -Xmx256m    -Djava.security.egd=file:/dev/./urandom
    06:57:26.501 GO_FROM_REVISION=b6f8f0f3bedabe1cc0ffa1334c290f32da723cde
    06:57:26.501 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    06:57:26.501 GO_TO_REVISION=b6f8f0f3bedabe1cc0ffa1334c290f32da723cde
    06:57:26.502 USER=go
    06:57:26.502 GO_SERVER_PORT=8153
    06:57:26.502 GO_PIPELINE_NAME=DropwizardSeed
    06:57:26.503 HOME=/var/go
    06:57:26.503 UID=103
    06:57:26.503 GO_ENVIRONMENT_NAME=local
    06:57:26.506 INITRD=no
    06:57:26.507 GO_PIPELINE_COUNTER=8
    06:57:26.508 GO_REVISION=b6f8f0f3bedabe1cc0ffa1334c290f32da723cde
    06:57:26.509 LANG=en_US.UTF-8

    If you look at the JAVA_HOME environment variable it’s different between the job call and the call directly when you’re logged in the machine.
    This can be solved by setting the environment variable in the pipeline, but how can I configure my go-server and go-agents so I don’t have to do this? What if I want to use another JDK as default?

    Where does that JAVA_HOME environment variable come from?

  • java tomcat let's encrypt with docker
  • ADD Command for Docker Toolbox on Mac
  • On Docker for Mac what would be the host ip as seen from the container? [duplicate]
  • Using SMB shares as docker volumes
  • How to pass -mem to dockerized Play application
  • Linux machine with docker deploy windows container
  • One Solution collect form web for “Where does go job take the environment variables from?”

    Have you checked /etc/default/<agent-name>
    In this file you can define the default values for an agent and you can also define environment variables using export command.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.