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

Bug 1396023

Summary: Cannot generate whole pipeline script for dsl step "Tag OpenShift Image" using pipeline syntax
Product: OpenShift Container Platform Reporter: Dongbo Yan <dyan>
Component: ImageStreamsAssignee: Justin Pierce <jupierce>
Status: CLOSED ERRATA QA Contact: Wang Haoran <haowang>
Severity: low Docs Contact:
Priority: low    
Version: 3.4.0CC: aos-bugs, bparees, cewong, gmontero, jokerman, jupierce, mmccomas, rymurphy, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Bug caused by migrating to a new naming convention for tagging. The fix was to separate the pipeline-DSL and freestyle-steps to use different Jenkins jelly: https://github.com/openshift/jenkins-plugin/pull/116
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-18 12:55:40 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 Dongbo Yan 2016-11-17 09:22:53 UTC
Description of problem:
Cannot generate whole pipeline script for dsl step "Tag OpenShift Image" using pipeline syntax, lose some mandatory parameters

Version-Release number of selected component (if applicable):
brew-pulp.../openshift3/jenkins-2-rhel7     9697e3752b3f  
brew-pulp.../openshift3/jenkins-1-rhel7     5730acae8c1c
openshift-login	0.9	
openshift-pipeline	1.0.34	
openshift-sync	0.0.17

openshift v3.4.0.26+f7e109e
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

How reproducible:
Always

Steps to Reproduce:
1.Create a jenkins server
 $ oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/jenkins-ephemeral-template.json
2.Login jenkins webconsole, create a pipeline job, select the new pipeline job, click "Pipeline Syntax", then switch to pipeline syntax page

3.Pull down "Sample Step" to select "openshiftTag: Tag OpenShift Image", then generate pipeline script, check the output

Actual results:
pipeline script lose some mandatory parameters,
 openshiftTag alias: 'false', apiURL: '', authToken: '', destinationAuthToken: '', destinationNamespace: '', namespace: '', verbose: 'false'


Expected results:
openshiftTag alias: 'false', apiURL: '', authToken: '', destStream: '', destTag: '', destinationAuthToken: '', destinationNamespace: '', namespace: '', srcStream: '', srcTag: '', verbose: 'false'

Additional info:

Comment 1 Gabe Montero 2016-11-17 15:27:42 UTC
Iteresting ... the pipeline syntax page might not be honoring @DataBoundConstructor ... this is not what I remember but it has been a while.

A broader examination might be in order, perhaps some (re)research into the Jenkins pipeline plugin stuff.

Justin / Cesar / Ryan - FYI.

Comment 2 Gabe Montero 2016-11-17 18:24:41 UTC
Well now I think this is a java annotation "thing"

At first this definitely seemed like a jenkins pipeline plugin "shortcoming"

Steps where the DataBoundConstructor has a single parameter, the parameter name is generated by "Pipeline Syntax".  I'm seeing the correct list for

- openshiftBuild
- openshiftCreateResource
- openshiftDeleteResourceByJsonYaml
- openshiftDeploy
- openshiftVerifyDeployment
- openshiftExec

Where as image tagging for example had the issue.

But then, openshiftScale worked, and it has two ... but its annotation is on the same line as the ctor.

So either it is the placement of the annotation, or it is a "greater than 2" sort of thing.

About to experiement ... will update shortly.

Comment 6 Gabe Montero 2016-11-17 20:55:22 UTC
Fix checks out ... starting the update plugin/image process.

Comment 8 Gabe Montero 2016-11-21 14:55:49 UTC
The jenkins rhel image on brew-pulp has v1.0.35 of the openshift pipeline plugin, which has Justin's fix.

Comment 9 Dongbo Yan 2016-11-23 03:08:45 UTC
Test with 
brew-pulp.../openshift3/jenkins-1-rhel7   latest              9edb7f9e5157   
brew-pulp.../openshift3/jenkins-2-rhel7   latest              b5b09fbedfc0 
openshift-login	0.9
openshift-pipeline	1.0.36
openshift-sync	0.0.17

openshift v3.4.0.28+dfe3a66
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

Actual result:
openshiftTag alias: 'false', apiURL: '', authToken: '', destStream: '', destTag: '', destinationAuthToken: '', destinationNamespace: '', namespace: '', srcStream: '', srcTag: '', verbose: 'false'

Comment 11 errata-xmlrpc 2017-01-18 12:55:40 UTC
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