Bug 1356037 - Serial runPolicy doesn't work for jenkinspipeline strategy
Summary: Serial runPolicy doesn't work for jenkinspipeline strategy
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build
Version: 3.3.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jimmi Dyson
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-13 10:09 UTC by XiuJuan Wang
Modified: 2017-03-08 18:43 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Pipeline strategies now support run policies (serial, parallel). Reason: Previously pipeline builds were executed independent of the requested runpolicy associated with the buildconfig which resulted in confusion. Result: Pipeline jobs running in Jenkins will now respect the runpolicy(serial, parallel) that was specified by the OpenShift build configuration.
Clone Of:
Environment:
Last Closed: 2017-01-18 12:41:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

Description XiuJuan Wang 2016-07-13 10:09:13 UTC
Description of problem:
When create a jenkinspipeline strategy buildconfig,the default runPolicy is serial. But when trigger multiple jenkinspipeline strategy builds,still using parallel policy actually.

Version-Release number of selected component (if applicable):
openshift v3.3.0.4
kubernetes v1.3.0+57fb9ac

How reproducible:
always

Steps to Reproduce:
1.Check sample-pipeline bc which using jenkinspipeline strategy
2.Trigger 2 sample-pipeline builds
3.

Actual results:
step 1:
oc get  bc sample-pipeline -n xiuwang12 -o yaml
spec:
  output: {}
  postCommit: {}
  resources: {}
  runPolicy: Serial
  source:
    secrets: null
    type: None
  strategy:
    jenkinsPipelineStrategy:
      jenkinsfile: |-
        node('agent') {
        stage 'build'
        openshiftBuild(buildConfig: 'ruby-sample-build', showBuildLogs: 'true')
        stage 'deploy'
        openshiftDeploy(deploymentConfig: 'frontend')
        }
    type: JenkinsPipeline

step 2:
sample-pipeline and ruby-sample-build are using parallel policy actually.
# oc get builds 
NAME                  TYPE              FROM          STATUS     STARTED          DURATION
ruby-sample-build-1   Source            Git@e79d887   Complete   5 minutes ago    4m16s
ruby-sample-build-2   Source            Git@e79d887   Running    40 seconds ago   35s
ruby-sample-build-3   Source            Git           New                         
sample-pipeline-1     JenkinsPipeline   Git@master    Running    6 minutes ago    6m0s
sample-pipeline-2     JenkinsPipeline   Git@master    Running    4 minutes ago    4m10s

Expected results:
Serial policy should work for jenkinspipeline strategy

Additional info:

Comment 1 Ben Parees 2016-07-13 13:44:24 UTC
This is also being tracked here:
https://github.com/fabric8io/openshift-jenkins-sync-plugin/issues/61

Comment 2 Jimmi Dyson 2016-11-09 22:38:15 UTC
Fixed in https://github.com/jenkinsci/openshift-sync-plugin/pull/17 - will be available in next release.

Comment 3 Jimmi Dyson 2016-11-10 10:56:24 UTC
Available in v0.0.16. @bparees Assigned to @tdawson to get packaged up please. No dependency changes btw.

Comment 4 Troy Dawson 2016-11-10 19:58:51 UTC
rpm has been made:
  jenkins-plugin-openshift-sync-0.0.16-1.el7
images using that rpm have been made:
  openshift3/jenkins-1-rhel7:1.651.2-30
  openshift3/jenkins-2-rhel7:2.7-15

Comment 7 Jimmi Dyson 2016-11-11 11:34:57 UTC
@jminter Thanks.

I'll release a new version soon which will of course need to be packaged. Will assign to @tdawson once release is done.

Comment 8 Jimmi Dyson 2016-11-11 23:08:41 UTC
Released v0.0.17 of sync plugin ready for packaging please @tdawson.

Comment 11 Troy Dawson 2016-11-14 13:34:59 UTC
RPM Made:
  jenkins-plugin-openshift-sync-0.0.17-1.el7
Images made and pushed to registry.ops:
  openshift3/jenkins-1-rhel7:1.651.2-33
  openshift3/jenkins-2-rhel7:2.7-18

Comment 12 Dongbo Yan 2016-11-15 06:56:41 UTC
Test with
brew-pulp.../openshift3/jenkins-2-rhel7        d126876bf60a   
brew-pulp.../openshift3/jenkins-1-rhel7        dc04c4ed570b 
openshift-login    0.9
openshift-pipeline 1.0.33
openshift-sync     0.0.17

openshift v3.4.0.26+f7e109e
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

Actual results:
Serial policy works for jenkinspipeline strategy

Comment 13 Troy Dawson 2016-11-18 14:00:03 UTC
Assigning back to Ben for documentation.

Comment 14 Ben Parees 2016-11-18 15:09:07 UTC
I've updated the doc text but assigning back to Jimmi to keep ownership/credit where it belongs (Jimmi there shouldn't be anything further needed from you on this).

Comment 16 errata-xmlrpc 2017-01-18 12:41:31 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-2017:0066


Note You need to log in before you can comment on or make changes to this bug.