Not sure why that particular Groovy isn't working or not, but is there a
reason why you aren't using the Git Plugin?

Richard.

On Thu, 2 Apr 2015 at 07:55 Alex Ward <[email protected]> wrote:

> Hi,
>
> I am exploring Jenkins as my company's new CI server replacing Cruise
> Control. I am new to both Jenkins and Groovy.
>
> I am having an issue running the following Groovy script. The first and
> last parts run just fine, but for some reason git pull never works. I'm not
> seeing any exception, just the output "[git pull]".
>
> def srcDir = new File("C://JenkinsBuilds//ProjectName//Source")
>
>
> String command1 = "git checkout master"
> println ("[$command1]")
> Process process1 = command1.execute(null, srcDir)
> process1.waitFor()
> println(process1.text)
>
>
> String command2 = "git pull"
> println ("[$command2]")
> Process process2 = command2.execute(null, srcDir)
> process2.waitFor()
> println(process2.text)
>
>
> String command3 = "git branch -r --no-merged master"
> println ("[$command3]")
> Process process3 = command3.execute(null, srcDir)
> process3.waitFor()
> println(process3.text)
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/a7ce3c6e-54f1-438a-8064-27b3bd698533%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/a7ce3c6e-54f1-438a-8064-27b3bd698533%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAMui9479Yo%3DUmqJebsVMPy9huNsEszpxckQhhT5-EmGVavLaSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to