Bug 1396023 - Cannot generate whole pipeline script for dsl step "Tag OpenShift Image" using pipeline syntax
Summary: Cannot generate whole pipeline script for dsl step "Tag OpenShift Image" usin...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Justin Pierce
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-17 09:22 UTC by Dongbo Yan
Modified: 2017-03-08 18:43 UTC (History)
9 users (show)

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
Clone Of:
Environment:
Last Closed: 2017-01-18 12:55:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 17:23:26 UTC

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


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