Bug 1414661

Summary: Should not use deprecated syntax for defining stage in Jenkinsfile Example
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: medium    
Version: 3.5.0CC: aos-bugs, jokerman, mmccomas, tdawson
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-03-08 13:22:52 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 Yadan Pei 2017-01-19 07:47:48 UTC
Description of problem:
Using the ‘stage’ step without a block argument is deprecated, if we still define stage without a block argument it will introduce unexpected result as bug 1410680, so it's better to update Jenkinsfile Examples with new definition

Version-Release number of selected component (if applicable):
v3.5.0.6+87f6173
Jenkins Image:openshift3/jenkins-2-rhel7@sha256:53fc8af74d667b54f52e76976a93f17666ed03d5564e88a509072bd971ae6399

How reproducible:
Always

Steps to Reproduce:
1.Create Jenkins template and Pipeline BC, start Pipeline BC
$ oc create -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/jenkins-ephemeral-template.json
$ oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/pipeline/samplepipeline.yaml
$ oc start-build sample-pipeline
2.Go to Pipelines -> sample-pipeline -> Configuration tab
3.Click on What's a Jenkinsfile?

Actual results:
3. Will show some Jenkinsfile Examples in popup, take one as example:
node {
  stage 'Build'
  openshiftBuild(buildConfig: 'my-build-config', showBuildLogs: 'true')
  stage 'Deploy'
  openshiftDeploy(deploymentConfig: 'my-deployment-config')
}


Expected results:
3.As bug 1410680 issued, stage definition in Jenkinsfile has changed, using the ‘stage’ step without a block argument is deprecated, it's better to update Jenkinsfile Examples as latest definition.
Especially for users who don't know how to define stage, we need to give correct instructions

Additional info:

Comment 2 Troy Dawson 2017-01-27 17:47:17 UTC
This has been merged into ocp and is in OCP v3.5.0.10 or newer.

Comment 3 Yadan Pei 2017-02-03 05:49:09 UTC
Checked against v3.5.0.14+20b49d0

Now the Jenkinsfile Examples are displayed with latest format(stage is defined in block argument):

node {
  stage('Build') {
    openshiftBuild(buildConfig: 'my-build-config', showBuildLogs: 'true')
  }
  stage('Deploy') {
    openshiftDeploy(deploymentConfig: 'my-deployment-config')
  }
}


Move to VERIFIED