Bug 1410680 - Duration is not shown correctly for Pipeline BC which has multiple stage
Summary: Duration is not shown correctly for Pipeline BC which has multiple stage
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Jessica Forrester
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-06 05:22 UTC by Yadan Pei
Modified: 2017-01-06 05:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-06 05:35:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
StageNotStartedSequencially (19.68 KB, image/png)
2017-01-06 05:25 UTC, Yadan Pei
no flags Details
WrongDuration (17.63 KB, image/png)
2017-01-06 05:26 UTC, Yadan Pei
no flags Details

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


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