Jenkins Pipeline Exploration

Jenkins is used to build and test your product continuously, so developers can continuously integrate changes into the build. Jenkins is the most popular open source CI/CD tool on the market today and is used in support of DevOps, alongside other cloud native tools.

This section demonstrates how Developer Hub allows you to instantiate a Quarkus application that is built using a Jenkins pipeline as well incorporating all aspects of RHTAP.

Run the template

  1. Login to developer hub and on the left menu click Create

  2. Search for a template called Securing a Quarkus Service Software Supply Chain (Jenkins)

  3. Once you find it, click on Choose

  4. On the Provide Information for Application page, you may update the maven properties as you prefer or you can leave the defaults.

  5. On the Provide Image Registry Information, select Quay

  6. On the Application repository Information, you can enable commit signing if you wish or you can continue with the default values.

  7. Click on create. This should create the application repository, gitops repository and developer hub catalog item.

  8. Click on Open software component

  9. Click on the CI tab. There should be 3 projects visible, one for build, one for preparing a pre-prod deployment and one for preparing a prod deployment. A build should automatically trigger. If this does not show up, click on a different tab and then click back to the CI tab to refresh the page.

  10. You may click on the View build icon to view the output of the build on jenkins. Enter the credentials provided on the demo landing page.

  11. Once the build is complete, click on the Topology tab. The application for dev is now healthy, indicated by a blue ring. Click on the arrow on the application icon to view the Quarkus application.

  12. To make changes to the Quarkus application, click on the Overview tab and select the OpenShift Dev Spaces (VS Code) link. This should provision a DevSpaces project where you can update the source code as you wish. Pushing the changes back to GitLab triggers a new build and deploy to dev.

Promote to preprod

  1. To deploy your Quarkus application to preprod, switch to the Overview tab and click on the Source Code link. This should open the repository root on GitLab.

  2. On the left menu, select Code and then Tags.

  3. Click on New Tag

  4. Give the tag a name such as v1.0

  5. Click on Create tag

  6. Switch back to Developer Hub and click on the CI tab. A new preprod build will be triggered.

  7. Click on the View build icon to view the output of the preprod build.

  8. Wait for the build to complete and then click on the Topology tab. The application for preprod is now healthy, indicated by a blue ring. Click on the arrow on the application icon to view the Quarkus application.

Promote to prod

  1. To deploy your Quarkus application to prod, switch to the Overview switch back the GitLab screen.

  2. On the left menu, select Code and then Tags.

  3. In the list of tags displayed, find the tag you created on the previous step.

  4. Click the Create release button found to the right of the tag.

  5. Click on Create tag

  6. Enter a Release title for e.g. Prod-v1.0

  7. Switch back to Developer Hub and click on the CI tab. A new prod build will be triggered.

    • Click on the View build icon to view the output of the prod build.

  8. Wait for the build to complete and then click on the Topology tab. The application for prod is now healthy, indicated by a blue ring. Click on the arrow on the application icon to view the Quarkus application.