Build hook

The Pulse Support forums are here so that you can ask questions or leave comments related to pulse. They are watched by Zutubi staff who will endeavour to answer your questions promptly.

Build hook

Postby Kire on Mon Jul 04, 2016 12:07 pm

I'm trying to run a script post-build, but I'm getting nowhere

command: tagrelease.cmd
arguments:$(build.number)
working directory: $(base.dir)

keep getting: Cannot run program xxx (in directory "${base.dir}"): CreateProcess error=267, The directory name is invalid

I'm sure the directory is there.

I want to tag subversion after successful completion of a build. If I run the cmd by hand it works perfectly.

Edit:

Even tried a fixed path and found this in the logging:
INFO: Error executing task for hook 'TagRelease': Cannot run program "tagrelease.cmd" (in directory "C:\Projects"): CreateProcess error=2, The system cannot find the file specified
java.io.IOException: Cannot run program "tagrelease.cmd" (in directory "C:\Projects"): CreateProcess error=2, The system cannot find the file specified

I'm 100% sure the file C:\Projects\tagrelease.cmd exists.

I would expect 'run executable task' in build hook works the same as 'run executable task' in build step. But whatever I try it's not working :(

I haven't tried the 'add tag' to be honest. Since I want to tag more projects than only the current project.

any help?

Regards,
Erik
Kire
 
Posts: 18
Joined: Tue Dec 17, 2013 6:35 pm

Re: Build hook

Postby jason.sankey on Tue Aug 09, 2016 9:49 am

Hi Erik,

Firstly I apologise for the slow response. Notifications from the forums are broken so I missed recent posts.

On to the problem: I think the first issue is due to base.dir not being defined in a post-build hook. The base.dir is specific to each build stage, so is defined in stage hooks but not build hooks. The next issue could be due to where the hook is run. By default hooks all run on the master, is that where the executable is located? Or is it on the agent?

Cheers,
Jason
jason.sankey
 
Posts: 1815
Joined: Sun Apr 30, 2006 12:26 pm


Return to Pulse Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron