In OpenShift, how can a Jenkins pipeline build run in multiple namespaces instead of only the Jenkins namespace?
Issue
There's a shared Jenkins project that is used by all applications in the cluster, is it possible to run the builds from this jenkins in multiple namespaces, depending on the project?
Example:
- Jenkins is located in namespace
cicd; - Another namespace (
myapp) has a BuildConfig with the Jenkins pipeline strategy; - When the build runs, Jenkins in namespace
cicdwill handle it, creating the build pods inside the namespacemyappinstead ofcicd.
Environment
- Red Hat OpenShift Container Platform (OCP)
- 4.x
- 3.11
- Native Jenkins 2 from OpenShift
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.