OpenShift Client Jenkins Plugin Integration Failed with error flags cannot be placed before plugin name

Solution Verified - Updated -

Issue

  • While integrating OpenShift Client Jenkins Plugin the following error message is seen:

    $ oc --server=https://<api_url>:6443 --certificate-authority=/var/lib/jenkins/workspace/Openshift setup test pipeline/serverca14368677717860715739.crt --namespace=desa-api-rnpn --token=XXXXX new-app <git_source>
    
    ERROR: new-app returned an error;
    {err=flags cannot be placed before plugin name: --server=https://<api_url>:6443
    , verb=new-app, cmd=oc --server=https://<api_url>:6443 --certificate-authority=/var/lib/jenkins/workspace/Openshift setup test pipeline/serverca14368677717860715739.crt --namespace=desa-api-rnpn --token=XXXXX new-app <git_source> -o=json , out=, status=1}
    
  • Running the oc command while integrating jenkis plugin causes error.

Environment

  • Red Hat OpenShift Container Platform
    • 4.x
  • OpenShift Client Jenkins Plugin
    • 1.0.37
  • OpenShift Login Plugin
    • 1.0.27
  • OpenShift Sync
    • 1.0.53

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content