In this lab, you will use the audit
command to get a high-level view of all pipelines in an Azure DevOps organization or project.
The audit
command will perform the following steps:
- Fetch all of the projects defined in an Azure DevOps organization.
- Convert each pipeline to their equivalent GitHub Actions workflow.
- Generate a report that summarizes how complete and complex of a migration is possible with GitHub Actions Importer.
- Followed the steps here to set up your GitHub Codespaces environment and bootstrap an Azure DevOps project.
- Completed the configure lab.
You will now perform an audit against the bootstrapped Azure DevOps project. Answer the following questions before running this command:
-
What is the Azure DevOps organization name that you want to audit?
- :organization. This should be the same organization used in the setup steps here
-
What is the Azure DevOps project name that you want to audit?
- :project. This should be the same project name used in the setup steps here
-
Where do you want to store the result?
- tmp/audit. This can be any path within the working directory from which GitHub Actions Importer commands are executed.
-
Navigate to the codespace terminal.
-
Run the following command from the root directory:
gh actions-importer audit azure-devops --output-dir tmp/audit
Note: The Azure DevOps organization and project name can be omitted from the
audit
command because they were persisted in the.env.local
file in the configure lab. You can optionally provide these arguments on the command line with the--azure-devops-organization
and--azure-devops-project
CLI options. -
The command will list all the files written to disk in green when the command succeeds.
- Find the
audit_summary.md
file in the file explorer. - Right-click the
audit_summary.md
file and selectOpen Preview
. - This file contains details that summarize what percentage of your pipelines were converted automatically.
The pipeline summary section contains high level statistics regarding the conversion rate done by GitHub Actions Importer:
## Pipelines
Total: **5**
- Successful: **5 (100%)**
- Partially successful: **0 (0%)**
- Unsupported: **0 (0%)**
- Failed: **0 (0%)**
### Job types
Supported: **5 (100%)**
- designer: **2**
- YAML: **3**
Here are some key terms in the "Pipelines" section:
- Successful pipelines had 100% of the pipeline constructs and individual items converted automatically to their GitHub Actions equivalent.
- Partially successful pipelines had all of the pipeline constructs converted, however, there were some individual items (e.g. build tasks or build triggers) that were not converted automatically to their GitHub Actions equivalent.
- Unsupported pipelines are definition types that are not supported by GitHub Actions Importer. The following Azure DevOps pipeline types are supported:
- Classic (designer)
- YAML
- Release
- Failed pipelines encountered a fatal error when being converted. This can occur for one of three reasons:
- The pipeline was misconfigured and not valid in Azure DevOps.
- GitHub Actions Importer encountered an internal error when converting it.
- There was an unsuccessful network response, often due to invalid credentials, that caused the pipeline to be inaccessible.
The "Job types" section will summarize which types of pipelines are being used and which are supported or unsupported by GitHub Actions Importer.
The build steps summary section presents an overview of the individual build steps that are used across all pipelines and how many were automatically converted by GitHub Actions Importer.
### Build steps
Total: **14**
Known: **14 (100%)**
- script: **4**
- DotNetCoreCLI@2: **2**
- 2c65196a-54fd-4a02-9be8-d9d1837b7c5d@0: **2**
- 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2: **2**
- e213ff0f-5d5c-4791-802d-52ea3e7be1f1@2: **2**
- NodeTool@0: **1**
- checkout: **1**
Actions: **19**
- run: **10**
- actions/checkout@v2: **6**
- nuget/setup-nuget@v1: **2**
- actions/setup-node@v2: **1**
Here are some key terms in the "Build steps" section:
- A known build step is a step that was automatically converted to an equivalent action.
- An unknown build step is a step that was not automatically converted to an equivalent action.
- An unsupported build step is a step that is either:
- A step that is fundamentally not supported by GitHub Actions.
- A step that is configured in a way that is incompatible with GitHub Actions.
- An action is a list of the actions that were used in the converted workflows. This is important for the following scenarios:
- Gathering the list of actions to sync to your appliance if you use GitHub Enterprise Server.
- Defining an organization-level allowlist of actions that can be used. This list of actions is a comprehensive list of which actions their security and/or compliance teams will need to review.
There is an equivalent breakdown of build triggers, environment variables, and other uncategorized items displayed in the audit summary file.
The manual tasks summary section presents an overview of the manual tasks that you will need to perform that GitHub Actions Importer is not able to complete automatically.
### Manual tasks
Total: **1**
Self hosted runners: **1**
- `mechamachine`: **1**
Here are some key terms in the "Manual tasks" section:
- A secret refers to a repository or organization level secret that is used by the converted pipelines. These secrets will need to be created manually in Actions in order for these pipelines to function properly.
- A self-hosted runner refers to a label of a runner that is referenced by a converted pipeline that is not a GitHub-hosted runner. You will need to manually define these runners in order for these pipelines to function properly.
The final section of the audit report provides a manifest of all of the files that are written to disk during the audit. These files include:
### Successful
#### actions-importer-bootstrap/pipelines/pipeline2
- [pipelines/actions-importer-bootstrap/pipelines/pipeline2/.github/workflows/pipeline2.yml](pipelines/actions-importer-bootstrap/pipelines/pipeline2/.github/workflows/pipeline2.yml)
- [pipelines/actions-importer-bootstrap/pipelines/pipeline2/config.json](pipelines/actions-importer-bootstrap/pipelines/pipeline2/config.json)
- [pipelines/actions-importer-bootstrap/pipelines/pipeline2/source.yml](pipelines/actions-importer-bootstrap/pipelines/pipeline2/source.yml)
#### actions-importer-bootstrap/pipelines/pipeline1
- [pipelines/actions-importer-bootstrap/pipelines/pipeline1/.github/workflows/pipeline1.yml](pipelines/actions-importer-bootstrap/pipelines/pipeline1/.github/workflows/pipeline1.yml)
- [pipelines/actions-importer-bootstrap/pipelines/pipeline1/config.json](pipelines/actions-importer-bootstrap/pipelines/pipeline1/config.json)
- [pipelines/actions-importer-bootstrap/pipelines/pipeline1/source.yml](pipelines/actions-importer-bootstrap/pipelines/pipeline1/source.yml)
#### actions-importer-bootstrap/pipelines/custom-transformer-example
- [pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml](pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml)
- [pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/config.json](pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/config.json)
- [pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/source.yml](pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/source.yml)
Each pipeline will have a variety of files written that include:
- The original pipeline as it was defined in Azure DevOps.
- Any network responses used to convert a pipeline.
- The converted workflow.
- Stack traces that can used to troubleshoot a failed pipeline conversion
-
Open the
tmp/audit/workflow_usage.csv
file in the file explorer. -
This file contains a comma-separated list of all actions, secrets, and runners that are used by each successfully converted pipeline:
Pipeline,Action,File path actions-importer-bootstrap/pipelines/pipeline2,actions/checkout@v2,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/pipeline2/.github/workflows/pipeline2.yml actions-importer-bootstrap/pipelines/pipeline1,actions/checkout@v2,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/pipeline1/.github/workflows/pipeline1.yml actions-importer-bootstrap/pipelines/custom-transformer-example,actions/checkout@v2,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml actions-importer-bootstrap/pipelines/custom-transformer-example,actions/setup-node@v2,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml Pipeline,Secret,File path Pipeline,Runner,File path actions-importer-bootstrap/pipelines/pipeline2,mechamachine,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/pipeline2/.github/workflows/pipeline2.yml actions-importer-bootstrap/pipelines/custom-transformer-example,mechamachine,tmp/audit/pipelines/actions-importer-bootstrap/pipelines/custom-transformer-example/.github/workflows/custom-transformer-example.yml
The contents of this file can be useful in answering questions similar to the following:
- What workflows will depend on which actions?
- What workflows use an action that must go through a security review?
- What workflows use specific secrets?
- What workflows use specific runners?