-
Bug
-
Resolution: Won't Fix
-
Minor
I'm using publish over ssh to send file on a remote folder
and Exec commands.
As the folder where I put the files may change in the future I defined a
Jenkins environment variable: REMOTE_LOCATION.
I'd like to use this variable in SSH publish over configuration and in the
Exec command of the job.
I configured ssh publish over plugin with Remote Directory set to ${REMOTE_LOCATION}
I get this error :
ERROR: Exception when publishing, exception message [Failed to change to remote directory [${REMOTE_LOCATION}]]
Build step 'Send build artifacts over SSH' changed build result to UNSTABLE
I checked that the variable is set properly by echo ${REMOTE_LOCATION} in the Exec command.
Variables should be expanded in the "Remote Directory" configuration field.
The Remote directory configured in the global configuration (Manage Jenkins) does not support variable substitution.
The Remote directory in a job configuration does.
You should be able to set the global Remote directory to / and then use the variable in the job configuration (where Exec command is configured)