开发者

Changing environment in Hudson, that stays for the whole build

开发者 https://www.devze.com 2022-12-19 17:27 出处:网络
how can I execute a batch-file or just some (e.g. twice) commands in a job of Hudson (running on windows xp, as a non-service, but may change), 开发者_JAVA技巧that the environment just stays for the w

how can I execute a batch-file or just some (e.g. twice) commands in a job of Hudson (running on windows xp, as a non-service, but may change), 开发者_JAVA技巧that the environment just stays for the whole build.

I need to do this, because I have to change the current path with 'cd' (we are using relative paths in our proj) and 'set' some environment-variables for msbuild.

Thank you in Advance.


Not sure why you need to get out of the service realm. My understanding was so far that Hudson starts a new environment for every job, so that the jobs don't interfere with each other. So if you don't use commands that effect other ennvironments (e.g. subst) you will be fine with adding a "Execute Windows Batch Command".

If your service runs with the wrong permissions, you have two options. First, change the permission of the service (run it under a different user than the local system user) or call the runas command. If for whatever reason you still need to contain changes to certain parts of your job you can always call cmd to create a new environment.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号