Skip to content
Snippets Groups Projects
Commit fcb6fc56 authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Set the USER env var if not set in jenkins cron script

Some versions of cron, notably those on Debian, don't set the USER
environment that vnc requires.
parent c0bce885
No related branches found
No related tags found
No related merge requests found
...@@ -31,6 +31,9 @@ SECRET=${2} ...@@ -31,6 +31,9 @@ SECRET=${2}
SLAVE_AGENT_URL="${JENKINS_URL}/computer/${NODE_NAME}/slave-agent.jnlp" SLAVE_AGENT_URL="${JENKINS_URL}/computer/${NODE_NAME}/slave-agent.jnlp"
# name of the slave jar - full path is determined later # name of the slave jar - full path is determined later
JAR_FILE=slave.jar JAR_FILE=slave.jar
# Some versions of cron don't set the USER environment variable
# required by vnc
[ -z "$USER" ] && export USER=$(whoami)
##################################################################### #####################################################################
# Script # Script
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment