I am using the Git Plugin. I just needed to add some custom parameters. 

Here's a high level overview of what I'm trying to accomplish. As I 
mentioned, I'm new to Jenkins so I am totally open to any ideas so if you 
know of a more efficient way of accomplishing what I need to do, I'm all 
ears:)

I needed to create two jobs: One for for building branches (using msbuild) 
and one for deploying branches (using masterdeploy). 

The msbuild/masterdeploy tools cannot change so I needed to figure out a 
way to allow Jenkins to work with this environment. 

For both jobs I needed to be able to get a list containing "master" and all 
origin branches that have not been merged into master. We don't have a 
good/standard Git workflow yet so we have a ton of branches and 
unfortunately there is nothing I can do about that right now. Anyway, this 
list would then become a parameter in the build process so QA can specify 
which branch to build

For the deploy job there are two additional lists, "Build to Deploy" and 
"Deployment Environment", the first being nothing more than a list of 
builds for the branch they selected in the previous parameter

These scripts are all going to be repeated for 30+ websites so I put them 
in a Scriptler for reusability.


On Wednesday, April 1, 2015 at 4:43:55 PM UTC-5, Richard Bywater wrote:
>
> 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 <alexw...@gmail.com <javascript:>> 
> 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 jenkinsci-use...@googlegroups.com <javascript:>.
>> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/1021339e-0703-4bf3-aa9e-123992335470%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to