Skip to main content
NetApp Solutions

Deploy a Jenkins CI/CD Pipeline with Persistent Storage: Red Hat OpenShift with NetApp

Contributors ac-ntap banum-netapp

This section provides the steps to deploy a continuous integration/continuous delivery or deployment (CI/CD) pipeline with Jenkins to validate solution operation.

Create the resources required for Jenkins deployment

To create the resources required for deploying the Jenkins application, complete the following steps:

  1. Create a new project named Jenkins.

    Error: Missing Graphic Image

  2. In this example, we deployed Jenkins with persistent storage. To support the Jenkins build, create the PVC. Navigate to Storage > Persistent Volume Claims and click Create Persistent Volume Claim. Select the storage class that was created, make sure that the Persistent Volume Claim Name is jenkins, select the appropriate size and access mode, and then click Create.

Error: Missing Graphic Image

Deploy Jenkins with Persistent Storage

To deploy Jenkins with persistent storage, complete the following steps:

  1. In the upper left corner, change the role from Administrator to Developer. Click +Add and select From Catalog. In the Filter by Keyword bar, search for jenkins. Select Jenkins Service with Persistent Storage.

    Error: Missing Graphic Image

  2. Click Instantiate Template.

    Error: Missing Graphic Image

  3. By default, the details for the Jenkins application are populated. Based on your requirements, modify the parameters and click Create. This process creates all the required resources for supporting Jenkins on OpenShift.

    Error: Missing Graphic Image

  4. The Jenkins pods take approximately 10 to 12 minutes to enter the Ready state.

    Error: Missing Graphic Image

  5. After the pods are instantiated, navigate to Networking > Routes. To open the Jenkins webpage, click the URL provided for the jenkins route.

    Error: Missing Graphic Image

  6. Because OpenShift OAuth was used while creating the Jenkins app, click Log in with OpenShift.

    Error: Missing Graphic Image

  7. Authorize the Jenkins service account to access the OpenShift users.

    Error: Missing Graphic Image

  8. The Jenkins welcome page is displayed. Because we are using a Maven build, complete the Maven installation first. Navigate to Manage Jenkins > Global Tool Configuration, and then, in the Maven subhead, click Add Maven. Enter the name of your choice and make sure that the Install Automatically option is selected. Click Save.

    Error: Missing Graphic Image

  9. You can now create a pipeline to demonstrate the CI/CD workflow. On the home page, click Create New Jobs or New Item from the left-hand menu.

    Error: Missing Graphic Image

  10. On the Create Item page, enter the name of your choice, select Pipeline, and click Ok.

    Error: Missing Graphic Image

  11. Select the Pipeline tab. From the Try Sample Pipeline drop-down menu, select Github + Maven. The code is automatically populated. Click Save.

    Error: Missing Graphic Image

  12. Click Build Now to trigger the development through the preparation, build, and testing phase. It can take several minutes to complete the whole build process and display the results of the build.

    Error: Missing Graphic Image

  13. Whenever there are any code changes, the pipeline can be rebuilt to patch the new version of software enabling continuous integration and continuous delivery. Click Recent Changes to track the changes from the previous version.

    Error: Missing Graphic Image