Append /display/redirect to the URL.

> On 18. Apr 2018, at 13:29, Sverre Moe <[email protected]> wrote:
> 
> We have the following content to mail notifications.
> def content "Check console output at ${env.BUILD_URL} to view the results."
> 
> Where env.BUILD_URL has the following URL
> https://build-ci.company.com:8443/job/projectA/job/user%252Fwork/115/
> 
> Is there an environment variable to get Blue Ocean build URL?
> https://build-ci.compay.com:8443/blue/organizations/jenkins/projectA/detail/user%2Fwork/115/
> 
> 
> A workaround would be to replace string values:
> Multibranch Pipeline
> def buildURL = env.BUILD_URL
> def newBuildURL = buildURL.replace("job/${env.JOB_NAME}", 
> "blue/organizations/jenkins/${env.JOB_NAME}")
> newBuildURL = newBuildURL.replace("job/${env.BRANCH_NAME}", 
> "detail/${env.BRANCH_NAME}")
> 
> Pipeline
> def buildURL = env.BUILD_URL
> def newBuildURL = buildURL.replace("job/${env.JOB_NAME}", 
> "blue/organizations/jenkins/${env.JOB_NAME}/detail/${env.JOB_NAME}")
> 
> 
> -- 
> 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/c7b463cd-f118-486d-9dfd-e2fad833712e%40googlegroups.com.
> 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/31D98588-C300-48A3-86C3-E164F83747FB%40beckweb.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to