Service accounts are used to grant access to OpenShift resources.
They use Tokens stored in secrets.
Create service account with name jenkins.
oc create serviceaccount jenkins
Get the access token of the jenkins service account. This will be used from the build server.
oc serviceaccounts get-token jenkins
Give jenkins service account edit rights ...
to the actual project:
oc policy add-role-to-user edit system:serviceaccount:$(oc project --short):jenkins
to any project (change PROJECT-NAME to the name of the project):
oc policy add-role-to-user edit system:serviceaccount:PROJECT-NAME:jenkins