Bug 1591182

Summary: Pipeline view log-link does not work if Jenkins deployed to different namespace
Product: OpenShift Container Platform Reporter: Janne Metso <jmetso>
Component: BuildAssignee: Ben Parees <bparees>
Status: CLOSED DUPLICATE QA Contact: Wenjing Zheng <wzheng>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: aos-bugs, jokerman, mmccomas, spadgett
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-14 15:19:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Janne Metso 2018-06-14 08:11:42 UTC
Description of problem:
When configuring a pipeline build configuration to a different namespace than the Jenkins server is running, the "View logs"-link in the openshift web console does not show the full url to jenkins console log. The url is missing the full jenkins hostname, for example http://jenkins/job/custom-images-rh-sso-mssql-pipeline/66/console.

Version-Release number of selected component (if applicable):
3.6

How reproducible:
Always

Steps to Reproduce:
1. Create two namespaces: jenkins and build
2. Deploy jenkins to jenkins namespace using jenkins-persistent template
3. Give jenkins service account from jenkins namespace edit privileges to build namespace
4. Configure jenkins to scan build namespace for builds,
5. Create a jenkins-pipeline build config to build namespace
6. Run the pipeline in build-namespace
7. Click the "View logs" link as after the pipeline has started running

Actual results:
Clicking "View logs"-link does not take you anywhere.

Expected results:
Clicking "View logs"-link opens Jenkins console to show the pipeline logs.


Additional info:

Comment 1 Samuel Padgett 2018-06-14 13:20:15 UTC
The web console uses the annotation set by the sync plugin:

https://github.com/openshift/origin-web-console/blob/enterprise-3.6/app/scripts/filters/resources.js#L772-L782

Comment 2 Ben Parees 2018-06-14 15:19:02 UTC

*** This bug has been marked as a duplicate of bug 1542460 ***