Try:

env.RUN_DISPLAY_URL



If you look at this plugin: https://plugins.jenkins.io/display-url-api

you will see there these variables you can try:

RUN_DISPLAY_URL – links to the run result
RUN_CHANGES_DISPLAY_URL – links to the changes page for a run
JOB_DISPLAY_URL – links to the jobs homepage

--
Craig


On Wed, Apr 18, 2018 at 4:29 AM, 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
> <https://groups.google.com/d/msgid/jenkinsci-users/c7b463cd-f118-486d-9dfd-e2fad833712e%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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAG%3DrPVd-chpG%2BzgyOn0AG86-Ne%2B7_VcHvNnjpJBafQdKMxPMKA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to