using wget to pass env variables in TeamCity 6.02

I am using TeamCity 6.02 and am trying to trigger a build as noted in http://confluence.jetbrains.net/display/TCD6/Accessing+Server+by+HTTP#AccessingServerbyHTTP-TriggeringaBuildFromScript

I can get the build triggered but passing an environment gives me an error.

see below

wget http://username:password!@daytfsdev02:8080/httpAuth/action.html?add2Queue=bt4&env.name=env.TAG_NUMBER&env.value=3.6.9.2


SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files (x86)\GnuWin32/etc/wgetrc
--2011-02-15 14:07:08--  http://autobuild:*password*@daytfsdev02:8080/httpAuth/a
ction.html?add2Queue=bt4
Resolving daytfsdev02... 10.125.16.46
Connecting to daytfsdev02|10.125.16.46|:8080... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to daytfsdev02:8080.
HTTP request sent, awaiting response... 200 OK
Length: 0
Saving to: `action.html@add2Queue=bt4.13'

    [ <=>                                   ] 0           --.-K/s   in 0s

2011-02-15 14:07:08 (0.00 B/s) - `action.html@add2Queue=bt4.13' saved [0/0]

'env.name' is not recognized as an internal or external command,
operable program or batch file.
'env.value' is not recognized as an internal or external command,
operable program or batch file.

As you can see the build gets queued but the env.name & env.value cause an error.

Any help would be appreciated

2 comments
Comment actions Permalink

So I figured it out the windows command processer is intercepting the & character the solution is to enclose everything in double quotes.

0
Comment actions Permalink

This is the exact same/similar thing which I am trying to achieve as I posted a question here : http://devnet.jetbrains.com/message/5514242#5514242 . My query is to : how do you retrieve the tag name set & passed in build 'B'. It would be nice if you could share from build 'B' side on how you retrieved values..

0

Please sign in to leave a comment.