2
votes

I am trying to create a build and deployment pipeline in OpenShift via Jenkins. I have followed their official tutorial: https://github.com/OpenShiftDemos/openshift-cd-demo and properly set all policies ( i am using different project names and application but the same strategy ) yet the Jenkins app deployed on cicd project cant start to build in dev project.

Error:

Error from server (Forbidden): buildconfigs.build.openshift.io buildconfig not found though the build is created and can be seen via the web console.

I am using the --from-file instead of --from-dir for binary input. Please help if any other policies need to be set for the Jenkins service account in cicd project to "start-build" in dev project.

1

1 Answers

2
votes

Yes, the Jenkins need to have access to dev project, you can use the following command to give access:

oc policy add-role-to-user edit system:serviceaccount:cicd-tools:jenkins -n example-openshift-dockerfile

cicd-tools: Project jenkins is installed in

example-openshift-dockerfile: Project that will be changed by Jenkins