I see. While I can appreciate the general utility, personally I think
expanding and hunting through the console logs might be a bit of a clunky
approach to this. Most of the (very legacy) JavaScript that does this (pre
packing) is here
<https://github.com/gocd/gocd/tree/master/server/src/main/webapp/WEB-INF/rails/app/assets/javascripts>
(*console_log_*.js*) so if you feel like figuring it out and submitting a
PR........

As another alternative, what about producing a "custom artifact" which is
just a trivial HTML page with your collection of links/useful resources
related to the given build?

You could have a task at the end of each build job which just does the
equivalent of the below (or use some basic templating language if you'd
rather)

cat <<-EOF > useful-links.html
<html>
  <head><title>Useful Links</title></head>
  <body>
    <a 
href="https://my-server/dependency-report-${GO_PIPELINE_COUNTER}-${GO_STAGE_COUNTER}.html";>Dependency
Check Report</a>
    <a href="https://my-server/deploy-failure-faq/";>Common failure causes</a>
  </body>
</html>
EOF
echo "Take a look at the 'Useful Links' tab in GoCD to help you
understand possible reasons for any failures 🥳"


If you

   1. set the task to runIf: always (so it runs on failures too)
   2. artifact that trivial useful-links.html
   3. create a custom tab for it

... folks might get used to checking that tab as an alternative to the
logs. :-)

-Chad

On Wed, Sep 14, 2022 at 4:37 PM 'Chris Gillatt' via go-cd <
[email protected]> wrote:

> Thanks for the reply, Chad
>
> We used to use GoCD's artefacts in this way, but these days we parse the
> reports as part of an app's SQI so they're stored in Mongo now with some
> other bits and I'd like not to duplicate.
> Another use case we have is, when a build fails, to produce a link to
> documentation which exists in our microsite or Confluence instance etc. We
> have the same limitation in that we're able to highlight a url with colour,
> but not make it clickable.  I've hacked about with html etc but nothing
> seemed to work - I figured it might not be possible, but then I thought
> about the drop-down arrows which expand and contract and wondered if there
> was a hidden method.
>
> Cheers anyway :)
> Chris
>
>
> On Tuesday, September 13, 2022 at 4:23:11 PM UTC+1 Chad Wilson wrote:
>
>> Hi Chris
>>
>> It doesn't support that by default to my knowledge, i.e I don't believe
>> there is any JavaScript magic running to detect and linkify URLs in the
>> logs.
>>
>> As an alternative you could configure your pipeline to publish the
>> dependency report as an artifact inside GoCD itself and any GoCD user could
>> view it there, e.g for GoCD's own build (login with the guest user icon)
>>
>>    - Via custom "Report" tab:
>>    
>> https://build.gocd.org/go/tab/build/detail/Security-Checks/latest/test/latest/dependency-check
>>    - Direct artifact view:
>>    
>> https://build.gocd.org/go/files/Security-Checks/latest/test/latest/dependency-check/dependency-check-report.html
>>
>>
>> -Chad
>>
>> On Tue, Sep 13, 2022 at 5:39 PM 'Chris Gillatt' via go-cd <
>> [email protected]> wrote:
>>
>>> Hello all
>>>
>>> I was wondering anyone knows if it's possible to have the Console Log in
>>> the GoCD GUI for a pipeline run to render a URL as a clickable link?
>>> Similar to the behaviour of the iTerm2 terminal emulator.
>>>
>>> For example, as part of our pipelines, we run tests such as Dependency
>>> Check which we've configured to upload reports to a repo and produce a
>>> URL.  The URL is printed in the console log, and we're able to highlight it
>>> using ansi colours for it to stand out.  What would be even better is if it
>>> was a clickable link too.  Currently users have to copy and paste the URL
>>> into a browser to view the report.
>>>
>>> Cheers
>>> Chris
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "go-cd" 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/go-cd/257e29b5-63cf-4533-9abf-e1bf76c616c3n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/go-cd/257e29b5-63cf-4533-9abf-e1bf76c616c3n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" 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/go-cd/bef54e87-c3fa-486d-b3f3-4abda7d762ffn%40googlegroups.com
> <https://groups.google.com/d/msgid/go-cd/bef54e87-c3fa-486d-b3f3-4abda7d762ffn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" 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/go-cd/CAA1RwH-kXHw96iL8E%2BC4X4FKCRqPaxWkAWrFTubeRBqbtPdWBQ%40mail.gmail.com.

Reply via email to