Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1414661 - Should not use deprecated syntax for defining stage in Jenkinsfile Example
Should not use deprecated syntax for defining stage in Jenkinsfile Example
Status: CLOSED CURRENTRELEASE
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console (Show other bugs)
3.5.0
Unspecified Unspecified
medium Severity low
: ---
: ---
Assigned To: Samuel Padgett
Yadan Pei
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-19 02:47 EST by Yadan Pei
Modified: 2017-07-24 10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-08 08:22:52 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:0884 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 18:50:07 EDT

  None (edit)
Description Yadan Pei 2017-01-19 02:47:48 EST
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 12:47:17 EST
This has been merged into ocp and is in OCP v3.5.0.10 or newer.
Comment 3 Yadan Pei 2017-02-03 00:49:09 EST
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

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