Re: Definition of buildresultsurl for dashboard
Julian Simpson <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <CANwBkz8E06BmxEpUMQMcwRQAyxKg-fJX8N-L=drsxKsxw+gs_g@mail.gmail.com> |
2011/7/14 Paul Müller-Salget <[email protected]> > Hi all**** > > ** ** > > This is driving me crazy for some time and I fail to see what I am doing > wrong:**** > > ** ** > > I am running CruiseControl 2.8.4 with the dashboard instead of the JSP. > I've been meaning to try and reproduce this, but to be honest that is unlikely to happen right now. It looks like a bug, however. Sorry. Julian. > **** > > ** ** > > I want to send Emails for failing builds, pointing to the dashboard URL.** > ** > > ** ** > > I did a lot of research on the net and my conclusion is:**** > > **1. **This is at least in general supported**** > > **2. **There is no switch or property to change the layout of the > URL**** > > **3. **The Layout depends on a parser, looking for the word > “dashboard” in the provided URL**** > > ** ** > > While I would have preferred a “dashbordresultsurl”, this would work for > me. So I tried:**** > > buildresultsurl =http://localhost/dashboard/tab/build/detail/integration** > ** > > ** ** > > I expected this to translate to something like this:**** > > http://localhost/dashboard/tab/build/detail/integration/20110713132815**** > > ** ** > > But instead I get:**** > > > http://localhost/dashboard/tab/build/detail/integration?log=log20110713132815Lbuild.9 > **** > > ** ** > > This is the JSP layout. But there clearly is the word “dashboard” in my > URL. What am I doing wrong?**** > > ** ** > > More information**** > > The idea, that I would have to provide the word “dashboard” in the URL to > change the layout is not some lunatic idea of myself, I found it here:**** > > http://jira.public.thoughtworks.org/browse/CC-809**** > > ** ** > > “The hyperlinks output by LinkEmailPublisher are hardcoded to append ? or & > followed by log=nnnnnnn. This format does not work with the new dashboard. > **** > > ** ** > > I propose a solution which looks for the string "dashboard" in the name and > if it is found, a new format URL is output, otherwise we simply output the > old format.”**** > > ** ** > > I even took a look into the code where it says:**** > > ** ** > > - if (buildResultsURL.indexOf("?") == -1) {**** > > - message.append("?");**** > > + // New dashboard uses a different URL format**** > > + if (buildResultsURL.indexOf("dashboard") == -1) {**** > > + if (buildResultsURL.indexOf("?") == -1) {**** > > + message.append("?");**** > > + } else {**** > > + message.append("&");**** > > + }**** > > +**** > > + message.append("log=");**** > > + message.append(baseLogFileName);**** > > } else {**** > > - message.append("&");**** > > + message.append("/");**** > > + if (baseLogFileName.indexOf("log") == 0) {**** > > + String temp = baseLogFileName.substring(3);**** > > + int n;**** > > + for (n = 0; n < temp.length(); n++) {**** > > + if (!Character.isDigit(temp.charAt(n))) {**** > > + temp = temp.substring(0, n);**** > > + break;**** > > + }**** > > + }**** > > + message.append(temp);**** > > + } else {**** > > + message.append(baseLogFileName);**** > > + }**** > > }**** > > **** > > - message.append("log=");**** > > - message.append(baseLogFileName);**** > > -**** > > return message.toString();**** > > }**** > > ** ** > > Obviously I don’t do java, so I am a bit lost at how to do this…**** > > > ------------------------------------------------------------------------------ > AppSumo Presents a FREE Video for the SourceForge Community by Eric > Ries, the creator of the Lean Startup Methodology on "Lean Startup > Secrets Revealed." This video shows you how to validate your ideas, > optimize your ideas and identify your business strategy. > http://p.sf.net/sfu/appsumosfdev2dev > _______________________________________________ > Cruisecontrol-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user > > -- Julian Simpson The Build Doctor Ltd. http://www.build-doctor.com [email protected] (+44) 207 183 0323 ------------------------------------------------------------------------------ 10 Tips for Better Web Security Learn 10 ways to better secure your business today. Topics covered include: Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, security Microsoft Exchange, secure Instant Messaging, and much more. http://www.accelacomm.com/jaw/sfnl/114/51426210/ _______________________________________________ Cruisecontrol-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user