Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1621291

Summary: Jenkins client plugin openshiftImageStream and openshiftVerifyService
Product: OpenShift Container Platform Reporter: Robert Bost <rbost>
Component: BuildAssignee: Gabe Montero <gmontero>
Status: CLOSED ERRATA QA Contact: XiuJuan Wang <xiuwang>
Severity: low Docs Contact:
Priority: low    
Version: 3.7.1CC: aos-bugs, bparees
Target Milestone: ---   
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-11 07:25:25 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 Robert Bost 2018-08-23 14:50:53 UTC
Description of problem:

The openshiftImageStream and openshiftVerifyService may be missing from the new jenkins-client-plugin or implementing the same behavior has changed. Can documentation be added to the jenkins-client-plugin README to specify how to implement those functions?

Additional Info:
I'm looking for something similar to this section of jekins-client-plugin README:

https://github.com/openshift/jenkins-client-plugin#looking-to-verify-a-deployment-we-can-still-do-that

Just for the openshiftImageStream and openshiftVerifyService.

Comment 1 Gabe Montero 2018-08-30 16:27:34 UTC
I have an `openshiftVerifyService` equivalent working and will update the README shortly.

We are not implementing the ImageStream SCM equivalent in the client plugin at this time.

I will update the README to note that as well.

Ben - I think the imagestream SCM piece is in line with our prior conversations, but certainly chime in as you deem appropriate.

Comment 2 Ben Parees 2018-08-30 16:36:42 UTC
> I think the imagestream SCM piece

not sure what the "imagestream SCM piece" would be in this context?

Comment 3 Gabe Montero 2018-08-30 17:09:09 UTC
Ben reminded me:  with the advent of OpenShift Pipeline Build Strategy, incorporating your pipeline into such a BuildConfig along with the use of an Image Change Trigger is the better choice for triggering pipeline jobs from changes to ImageStreams in OpenShift.

The reason behind why we don't have an imagestream SCM in the new plugin.

Will add some verbiage around that in the README update.

Comment 5 XiuJuan Wang 2018-09-07 03:28:10 UTC
Create a service named frontend.
Create a new pipeline item in jenkins console
Configure the pipeline job with code of equivalent of openshiftVerifyService

openshift.withCluster() {
    openshift.withProject() {
        def serviceSelector = openshift.selector("svc", "frontend")
        def clusterIP = serviceSelector.object().spec.clusterIP
        def port = serviceSelector.object().spec.ports[0].port
        echo "cluster ip ${clusterIP} port ${port}"
        env.SERVICE_URL = "http://" + clusterIP + ":" + port
        // update the parameters to curl to deal with 
        // authentication to your service, or manage retry 
        // or timeouts, as needed
        sh 'curl -s ${SERVICE_URL}'
    }
}

The job build succeed with svc page returned.

openshift v3.11.0-0.28.0
kubernetes v1.11.0+d4cacc0
jenkins-2-rhel7:v3.11.0-0.28.0

Comment 7 errata-xmlrpc 2018-10-11 07:25:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:2652