You can run a pipeline from the pipeline card, in pipeline edit mode, and from the pipeline execution. You can also use the available triggers to have Code Stream run a pipeline when certain events occur.

When all the stages and tasks in your pipeline are valid, the pipeline is ready to be released, run, or triggered.

To run or trigger your pipeline using Code Stream, you can enable and run the pipeline either from the pipeline card, or while you are in the pipeline. Then, you can view the pipeline execution to confirm that the pipeline built, tested, and deployed your code.

When a pipeline execution is in progress, you can delete the execution if you are an administrator or a non-admin user.

  • Administrator: To delete a pipeline execution when it is running, click Executions. On the execution to delete, click Actions > Delete.
  • Non-admin user: To delete a running pipeline execution, click Executions, and click Alt Shift d.

When a pipeline execution is in progress and appears to be stuck, an administrator can refresh the execution from the Executions page or the Execution details page.

  • Executions page: Click Executions. On the execution to refresh, click Actions > Sync.
  • Execution details page: Click Executions, click the link to the execution details, and click Actions > Sync.

To run a pipeline when specific events occur, use the triggers.

  • Git trigger can run a pipeline when developers update code.
  • Gerrit trigger can run a pipeline when code reviews occur.
  • Docker trigger can run a pipeline when an artifact is created in a Docker registry.
  • The curl command or wget command can have Jenkins run a pipeline after a Jenkins build finishes.

For more information about using the triggers, see Triggering pipelines in Code Stream.

The following procedure shows you how to run a pipeline from the pipeline card, view executions, see execution details, and use the actions. It also shows you how to release a pipeline so that you can add it to vRealize Automation Service Broker.

Prerequisites

Procedure

  1. Enable your pipeline.
    To run or release a pipeline, you must enable it first.
    1. Click Pipelines.
    2. On your pipeline card, click Actions > Enable.
      In the Actions menu on the pipeline card, you must enable the pipeline before you can run it.

      You can also enable your pipeline while you are in the pipeline. If your pipeline is already enabled, Run is active, and the Actions menu displays Disable.

  2. (Optional) Release your pipeline.
    If you want to make your pipeline available as a catalog item in vRealize Automation Service Broker, you must release it in Code Stream.
    1. Click Pipelines.
    2. On your pipeline card, click Actions > Release.
      You can also release your pipeline while you are in the pipeline.
      In the Actions menu on the pipeline model configuration, you can release the pipeline.

      After you release the pipeline, you open Service Broker to add the pipeline as a catalog item and run it. See Add Code Stream pipelines to the Service Broker catalog in Using and Managing Service Broker.

      Note: If the pipeline requires more that 120 minutes to run, provide an approximate execution time as a request timeout value. To set or review the request timeout for a project, open Service Broker as administrator and select Infrastructure > Projects. Click your project name and then click Provisioning.

      If the request timeout value is not set, an execution that requires more than 120 minutes to run appears as failed with a callback timeout request error. However, the pipeline execution is not affected.

  3. On the pipeline card, click Run.
  4. To view the pipeline as it runs, click Executions.
    The pipeline runs each stage in sequence, and the pipeline execution displays a status icon for each stage. If the pipeline includes a user operation task, a user must approve the task for the pipeline to continue to run. When a user operation task is used, the pipeline stops running and waits for the required user to approve the task.
    For example, you might use the user operation task to approve the deployment of code to a production environment.
    If the User Operation task has an expiration timeout set in days, hours, or minutes, the required user must approve the pipeline before the task expires. Otherwise, the pipeline fails as expected.
    A pipeline that ran and is waiting for approval displays the waiting status next to Stages.
  5. To see the pipeline stage that is waiting for user approval, click the status icon for the stage.
    The pipeline stage that is waiting for approval displays the tasks in the stage.
  6. To see the details for the task, click the task.
    After the required user approves the task, a user who has the appropriate role must resume the pipeline. For required roles, see How do I manage user access and approvals in Code Stream.
    If an execution fails, you must triage and fix the cause of the failure. Then, go to the execution, and click Actions > Re-run.
    You can resume primary pipeline executions and nested executions.
    A pipeline task that is waiting for approval displays a link that opens the task.
  7. From the pipeline execution, you can click Actions to view the pipeline, and select an action such as Pause, Cancel, and more. When a pipeline execution is in progress, if you are an administer you can delete or sync the pipeline execution. If you are a non-admin user, you can delete a running pipeline.
  8. To navigate easily between executions and see the details for a task, click Executions, and click a pipeline run. Then, click the tab at the top and select the pipeline run.
    To examine a specific pipeline run, click one of the pipeline run numbers at the top.

Results

Congratulations! You ran a pipeline, examined the pipeline execution, and viewed a user operation task that required approval for the pipeline to continue to run. You also used the Actions menu in the pipeline execution to return to the pipeline model so that you can make any required changes.

What to do next

To learn more about using Code Stream to automate your software release cycle, see Tutorials for using Code Stream.