Bug 1481010

Summary: Jenkins server image, declarative pipeline fails due to missing plugin
Product: OpenShift Container Platform Reporter: Noel OConnor <noconnor>
Component: ImageStreamsAssignee: Corey Daley <cdaley>
Status: CLOSED ERRATA QA Contact: Dongbo Yan <dyan>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.6.0CC: aos-bugs, bparees, jokerman, mmccomas
Target Milestone: ---   
Target Release: 3.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Jenkins now installs all plugins via one rpm, and the missing plugin is now included.
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-28 22:07:08 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 Noel OConnor 2017-08-13 13:13:38 UTC
Description of problem:
I've just installed OCP 3.6 and I'm trying to run a very basic declarative jenkins pipleline. I'm hitting this issue [0]  due to a missing plugin "Pipeline: Model Definition". Once added the pipeline works as expected.

[0] https://issues.jenkins-ci.org/browse/JENKINS-42620


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

I'm using the following jenkins image registry.access.redhat.com/openshift3/jenkins-2-rhel7@sha256:4647a54e7a4bba9f1ca3db364ae235b5e75a46e7d81f77152e0eef88de7ba440


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
The pipeline is as follows:

pipeline {
    agent any

    post {
      failure {
        updateGitlabCommitStatus name: 'build', state: 'failed'
      }
      success {
        acceptGitLabMR mergeCommitMessage: 'Accepted by Jenkins CI'
      }
    }

   stages{

    stage('setup') {
      steps{
        sh 'env'
        println 'Before git'
        git url: env.gitlabSourceRepoHttpUrl
      }
    }

    stage('DoWork'){
            steps{
        println "${env.gitlabSourceNamespace}/${env.gitlabSourceBranch}"
        sh 'git branch -vv'
        println "Looking to merge ${env.gitlabSourceBranch} from ${env.gitlabSourceNamespace} into ${env.gitlabTargetBranch} from ${env.gitlabTargetNamespace}"
      }
    }
   }
}

Comment 1 Corey Daley 2017-08-24 15:47:58 UTC
This pull request to the jenkins repo condenses all of the jenkins plugins that are required into one rpm that gets installed, including pipeline-model-definition.hpi, which should fix the issue described here.
https://github.com/openshift/jenkins/pull/357

Comment 2 Dongbo Yan 2017-09-15 03:21:32 UTC
Test with
brew-pulp.../openshift3/jenkins-2-rhel7                b2bc9541f0f7
pipeline-model-definition (1.1.4) plugin is installed.

Could trigger pipeline job without error: 'a missing plugin "Pipeline: Model Definition"'

but job fails to "No such DSL method 'updateGitlabCommitStatus' found among steps"

I don't think it's related to this bug, so move to verified. Please change status back if I'm wrong

Comment 5 errata-xmlrpc 2017-11-28 22:07:08 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/RHSA-2017:3188