This documentation supports the 23.3 version of BMC Helix Innovation Suite (AR System and BMC Helix Innovation Studio).

To view an earlier version, select the version from the Product version menu.

Example: Automating service requests for running a deployment job by using Jenkins

Use the BMC Sample Deploy Instance <version> sample service in BMC Helix Digital Workplace Catalogto automate service requests for running a deployment job in Jenkins.

Scenario

Ajay, an application business analyst, wants to create a service to automate service requests for running a BMC Helix Innovation Studiodeployment job. He uses the BMC Sample Deploy Instance <version>.zip sample service content package. Ajay first creates a Jenkins connector configuration and creates a deployment job in Jenkins. He updates the service in BMC Helix Digital Workplace Catalog. He then publishes the service to make it available to users.

The following video (2:25) explains how to automate a user request for running a deployment job:



https://youtu.be/P25iO07tZO0

Before you begin

Make sure that you create a deployment job in Jenkins. For more information, see Automating triggering of Jenkins jobs.

Task 1: To create a Jenkins connector configuration

  1. Log in to BMC Helix Digital Workplace Catalog.
  2. On the Services tab, click Connectors.
  3. Select Jenkins, click Actions, and click Open.
  4. Update the following fields:

    NameDescription
    URLURL of the Jenkins server.
    UserUsername to log in to the Jenkins server.
    Important: The user must have permissions to run the Jenkins jobs.
    PasswordPassword to log in to the Jenkins server.
    Alternatively, you can use the API token in your Jenkins user profile configuration as the password.
    Trust All CertificatesIf you want to trust your certificates, specify the value as True, else do not specify any value


  5. Click Save.

Task 2: To define the Deploy Instance service

  1. Log in to BMC Helix Digital Workplace Catalog.
  2. On the Services tab, click Services.
    The service BMC Sample Deploy Instance <version> is displayed in the Service Management console.
  3. Select the service, click Actions, and click Edit Service Name.

  4. Update the service name, and click Save.
    For example, Deploy Instance.

Task 3: To define Deploy Instance service workflow

  1. In BMC Helix Digital Workplace Catalog, in the Service Management console, select the Deploy Instance service.
  2. Click Actions and click Open.
  3. In the Service Options pane, click Edit corresponding to the Workflow option.

  4. In the Workflow and Questions pane, in the Workflow section, click Edit.

    The following workflow is displayed in the Workflow designer:


    The following elements are used in the workflow:

    ElementLabelDescription
    Create DocumentJob input parametersAccesses the attributes within the schema of the JenkinsParameters document definition.
    You must specify the document node values as they are used as input to run the Jenkins job.
    Run Jenkins jobRun Jenkins jobTriggers a Jenkins job.
    You must specify the deployment job that you want to run in the element properties.
    Get Queue ItemGet Queue ItemRetrieves the ID of an item in a Jenkins queue.
    ExclusiveNAChecks if the queue item is retrieved.
    Receive TaskWait for the queue itemWaits for the queue item to be retrieved.
    TimerNAInterrupts a wait step after time out.
    Get Jenkins Job BuildGet Jenkins job resultRetrieves the build details of a Jenkins job.
    ExclusiveNAChecks if the Jenkins job is to be completed.
    Receive TaskWait for the job resultAdds wait steps in the workflow and waits for Jenkins job completion.
    TimerNAInterrupts a wait step after time out.
    Send User MessageSend MessageSends job results to the service requester through an email.


  5. If required, update the workflow input variables.
    The following input variables are available:



    You must map these input variables to the service questionnaire so that the user responses to service questions are used as variable values.
  6. Select the Send User Message element in the workflow and update the Outgoing Profile Source and Outgoing Email Profile properties.
  7. Save the changes.

Task 4: To define the Deploy Instance service questionnaire

  1. In BMC Helix Digital Workplace Catalog, in the Service Management console, select the Deploy Instance service.
  2. Click Actions, and click Open.
  3. In the Service Options pane, click Edit corresponding to the Workflow option.

  4. In the Workflow and Questions pane, in the Questions section, click Edit.


    The following questions are displayed in the Questions Designer:

    QuestionDescription
    VM NameThe value specifies the name of the virtual machine. Users can specify the virtual machine name where they want to perform the deployment.

    Deploy BMC Helix Digital Workplace Catalog

    The value specifies the product name to deploy. Users can specify the value as true and update the product name based on your deployment job.

    Deploy BMC Helix Business Workflows

    The value specifies the product name to deploy. Users can specify the value as true and update the product name based on your deployment job.
    Deploy ApprovalThe value specifies the product name to deploy. Users can specify the value as true and update the product name based on your deployment job.


  5. If you have added additional input variables in the workflow to receive inputs from the service requester, add questions corresponding to the variables.
  6. Save the changes.

Task 5: To publish the Deploy Instance service

  1. In BMC Helix Digital Workplace Catalog, in the Service Management console, select the Deploy Instance service.
  2. In the Service Options pane, click , and click Publish.

    After you publish the service, the service is available to users. 

Task 6: To test the Deploy Instance service

  1. Log in to BMC Helix Digital Workplace Advanced.
  2. Submit a deployment request by using the Deploy Instance service.

  3. Verify that you have received an email about deployment completion.

Result

The Deploy Jenkins service is available for the users. Users can submit deployment requests by using this service and their requests are processed automatically.


Was this page helpful? Yes No Submitting... Thank you

Comments