Red Hat Bugzilla – Bug 1621291
Jenkins client plugin openshiftImageStream and openshiftVerifyService
Last modified: 2018-10-11 03:25:43 EDT
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.
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.
> I think the imagestream SCM piece not sure what the "imagestream SCM piece" would be in this context?
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.
PR https://github.com/openshift/jenkins-client-plugin/pull/174/files
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
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