Skip to main content



      Home
Home » Archived » Hudson » ${WORKSPACE} not resolved with Windows script build step(Trying to use windows batch command in job step and ${WORKSPACE} will not resolve)
${WORKSPACE} not resolved with Windows script build step [message #1085337] Mon, 12 August 2013 15:46 Go to next message
Eclipse UserFriend
When I use ${WORKSPACE} as part of a windows batch command it passes the value to the script with the value of ${WORKSPACE} rather than the value of the workspace.

Is there a way to get the value of ${WORKSPACE} so I don't have to hard-code the value of the path?
Re: ${WORKSPACE} not resolved with Windows script build step [message #1085343 is a reply to message #1085337] Mon, 12 August 2013 15:57 Go to previous messageGo to next message
Eclipse UserFriend
Try $WORKSPACE instead without the { }.
Re: ${WORKSPACE} not resolved with Windows script build step [message #1085371 is a reply to message #1085343] Mon, 12 August 2013 16:51 Go to previous messageGo to next message
Eclipse UserFriend
That didn't work.

Note: I'm running 3.1.0-RC1 at this point but I had the same problem with 3.0.1.

Here's an example with hardcoded values:

C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_WORKSPACE=C:\hudson_3_1_0\workspace\ebi3_runtime_installers
C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_RUNTIME=C:\hudson_3_1_0\workspace\ebi3_runtime_installers\installers\runtime
C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_ANT_SCRIPTS=C:\hudson_3_1_0\workspace\ebi3_runtime_installers\installers\ant_scripts
C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_INSTALL=C:\hudson_3_1_0\workspace\ebi3_runtime_installers\installers
C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_GRAPHICS=C:\hudson_3_1_0\workspace\ebi3_runtime_installers\installers\graphics
C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_LICENSE=C:\hudson_3_1_0\workspace\ebi3_runtime_installers\installers\license
C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_ARTIFACTS=C:\hudson_3_1_0\workspace\ebi3_runtime_installers\installers\artifacts
C:\hudson_3_1_0\workspace\ebi3_runtime_installers>build .\installers\scripts\EBI3_server.iap_xml

Here's an example with $WORKSPACE along with the subsequent information from InstallAnywhere:

16:47:44 C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_WORKSPACE=$WORKSPACE
16:47:44
16:47:44 C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_RUNTIME=$WORKSPACE\installers\runtime
16:47:44
16:47:44 C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_ANT_SCRIPTS=$WORKSPACE\installers\ant_scripts
16:47:44
16:47:44 C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_INSTALL=$WORKSPACE\installers
16:47:44
16:47:44 C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_GRAPHICS=$WORKSPACE\installers\graphics
16:47:44
16:47:44 C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_LICENSE=$WORKSPACE\installers\license
16:47:44
16:47:44 C:\hudson_3_1_0\workspace\ebi3_runtime_installers>set IA_PATH_ARTIFACTS=$WORKSPACE\installers\artifacts
16:47:44
16:47:44 C:\hudson_3_1_0\workspace\ebi3_runtime_installers>build .\installers\scripts\EBI3_server.iap_xml
16:47:47 The access path 'ANT_SCRIPTS' which is defined by a system environment points to a non-existent folder, C:\Program Files (x86)\InstallAnywhere 2012\$WORKSPACE\installers\ant_scripts. Please quit InstallAnywhere, and change the system environment variable. Then restart InstallAnywhere.
16:47:47 The access path 'WORKSPACE' which is defined by a system environment points to a non-existent folder, C:\Program Files (x86)\InstallAnywhere 2012\$WORKSPACE. Please quit InstallAnywhere, and change the system environment variable. Then restart InstallAnywhere.
16:47:47 The access path 'LICENSE' which is defined by a system environment points to a non-existent folder, C:\Program Files (x86)\InstallAnywhere 2012\$WORKSPACE\installers\license. Please quit InstallAnywhere, and change the system environment variable. Then restart InstallAnywhere.
16:47:47 The access path 'RUNTIME' which is defined by a system environment points to a non-existent folder, C:\Program Files (x86)\InstallAnywhere 2012\$WORKSPACE\installers\runtime. Please quit InstallAnywhere, and change the system environment variable. Then restart InstallAnywhere.
16:47:47 The access path 'ARTIFACTS' which is defined by a system environment points to a non-existent folder, C:\Program Files (x86)\InstallAnywhere 2012\$WORKSPACE\installers\artifacts. Please quit InstallAnywhere, and change the system environment variable. Then restart InstallAnywhere.
16:47:47 The access path 'INSTALL' which is defined by a system environment points to a non-existent folder, C:\Program Files (x86)\InstallAnywhere 2012\$WORKSPACE\installers. Please quit InstallAnywhere, and change the system environment variable. Then restart InstallAnywhere.
16:47:47 The access path 'GRAPHICS' which is defined by a system environment points to a non-existent folder, C:\Program Files (x86)\InstallAnywhere 2012\$WORKSPACE\installers\graphics. Please quit InstallAnywhere, and change the system environment variable. Then restart InstallAnywhere.

Re: ${WORKSPACE} not resolved with Windows script build step [message #1085974 is a reply to message #1085371] Tue, 13 August 2013 12:15 Go to previous message
Eclipse UserFriend
If it's in a Execute Windows batch command step then you just have to use the appropriate env variable indicator for windows %WORKSPACE%

That should get replaced correctly.
Previous Topic:Maven Build : ArrayIndexOutOfBoundsException
Next Topic:Maven Plugin 3.0.1 with E-mail Notification NPE
Goto Forum:
  


Current Time: Wed Jul 23 12:49:32 EDT 2025

Powered by FUDForum. Page generated in 0.37122 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top