Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1356037 - Serial runPolicy doesn't work for jenkinspipeline strategy
Serial runPolicy doesn't work for jenkinspipeline strategy
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Build (Show other bugs)
3.3.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Jimmi Dyson
Wang Haoran
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-13 06:09 EDT by XiuJuan Wang
Modified: 2017-03-08 13 EST (History)
7 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-18 07:41:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 12:23:26 EST

  None (edit)
Description XiuJuan Wang 2016-07-13 06:09:13 EDT
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 09:44:24 EDT
This is also being tracked here:
https://github.com/fabric8io/openshift-jenkins-sync-plugin/issues/61
Comment 2 Jimmi Dyson 2016-11-09 17:38:15 EST
Fixed in https://github.com/jenkinsci/openshift-sync-plugin/pull/17 - will be available in next release.
Comment 3 Jimmi Dyson 2016-11-10 05:56:24 EST
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 14:58:51 EST
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 06:34:57 EST
@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 18:08:41 EST
Released v0.0.17 of sync plugin ready for packaging please @tdawson.
Comment 11 Troy Dawson 2016-11-14 08:34:59 EST
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 01:56:41 EST
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 09:00:03 EST
Assigning back to Ben for documentation.
Comment 14 Ben Parees 2016-11-18 10:09:07 EST
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 07:41:31 EST
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.