Running the pipeline and workflow and reviewing its output


(BMC.DB2.SPE2404) 

This topic describes how to run a pipeline and a workflow in its respective deployment environment and to review the output log.

To run a pipeline in Azure DevOps manually

Important

You can run the pipeline manually or with an automatic trigger.

  1. On the Azure DevOps dashboard, click Pipelines to expand it.
  2. In Pipelines, click All to display a list of all the pipelines.
  3. Select a pipeline, to open a list of all runs for the specific pipeline.
  4. On the Runs tab, perform one of the following actions:
    • In the upper right corner, click Edit and edit the pipeline.
      • In the upper right corner, click Run to run a new instance of the pipeline.
      • In the Run pipeline dialog box, update any advanced options as required.
      • In the lower right corner, click Run to run the pipeline.
    • In the upper right corner, click Run to run a new instance of the pipeline.
      • In the Run pipeline dialog box, update any advanced options as required.
      • In the lower right corner, click Run to run the pipeline.
  5. After the pipeline run is complete, perform one of the following actions on the summary dashboard:
    • Click the Jobs tab to view the logs of each step.
    • Click Rerun failed jobs to rerun unsuccessful jobs
    • Click Run new to run a new instance of the pipeline.

To review the output log for a pipeline run in Azure DevOps

  1. On the summary dashboard, perform one of the following steps:
    • Click the vertical ellipsis () at the top right corner of the Azure job summary.
      1. Click Download Logs .
      2. Unzip the downloaded zip file and open the log text files for the steps from the job folder.
    • In the Jobs section, click Job to open the logs for each step.
      • Select the steps to view the logs.
      • Select Job at the top or an individual step, and click View raw log to view its raw log.
  2. Review the following items in the output log:
    • Job name
    • Return code
    • Number of files
    • Pipeline status

To run a workflow in GitHub Actions manually

Important

You can run the workflow manually with the event trigger:
on: workflow_dispatch

  1. On the GitHub Actions tab, click All workflows to display a list of all the workflows.
  2. Select a workflow from the list to open a list of all runs for that workflow.
  3. In the workflow runs list, expand the Run workflow button at the upper right corner to perform one of the following actions:
    •  Select the branch for Use workflow from.
    • Click Run workflow to run the workflow.
  4. After the workflow run is complete, perform one of the following actions on the summary dashboard:
    • Select the steps in the workflow run to expand the workflow results.
    • Click Re-run all jobs to re-run all the jobs in the workflow.
    • Click the ellipsis (...) on the right side of the workflow run summary dashboard:
      • Click Create status badge to create a status badge.
      • Click Delete all logs to delete all the logs.

To review the output log for a workflow run in GitHub Actions

  1. In the workflow run list, click the link for the workflow run that you want to review. In the workflow run summary, under Jobs or in the visualization graph, select the job to view the logs.
  2. Review the following items in the output log:
    • Job name
    • Return code
    • Number of files
    • Workflow status

To run a pipeline in GitLab CI/CD manually

(BMC.DB2.SPE2501)

  1. On the GitLab Project Build menu, select Pipelines.
  2. Click New pipeline.
  3. On the Run pipeline dialog box, perform the following actions:
    • Select your branch.
    • (Optional) Define pipeline variables.
    • Click New pipeline.

Important

  • If you are editing your branch pipeline in the Pipeline editor, click Commit changes, to run pipeline automatically.
  • There are several types of GitLab CI/CD pipelines as well as several methods to run GitLab CI/CD pipelines. For more information, see the GitLab documentation.
  • Types of GitLab CI/CD pipeline:
    • Branch
    • Tag
    • Merge request
    • Merge result
    • Merge train
  • GitLab CI/CD pipeline methods: manual, trigger, schedule.

To review the output log for a pipeline run in GitLab CI/CD

(BMC.DB2.SPE2501)

Important

If you commit the pipeline from the Pipeline editor, click View pipeline and then follow step 2.

  1. From the GitLab Project Build menu, select Pipelines.
  2. From the list, select your pipeline run result.
  3. On the Pipeline tab of the Pipeline details page, select a job to open the output log.
    • Expand the Executing "step_script" stage of the job script and scroll through each step.
    • Click the Show complete raw button to view its raw output log.

To review the JES job log output

Use the following procedure to review the JES job log output after running a SQL Assurance and JCL execution step in a pipeline or workflow:

  1. From the job log, select the SQL Assurance or JCL execution step.
  2. Search for Job Log Output Path= in the log to get the agent or runner workspace path.
  3. Go to the server where the agent or runner is configured to view the job log output path previously found in the log.
  4. Select the item corresponding to your log output. The format of the item is as follows:
    pipelineName/workflowName-buildNumber-jobName-jobID

    Example

    SA1-261-COBDSQL-J0157779

  5. Select the SA Violations Report, to view the SQL violations for your build. The name of the item has the following format:

    pipelineName/workflowName-buildNumber-Static/Dynamic SQL-jobNumber-SA Violations Report

    Example

    SA1-261-Static SQL-J0157779-SA Violations Report

    For more information on SQL Assurance report, see Sample SQL Assurance report AS$RSLT.

  6. Select the Explain report, to view the Explain analysis for your build. The name of the item has the following format:

    pipelineName/workflowName-buildNumber-Static/Dynamic SQL-jobNumber-Explain Report

    Example

    SA1-18-Dynamic SQL-J0180603-Explain Report

Responding to violations

On evaluation of SQL statements, if you discover violations, then the return code and the build status partially depends on the definition of Violation Response in your job.

Violation Response is the application's reaction when violations are encountered.

Violation Response

Description

Fail

Fail will cause a rule violation to fail the plugin step. The job will receive Return code 8.

Warn

Warn will allow the plugin step to succeed, if a violation is encountered. The job will receive Return code 4. 

This is common in both BMC AMI SQL Assurance for Db2 - Analyze Static SQL and BMC AMI SQL Assurance for Db2 - Analyze Dynamic SQL plugin steps.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*