In OpenShift, how can a Jenkins pipeline build run in multiple namespaces instead of only the Jenkins namespace?

Solution Unverified - Updated -

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 cicd will handle it, creating the build pods inside the namespace myapp instead of cicd.

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content