Issue editing Jenkins pipeline serviceaccount role
Issue
The following jenkins pipelines created using the system:admin user:
apiVersion: v1
kind: Template
metadata:
name: deploy-pipeline
parameters:
objects:
- apiVersion: v1
kind: "BuildConfig"
metadata:
name: "moo-deploy-pipeline"
spec:
source:
git:
uri: "https://test.example.com/SO000223/moo-config.git"
sourceSecret:
name: "gitcredential"
strategy:
jenkinsPipelineStrategy:
jenkinsfilePath: moo-deploy.groovy
- The jenkins serviceaccount was automatically created with "edit" role. Then tried to substitute the edit role applied to the jenkins sa, removing "edit" and adding a new "vnf-edit" role by running the following command:
# oc adm policy remove-role-from-user edit system:serviceaccount:moo-pvv-totp:jenkins -n moo-pvv-totp
error: unable to find target [system:serviceaccount:moo-pvv-totp:jenkins]
Environment
- Red Hat OpenShift Container Platform 3.11
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.