Openshift Cluster-Role Permission Problem

0
2177

While start a pipeline on jenkins for Openshift Container Platform ,I got below error.

[Pipeline] End of Pipeline
[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
ERROR: process returned an error;
{reference={}, err=error: unable to process template
  processedtemplates.template.openshift.io is forbidden: User “system:serviceaccount:emre:jenkins” cannot create processedtemplates.template.openshift.io in the namespace “project-name”: User “system:serviceaccount:emre:jenkins” cannot create processedtemplates.template.openshift.io in project “baft-dev”
, verb=process, cmd=oc –server=server-adress –insecure-skip-tls-verify –namespace=project-name –token=XXXXX process -f /tmp/process7847255318255027820.markup -p 

Resolution:

You should give a cluster-role to user

oc adm policy add-cluster-role-to-user processedtemplates.template.openshift.io system:serviceaccount:baft:jenkins -n baft-test

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.