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

Bug 1410680

Summary: Duration is not shown correctly for Pipeline BC which has multiple stage
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: Jessica Forrester <jforrest>
Status: CLOSED WORKSFORME QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 3.4.0CC: aos-bugs, jokerman, mmccomas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-06 05:35:42 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:
Attachments:
Description Flags
StageNotStartedSequencially
none
WrongDuration none

Description Yadan Pei 2017-01-06 05:22:10 UTC
Description of problem:
When adding self-defined stages, they will not start sequentially and there is always one stage duration shown as -1h


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

How reproducible:
Always

Steps to Reproduce:
Preparation:
Make sure Jenkins image and template exists, if not please create
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/image-streams/image-streams-centos7.json -n openshift
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/jenkins-ephemeral-template.json -n openshift


1.Create a sample jenkins pipeline BC
$ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.yaml
2.Add two self-defined stages through Builds -> Pipelines -> Edit Pipeline
....
  stage 'build is the greatest stage'
  stage 'stage another'
  stage('build') {
    openshiftBuild(buildConfig: 'nodejs-mongodb-example', showBuildLogs: 'true')
  }
  stage('deploy') {
    openshiftDeploy(deploymentConfig: 'nodejs-mongodb-example')]]
.....
3.Start jenkins pipeline BC at Builds -> Pipelines -> Start Pipeline
4.Check stage info on Builds -> Pipelines page

Actual results:
4.Stages are not started sequentially and after all stages finished, duration for one stage duration is shown as -1h
Please refer to attachment

Expected results:
4.Stages should be started sequentially and show correct duration

Additional info:

Comment 1 Yadan Pei 2017-01-06 05:25:02 UTC
Created attachment 1237859 [details]
StageNotStartedSequencially

Comment 2 Yadan Pei 2017-01-06 05:26:48 UTC
Created attachment 1237861 [details]
WrongDuration

Comment 3 Yadan Pei 2017-01-06 05:35:42 UTC
Tried again with correct stage definition(Since I got this error from jenkins log <Using the ‘stage’ step without a block argument is deprecated>)

....
  stage('build is the greatest stage') {}
  stage('stage another'){}
  stage('build') {
    openshiftBuild(buildConfig: 'nodejs-mongodb-example', showBuildLogs: 'true')
  }
  stage('deploy') {
    openshiftDeploy(deploymentConfig: 'nodejs-mongodb-example')]]
.....

This time stages are started sequentially and shown with correct duration

Closing this, sorry for the inconvenience