What is the main idea? I'm not sure that populating downstream log into upstream is a right way. Maybe promoting-plugin could help you with publishing downstream job results?
On Friday, November 9, 2012 5:09:14 PM UTC+2, Sven Finsterwalder wrote: > > Hi, > > *thank you for your help* > > now i have some lines of code that works (see below). > *only one last question: how do i put the output into the log of the > parent build??* > > def deploymentuni = > Jenkins.getInstance().getItemByFullName("deployment-universal") > def color = deploymentuni.getIconColor() > println(color) > > if(color == hudson.model.BallColor.BLUE){ > def job = > Jenkins.getInstance().getItemByFullName("selenium2-portalservices-Smoketests-windows-Chrome") > def lastbuild = job.getLastBuild() > > println(lastbuild) > def build = job.getBuildByNumber(lastbuild.getNumber()) > def logFilePath = build.getLogFile().getPath() > println(logFilePath) > String logContent = new File(logFilePath).text > println(logContent) > } > > > Am Freitag, 9. November 2012 14:15:53 UTC+1 schrieb AdvanTiSS: >> >> Script language is a Groovy >> <http://www.google.com.ua/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&ved=0CCMQFjAA&url=http%3A%2F%2Fgroovy.codehaus.org%2F&ei=9P-cUMa4OIXMswadvICoAw&usg=AFQjCNHR2-H2RKw_0SISk1PgkTbA-2GRQA&sig2=0qQgOLZhKjLXIwsmnVVQwg>- >> >> syntax very similar to java. >> In groovy system script you can use all classes, their methods and >> properties. >> I recommend to download jenkins-ci sources from github, open it with >> Intellij IDEA or Eclipse and digging here jenkins code for available >> classes and properties. >> >> You can use jenkins script console to debug your scripts >> for example - getting build log file of job "MyJobName" build 123 >> >> def job =Jenkins.getInstance().getItemByFullName("MyJobName") >> def build = job.getBuildByNumber(123) >> def logFilePath = build.getLogFile().getPath() >> >> >> >> >> >> >> >> >> On Friday, November 9, 2012 11:18:32 AM UTC+2, Sven Finsterwalder wrote: >>> >>> ok... thanks. >>> What kind of language should i use for that script? java? >>> >>> How can i access the log output of the downstream job? >>> >>> Am Freitag, 9. November 2012 09:53:52 UTC+1 schrieb AdvanTiSS: >>>> >>>> 1. Use Copy Artifact >>>> Plugin<http://wiki.jenkins-ci.org/display/JENKINS/Copy+Artifact+Plugin> to >>>> copy artifacts from downstream job if you need >>>> 2. Use email-ext [pre-send script] feature to modify message content >>>> 3. Add artifacts as attachments to email >>>> >>>> On Friday, November 9, 2012 9:42:34 AM UTC+2, Sven Finsterwalder wrote: >>>>> >>>>> thank, i try it but i havent found any possibilty to add content from >>>>> another job to the mainjob >>>>> >>>>> Am Donnerstag, 8. November 2012 09:19:30 UTC+1 schrieb AdvanTiSS: >>>>>> >>>>>> You can try email-ext plugin >>>>>> >>>>>> On Wednesday, November 7, 2012 2:21:19 PM UTC+2, Sven Finsterwalder >>>>>> wrote: >>>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> i have one question. >>>>>>> In my jenkins there is one job which starts with a parameter two >>>>>>> other build-jobs. >>>>>>> The Job will fail if one of the triggered jobs fails and send one >>>>>>> email. >>>>>>> >>>>>>> I wish to add the reason in that email why the other job is failing. >>>>>>> Is that possible? >>>>>>> >>>>>>