Status: Closed (View Workflow)
Server in Win 7 and Client also in Win 7, Multi-configuration Project
Environment variables are not expanding properly in XSHELL command
In Xshell, if i give a command as below,
python test.py "$WORKSPACE/sdkljnkjndj/sdkgjnkdjnbg" "http://idc-ws-isparbs.mchp-main.com:8080/job/$JOB_NAME/$BUILD_NUMBER"
and if i print the parameters in test.py, I get the following
I also get few '%' characters appended to the output
I was expecting the output as
I think the last comment might be a different issue because we only see this when the $DATE parameter is empty for the given job.
I think I'm seeing the same issue with my XShell based jobs using a parameterized build.
The wiki page suggests that the syntax for expansion is to precede the variable with a dollar sign as in $TARGET_URL. When I do that from a parameterized build which has a parameter TARGET_URL, the shell build step correctly expands the TARGET_URL reference, while the XShell build step emits a literal $TARGET_URL.
Why isn't this fixed 9 months later? Variable parsing is broken and literals are still emitted, which renders it useless for us. Please fix this.
Folks, FYI: I've fixed the issue in my fork of the plugin here: http://github.com/nekromant/xshell-plugin
I've created the relevant pull request, but it will take someone with proper access rights to actually merge it (The plugin looks quite a bit abandoned, judging by this discussion)
I've got the same issue on mac:
The command I ran:
echo "mozdownload --type=$BUILD_TYPE --branch=mozilla-aurora --platform=$PLATFORM --locale=$LOCALE --build-id=$BUILD_ID --date=$DATE --retry-attempts=10 --retry-delay=30 --directory=builds"
The result is:
mozdownload --type=tinderbox --branch=mozilla-aurora --platform=mac --locale=an --build-id=20140127004003 --date=$DATE --retry-attempts=10 --retry-delay=30 --directory=builds