Lesson 6: Configuring the value stream

You can learn about configuring the value stream for Jira, GitHub, Jenkins, and DevOps Deploy in HCL DevOps Velocity (Velocity).

Before you begin

You must have completed all the previous lessons in this tutorial.

About this task

After you created the value stream in Velocity, you can modify the JSON file to define the queries for the Phases and Stages in the JSON file according to your project requirements.

Refer to the following table for the Phases and Stages associated with Jira, GitHub, Jenkins, and DevOps Deploy in this tutorial.

Plug-in Value stream phases Value stream stages
Jira Planning
  • Backlog
Jira and GitHub Development
  • In progress
  • In Review
Jira and GitHub Merged
  • Merged
Jenkins Build
  • Build
DevOps Deploy Deployment
  • DEV
  • QA
  • PROD

Procedure

  1. Perform the following steps to configure the Phases and Stages in the value stream:
    1. On the Value Streams page, select the value stream that you created in Lesson 5: Creating the value stream.
    2. Click Edit value stream map.
    3. Modify the phases in the JSON file as shown in the following example:
      
        "phases": [
          {
            "name": "Planning",
            "description": "",
            "stages": [
              {
                "name": "Backlog",
                "query": "(issue.status=\"To Do\")",
                "description": "",
                "targets": [
                  "In Progress"
                ],
                "wipLimit": 10,
                "showAlerts": true,
                "showSpeed": true,
                "gates": null
              }
            ]
          },
          {
            "name": "Development",
            "description": "",
            "stages": [
              {
                "name": "In Progress",
                "query": "(issue.status=\"In Progress\") AND (pr.status!=\"open\")",
                "description": "",
                "targets": [
                  "In Review"
                ],
                "wipLimit": null,
                "showAlerts": true,
                "showSpeed": true,
                "gates": null
              },
              {
                "name": "In Review",
                "query": "(issue.status=\"In Review\") AND (pr.status=\"open\")",
                "description": "",
                "targets": [
                  "Merged"
                ],
                "wipLimit": null,
                "showAlerts": true,
                "showSpeed": true,
                "gates": null
              }
            ]
          },
          {
            "name": "Merged",
            "description": "",
            "stages": [
              {
                "name": "Merged",
                "query": "(issue.status=\"Done\") AND (pr.status=\"merged\") AND build.status!=success AND deployment.env!=DEV",
                "description": "",
                "targets": [
                  "Build"
                ],
                "wipLimit": null,
                "showAlerts": true,
                "showSpeed": true,
                "gates": null
              }
            ]
          },
          {
            "name": "Build",
            "description": "",
            "stages": [
              {
                "name": "Build",
                "query": "(issue.status=\"Done\") AND (pr.status=\"merged\") AND build.status=success AND deployment.env!=DEV",
                "description": "",
                "targets": [
                  "DEV"
                ],
                "wipLimit": null,
                "showAlerts": true,
                "showSpeed": true,
                "gates": null
              }
            ]
          },
          {
            "name": "Deploy",
            "description": "",
            "stages": [
              {
                "name": "DEV",
                "query": "(issue.status=\"Done\") AND (pr.status=\"merged\") AND build.status=success AND deployment.env = 'DEV' AND deployment.env != 'QA'",
                "description": "",
                "targets": [
                  "QA"
                ],
                "wipLimit": null,
                "showAlerts": true,
                "showSpeed": true,
                "gates": null
              },
              {
                "name": "QA",
                "query": "(issue.status=\"Done\") AND (pr.status=\"merged\") AND build.status=success AND deployment.env = 'QA' AND deployment.env != 'PROD'",
                "description": "",
                "targets": [
                  "PROD"
                ],
                "wipLimit": null,
                "showAlerts": true,
                "showSpeed": true,
                "gates": null
              },
              {
                "name": "PROD",
                "query": "(issue.status=\"Done\") AND (pr.status=\"merged\") AND build.status=success AND deployment.env = 'PROD' AND deployment.status =success",
                "description": "",
                "targets": [],
                "wipLimit": null,
                "showAlerts": true,
                "showSpeed": true,
                "gates": null
              }
            ]
          }
        ],
      
    4. Click Save.

      The value stream page displays the Phases and Stages for the integration.

  2. Perform the following steps to update the metrics definition for the value stream:
    1. On the Value Streams page, select the value stream that you created in Lesson 5: Creating the value stream.
    2. Click Edit value stream map.
    3. Update the metrics in the JSON file as shown in the following example:
      
        "leadTimeChange": {
          "start": null,
          "end": null
        },
        "leadTime": {
          "start": "Backlog",
          "end": "Merged"
        },
        "cycleTime": {
          "start": "In Progress",
          "end": "Merged"
        },
        "devCycleTime": {
          "start": "In Progress",
          "end": "In Review"
        },
  3. Perform the following steps to add the link rules to link the Jira issue with the associated pull request in GitHub:
    1. On the Value Streams page, select the value stream that you created in Lesson 5: Creating the value stream.
    2. Click Edit value stream map.
    3. Modify the linkRules in the JSON file as shown in the following example:
       "linkRules": [
          {
            "fromIntegrationName": "TUTORIAL_GITHUB",
            "toIntegrationName": "TUTORIAL_JIRA",
            "fromField": "pr.name",
            "toField": "issue.id",
            "pattern": "([A-Z]+-[0-9]+)"
          }
        ],
      Property Description
      toIntegrationName Name of the integration to which you are linking.
      toField Field in the toIntegrationName integration that you are linking.
      pattern Regular expression that determines if the linking fields match. For example, [[A-Z]+-[0-9]+].
      fromIntegrationName Name of the integration from which you are linking.
      fromField Field in the fromIntegrationName integration that you are linking.
    In this lesson, you have learned to configure the value stream for Jira, GitHub, Jenkins, and DevOps Deploy.

What to do next

You can learn about setting up build and deployment jobs in Jenkins. See Lesson 6: Setting up the build and deployment jobs in Jenkins.