Bug 1304975 - Failed to build when add Create resources in OpenShift with Add Build Step in config page for jenkins-1-rhel7 image
Summary: Failed to build when add Create resources in OpenShift with Add Build Step in...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Gabe Montero
QA Contact: Wang Haoran
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-05 07:39 UTC by Wenjing Zheng
Modified: 2016-05-12 16:28 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-12 16:28:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:1064 0 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 3.2 security, bug fix, and enhancement update 2016-05-12 20:19:17 UTC

Description Wenjing Zheng 2016-02-05 07:39:14 UTC
Description of problem:
Below warning appears when try to use "Add Build Step"->"Create resources in OpenShift":
Started by user Jenkins Admin
Building in workspace /var/lib/jenkins/jobs/testplugin/workspace
BUILD STEP:  OpenShiftCreator in perform on namespace test
ERROR: Build step failed with exceptionjava.lang.IllegalArgumentException: Invalid character: h
        at org.jboss.dmr.JSONParserImpl.invalid(JSONParserImpl.java:136)
        at org.jboss.dmr.JSONParser.yyLex(JSONParser.java:596)
        at org.jboss.dmr.JSONParser.yyParse(JSONParser.java:662)
        at org.jboss.dmr.ModelNode.fromJSONString(ModelNode.java:1472)
        at com.openshift.jenkins.plugins.pipeline.OpenShiftCreator.coreLogic(OpenShiftCreator.java:131)
        at com.openshift.jenkins.plugins.pipeline.OpenShiftBaseStep.perform(OpenShiftBaseStep.java:147)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
        at hudson.model.Build$BuildExecution.build(Build.java:205)
        at hudson.model.Build$BuildExecution.doRun(Build.java:162)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
        at hudson.model.Run.execute(Run.java:1738)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:98)
        at hudson.model.Executor.run(Executor.java:410)
Build step 'Create resource(s) in OpenShift' marked build as failure
Finished: FAILURE

Version-Release number of selected component (if applicable):
jenkins-1-rhel7 f708901345d7

How reproducible:
always

Steps to Reproduce:
1. Create a project
2. $oc policy add-role-to-user admin system:serviceaccount:test:default -n test
3.  $oc new-app -f https://raw.githubusercontent.com/openshift/origin/master/examples/jenkins/jenkins-ephemeral-template.json
4. Go to jenkins job page click "new item" -->write item name: testplugin-->select "Freestyle project"-->save
5. select job "testplugin" to Configure
  click "Add build step"---->"Create resources in OpenShift " , and configure below:
The JSON or YAML that defines the OpenShift resource(s) to create : paste https://raw.githubusercontent.com/openshift/origin/master/examples/hello-openshift/hello-pod.json 
6. Save the changes and click Build Now

Actual results:
Job failed

Expected results:
Job should succeed

Additional info:

Comment 1 Ben Parees 2016-02-05 20:07:04 UTC
You need to paste the actual json content into the field, not the url to the json.

Comment 2 Ben Parees 2016-02-05 20:07:23 UTC
Gabe, we should probably make that field a textbox, not a textfield.

Comment 3 Gabe Montero 2016-02-05 22:14:30 UTC
yep, good call Ben, or maybe a "textarea" (described just before textbox at https://jenkins-ci.org/maven-site/jenkins-core/jelly-taglib-ref.html#form:textarea).

i'll play / compare and incorporate in my next push for the plugin

Comment 4 Wenjing Zheng 2016-02-06 02:05:31 UTC
Yes, should input the content of the json file, thanks! Closing this bug now.

Comment 6 errata-xmlrpc 2016-05-12 16:28:05 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/RHSA-2016:1064


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