From cc85424576f2d9671dd92e1478ca57ed80ecf051 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Thu, 11 Aug 2022 15:11:44 -0700 Subject: [PATCH 01/22] Adding Jenkins audit lab --- jenkins/valet-audit-lab.md | 114 +++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 jenkins/valet-audit-lab.md diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md new file mode 100644 index 0000000..07887da --- /dev/null +++ b/jenkins/valet-audit-lab.md @@ -0,0 +1,114 @@ +# Audit Jenkins pipelines using the Valet audit command + +In this lab, you will use Valet to `audit` an Azure DevOps organization. The `audit` command can be used to scan a CI server and output a summary of the current pipelines. + +What happens behind the scenes is that Valet will perform a `dry-run` transformation on each of the Jenkins pipelines to its GitHub actions equivalent. Once that process is complete, Valet will perform an aggregation of all of these transformed workflows. This summary can be used as a planning tool and to help you understand how complete of a migration is possible with Valet. + +- [Prerequisites](#prerequisites) +- [Perform an audit](#perform-an-audit) +- [View audit output](#view-audit-output) +- [Review the pipelines](#review-the-pipelines) +- [Next Lab](#next-lab) + +## Prerequisites + +1. Follow all steps [here](../jenkins#readme) to set up your environment. +2. Follow all steps [here](../jenkins#valet_configure_lab) to finish setting up Valet. + +## Perform an audit + +You will use the codespace preconfigured in this repository to perform the audit. + +1. Navigate to the codespace Visual Studio Code terminal. +2. Verify you are in the root directory. +3. Now, from root dirrectory, run the following Valet audit command: + +``` +gh valet audit jenkins --output-dir tmp/audit +``` + +4. Valet displays green log files to indicate a successful audit + +### Example + +![valet-audit-1](https://user-images.githubusercontent.com/19557880/184247823-77aa9fa0-da6a-48dc-b7a3-32e1a633045a.png) + +## View audit output + +The audit summary, logs, config files, jenkinsfiles, and transformed Actions workflows should all be located in the `tmp/audit` folder. + +1. Under the `audit` folder find the `audit_summary.md` +2. Right-click the `audit_summary.md` file and select `Open Preview` +3. The file contains details about your current pipelines and what can be migrated 100% automatically vs. what will need some manual intervention or aren't supported by GitHub Actions. +4. Review the file, it should like like the image below: + +### Example + +![valet-audit-2](https://user-images.githubusercontent.com/26442605/169615428-26f7a962-2064-46d0-8206-ea930109b252.png) + +## Review the pipelines + +### Pipelines + +The audit summary starts by giving a summary of the types of pipelines that were extracted from Jenkins. + +- It shows how there were a total of 4 pipelines extracted. + +- 50% pipelines were successful. This means that Valet knew how to map all the constructs of the Jenkins pipeline to a GitHub Actions equivalent. So all of the build pluggins and triggers that are referenced were all successfully converted into a GitHub Actions equivalent. + +- 50% pipelines were partially successful. That means that Valet knew how to map all the constructs of the Jenkins pipeline but there may be a plugin that is referenced that Valet doesn’t get automatically mapped to a Github Actions equivalent. + +- 0% of these pipelines are unsupported. If there were any that would fall under this category that would mean that those pipelines are using a pipeline type that is fundamentally not supported by Valet. If there were any scripted pipelines they would appear here. + +- 0% of these fail altogether. pipeline. If there were any pipelines that would fall under this category taht would mean that these pipelines were misconfigured or there was an issue with Valet. + +Under the `Job types` section, we can see that the `audit` command is able to support the conversion of project, freestyle (flow-defintion), and multibranch pipelines from Jenkins and convert them to a GitHub Actions workflow. Valet does not support converting [scripted pipelines](https://www.jenkins.io/doc/book/pipeline/syntax/#scripted-pipeline) (e.g. pure Groovy). + +#### Example + +![valet-audit-3](https://user-images.githubusercontent.com/19557880/184190501-6bb2ad34-1680-404a-9cb5-93012a25e0c8.png) + +### Build steps + +Under the `Build steps` section we can see a breakdown of the build steps that were used in these pipelines. + +- Supported: 7/9 discrete build steps are considered known by Valet. When Valet encounters a build step of this type, it knows exactly how to map that into a GitHub Actions equivalent. +- Unknown: 2/9 discrete build steps are considered known by Valet. When Valet enounters a build step of this type, it does not yet know to map this automatically to a GitHub Action equivalent. +- Unsupported: There are currently no build steps that are unknown so this category is not shown. If there were unsupported steps, it would mean one of three things: + 1. The way that plugin was configured for a given job is unsupported. + 2. The plugin itself is fundamentally not supported in GitHub Actions. + 3. It's supported by default in GH Actions. + +Under the `Actions` section we have the list of the actions that were used in order to implement the transformation of all of these build steps. Valet is a planning tool that can be really helpful to facilitate this migration to GitHub Actions and this list of Actions is a great place to understand what dependencies you will be taking on third-party actions after this migration. + + So if you are doing things like setting up the allow list of third-party Actions in a GitHub Enterprise server instance this list of Actions is a fantastic place to begin security reviews and audits of what third-party actions to depend on. + +#### Example + +![valet-audit-4](https://user-images.githubusercontent.com/19557880/184191935-c29c3121-66e2-4c33-a71e-07ad1ef42b5c.png) + +### Trigger, Environment, Other + +Similar to `Build steps`, there are `Trigger`, `Environment`, a and catch all `Other` section that breakdown each of their uses accross the audited pipelines. + +### Example + +![valet-audit-4](https://user-images.githubusercontent.com/19557880/184197153-8477c147-646b-4d05-8988-29ce4d28241f.png) + +### Manual Tasks + +Under the Manual task section you will find a list of all the manual tasks that the pipelines would surface in a migration. Manual tasks are a Valet construct that denote what `secrets` and `self-hosted` runners were referenced in the pipeline and will need to be migrated manually. We will see how these manual tasks appear on a pull request when we do a migration in a lab later on. + +### Files + +At the end of the Audit Summary page you will find a list of all of the files that were written to disk. Generally, for any given pipeline, you’ll find 2 or 3 associated files. In these files are the actual converted GitHub Actions workflows. + +In addition, you’ll see a file that shows the raw JSON data that we pull from Jenkins as well as any associated Jenkinsfiles for a given job. These files are really useful for us as the engineering team to help debug any issues and to understand what may have gone on in a transformation. + +#### Example + +![valet-audit-5](https://user-images.githubusercontent.com/19557880/184228434-4b57f77b-db93-43d6-8b8d-4eebfc445160.png) + +### Next Lab + +[Dry run the migration of a Jenkins pipeline to GitHub Actions](valet-dry-run-lab.md) From 4a18eb3b186edbfebe0856a8a3fb6d4a517851a9 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Thu, 11 Aug 2022 15:14:26 -0700 Subject: [PATCH 02/22] Typo --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 07887da..3cdc9f4 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -1,6 +1,6 @@ # Audit Jenkins pipelines using the Valet audit command -In this lab, you will use Valet to `audit` an Azure DevOps organization. The `audit` command can be used to scan a CI server and output a summary of the current pipelines. +In this lab, you will use Valet to `audit` a Jenkins organization. The `audit` command can be used to scan a CI server and output a summary of the current pipelines. What happens behind the scenes is that Valet will perform a `dry-run` transformation on each of the Jenkins pipelines to its GitHub actions equivalent. Once that process is complete, Valet will perform an aggregation of all of these transformed workflows. This summary can be used as a planning tool and to help you understand how complete of a migration is possible with Valet. From 967a52e7bd490c7f03cc9e7bf5381f3e9de219b3 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Thu, 11 Aug 2022 15:30:59 -0700 Subject: [PATCH 03/22] Update valet-audit-lab.md --- jenkins/valet-audit-lab.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 3cdc9f4..27f2b90 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -2,7 +2,7 @@ In this lab, you will use Valet to `audit` a Jenkins organization. The `audit` command can be used to scan a CI server and output a summary of the current pipelines. -What happens behind the scenes is that Valet will perform a `dry-run` transformation on each of the Jenkins pipelines to its GitHub actions equivalent. Once that process is complete, Valet will perform an aggregation of all of these transformed workflows. This summary can be used as a planning tool and to help you understand how complete of a migration is possible with Valet. +What happens behind the scenes is that Valet will perform a `dry-run` transformation on each of the Jenkins pipelines into its GitHub actions equivalent. Once that process is complete, Valet will perform an aggregation of all of these transformed workflows. This aggregate summary can be used as a planning tool and to help you understand how complete of a migration is possible with Valet. - [Prerequisites](#prerequisites) - [Perform an audit](#perform-an-audit) @@ -21,13 +21,13 @@ You will use the codespace preconfigured in this repository to perform the audit 1. Navigate to the codespace Visual Studio Code terminal. 2. Verify you are in the root directory. -3. Now, from root dirrectory, run the following Valet audit command: +3. Now, from root directory, run the following Valet audit command: ``` gh valet audit jenkins --output-dir tmp/audit ``` -4. Valet displays green log files to indicate a successful audit +4. Valet displays green log files to indicate a successful audit. ### Example @@ -35,7 +35,7 @@ gh valet audit jenkins --output-dir tmp/audit ## View audit output -The audit summary, logs, config files, jenkinsfiles, and transformed Actions workflows should all be located in the `tmp/audit` folder. +The audit summary, logs, config files, jenkinsfiles, and transformed Actions Workflows should all be located within the `tmp/audit` folder. 1. Under the `audit` folder find the `audit_summary.md` 2. Right-click the `audit_summary.md` file and select `Open Preview` @@ -52,15 +52,15 @@ The audit summary, logs, config files, jenkinsfiles, and transformed Actions wor The audit summary starts by giving a summary of the types of pipelines that were extracted from Jenkins. -- It shows how there were a total of 4 pipelines extracted. +- It shows that there are a total of 4 pipelines extracted. -- 50% pipelines were successful. This means that Valet knew how to map all the constructs of the Jenkins pipeline to a GitHub Actions equivalent. So all of the build pluggins and triggers that are referenced were all successfully converted into a GitHub Actions equivalent. +- 50% pipelines were successful. This means that Valet knew how to map all the constructs of the Jenkins pipeline to a GitHub Actions equivalent. All of the build pluggins and triggers that are referenced were all successfully converted into a GitHub Actions equivalent. -- 50% pipelines were partially successful. That means that Valet knew how to map all the constructs of the Jenkins pipeline but there may be a plugin that is referenced that Valet doesn’t get automatically mapped to a Github Actions equivalent. +- 50% pipelines were partially successful. This means that Valet knew how to map all the constructs of the Jenkins pipeline but there may be a plugin that was referenced that Valet wasn't able to automatically map to a Github Actions equivalent. -- 0% of these pipelines are unsupported. If there were any that would fall under this category that would mean that those pipelines are using a pipeline type that is fundamentally not supported by Valet. If there were any scripted pipelines they would appear here. +- 0% of these pipelines are unsupported. If there were any that would fall under this category, that would mean that those pipelines were using a pipeline type that is fundamentally not supported by Valet. If a Jenkins instance had any scripted pipelines they would appear here. -- 0% of these fail altogether. pipeline. If there were any pipelines that would fall under this category taht would mean that these pipelines were misconfigured or there was an issue with Valet. +- 0% of these fail altogether. If there were any pipelines that would fall under this category, that would mean that those pipelines were misconfigured or there was an issue with Valet. Under the `Job types` section, we can see that the `audit` command is able to support the conversion of project, freestyle (flow-defintion), and multibranch pipelines from Jenkins and convert them to a GitHub Actions workflow. Valet does not support converting [scripted pipelines](https://www.jenkins.io/doc/book/pipeline/syntax/#scripted-pipeline) (e.g. pure Groovy). @@ -73,15 +73,15 @@ Under the `Job types` section, we can see that the `audit` command is able to su Under the `Build steps` section we can see a breakdown of the build steps that were used in these pipelines. - Supported: 7/9 discrete build steps are considered known by Valet. When Valet encounters a build step of this type, it knows exactly how to map that into a GitHub Actions equivalent. -- Unknown: 2/9 discrete build steps are considered known by Valet. When Valet enounters a build step of this type, it does not yet know to map this automatically to a GitHub Action equivalent. +- Unknown: 2/9 discrete build steps are considered unknown by Valet. When Valet enounters a build step of this type, it does not yet know to map this automatically to a GitHub Action equivalent. - Unsupported: There are currently no build steps that are unknown so this category is not shown. If there were unsupported steps, it would mean one of three things: 1. The way that plugin was configured for a given job is unsupported. 2. The plugin itself is fundamentally not supported in GitHub Actions. - 3. It's supported by default in GH Actions. + 3. It's supported by default in GitHub Actions. -Under the `Actions` section we have the list of the actions that were used in order to implement the transformation of all of these build steps. Valet is a planning tool that can be really helpful to facilitate this migration to GitHub Actions and this list of Actions is a great place to understand what dependencies you will be taking on third-party actions after this migration. +Under the `Actions` section we have the list of the Actions that were used in order to implement the transformation of all of these build steps. Valet is a planning tool that can help in facilitating the migration into GitHub Actions and this list of Actions is a great place to understand what dependencies you would be taking on third-party Actions after this migration. - So if you are doing things like setting up the allow list of third-party Actions in a GitHub Enterprise server instance this list of Actions is a fantastic place to begin security reviews and audits of what third-party actions to depend on. +For example, if you are doing things like setting up the allow list of third-party Actions in a GitHub Enterprise server instance this list of Actions is a fantastic place to begin security reviews and audits of what third-party actions to depend on. #### Example @@ -103,7 +103,7 @@ Under the Manual task section you will find a list of all the manual tasks that At the end of the Audit Summary page you will find a list of all of the files that were written to disk. Generally, for any given pipeline, you’ll find 2 or 3 associated files. In these files are the actual converted GitHub Actions workflows. -In addition, you’ll see a file that shows the raw JSON data that we pull from Jenkins as well as any associated Jenkinsfiles for a given job. These files are really useful for us as the engineering team to help debug any issues and to understand what may have gone on in a transformation. +In addition, you’ll see a file that shows the raw JSON data that we pull from Jenkins as well as any associated Jenkinsfiles for a given job. These files are really useful for engineering teams to help debug any issues and to understand what may have gone on in a transformation. #### Example From b8ed7e8bfa6a2c29f0b1de5684cc819a9f9fa279 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Thu, 11 Aug 2022 16:37:28 -0700 Subject: [PATCH 04/22] Add further commentary --- jenkins/valet-audit-lab.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 3cdc9f4..497a750 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -4,6 +4,8 @@ In this lab, you will use Valet to `audit` a Jenkins organization. The `audit` c What happens behind the scenes is that Valet will perform a `dry-run` transformation on each of the Jenkins pipelines to its GitHub actions equivalent. Once that process is complete, Valet will perform an aggregation of all of these transformed workflows. This summary can be used as a planning tool and to help you understand how complete of a migration is possible with Valet. +By the end of this lab you should have performed an audit on the demo Jenkins instance, and have a good understanding of the components that make up an audit. + - [Prerequisites](#prerequisites) - [Perform an audit](#perform-an-audit) - [View audit output](#view-audit-output) @@ -17,17 +19,21 @@ What happens behind the scenes is that Valet will perform a `dry-run` transforma ## Perform an audit -You will use the codespace preconfigured in this repository to perform the audit. +We will be performing an audit against a preconfigured Jenkins instance. Before running the command we need to collect some information: -1. Navigate to the codespace Visual Studio Code terminal. -2. Verify you are in the root directory. -3. Now, from root dirrectory, run the following Valet audit command: + 1. Do we want to audit the entire Jenkins instance, or just a single folder? __In this example we will be auditing the entire Jenkins instance, but in the future if you wanted to configure a specific folder to be audited add the `-f flag to the audit command__ + 2. Where do we want to store the result? __./tmp/audit. This can be any valid path on the system. In the case of codespaces it is generally best to use `./tmp/SOME_DIRECTORY_HERE` so the files show in explorer__ + +### Steps + +1. Navigate to the codespace terminal. +2. Now, from root dirrectory, run the following Valet audit command: ``` gh valet audit jenkins --output-dir tmp/audit ``` -4. Valet displays green log files to indicate a successful audit +3. Valet displays green log files to indicate a successful audit ### Example From 6b7ddcd88081ff071774dd47a67ef40ea8567abb Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 12 Aug 2022 09:34:06 -0700 Subject: [PATCH 05/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 100e97d..231cf2a 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -2,7 +2,7 @@ In this lab, you will use Valet to `audit` a Jenkins organization. The `audit` command can be used to scan a CI server and output a summary of the current pipelines. -What happens behind the scenes is that Valet will perform a `dry-run` transformation on each of the Jenkins pipelines into its GitHub actions equivalent. Once that process is complete, Valet will perform an aggregation of all of these transformed workflows. This aggregate summary can be used as a planning tool and to help you understand how complete of a migration is possible with Valet. +What happens behind the scenes is that Valet will perform a `dry-run` on each of the Jenkins pipelines. Once that is complete, Valet will perform an aggregation of all of the transformed workflows. This aggregate summary can be used as a planning tool and help understand how complete of a migration is possible with Valet. By the end of this lab you should have performed an audit on the demo Jenkins instance, and have a good understanding of the components that make up an audit. From a6eacee1a399635d858cde32447807b50bc86bd3 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 12 Aug 2022 09:34:20 -0700 Subject: [PATCH 06/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 231cf2a..93bea7d 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -4,7 +4,7 @@ In this lab, you will use Valet to `audit` a Jenkins organization. The `audit` c What happens behind the scenes is that Valet will perform a `dry-run` on each of the Jenkins pipelines. Once that is complete, Valet will perform an aggregation of all of the transformed workflows. This aggregate summary can be used as a planning tool and help understand how complete of a migration is possible with Valet. -By the end of this lab you should have performed an audit on the demo Jenkins instance, and have a good understanding of the components that make up an audit. +By the end of this lab you will have performed an audit on the demo Jenkins instance, and have a good understanding of the components that make up an audit. - [Prerequisites](#prerequisites) - [Perform an audit](#perform-an-audit) From 561d266d06a9a49bbaec62a66bb19b9bc8240fcd Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 12 Aug 2022 09:34:28 -0700 Subject: [PATCH 07/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 93bea7d..9f4f810 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -15,7 +15,7 @@ By the end of this lab you will have performed an audit on the demo Jenkins inst ## Prerequisites 1. Follow all steps [here](../jenkins#readme) to set up your environment. -2. Follow all steps [here](../jenkins#valet_configure_lab) to finish setting up Valet. +2. Follow all steps [here](../jenkins#valet_configure_lab) to configure Valet. ## Perform an audit From 5417017c1c0e54618df571a908e28949c8559e47 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 12 Aug 2022 09:34:54 -0700 Subject: [PATCH 08/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 9f4f810..5a11e94 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -80,7 +80,7 @@ Under the `Build steps` section we can see a breakdown of the build steps that w - Supported: 7/9 discrete build steps are considered known by Valet. When Valet encounters a build step of this type, it knows exactly how to map that into a GitHub Actions equivalent. - Unknown: 2/9 discrete build steps are considered unknown by Valet. When Valet enounters a build step of this type, it does not yet know to map this automatically to a GitHub Action equivalent. -- Unsupported: There are currently no build steps that are unknown so this category is not shown. If there were unsupported steps, it would mean one of three things: +- Unsupported: There are currently no build steps that are unsupported so this category is not shown. If there were it would mean one of three things: 1. The way that plugin was configured for a given job is unsupported. 2. The plugin itself is fundamentally not supported in GitHub Actions. 3. It's supported by default in GitHub Actions. From 3214027ac5a185b2683ddb46fde55b5b4d1129f6 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 12 Aug 2022 09:35:01 -0700 Subject: [PATCH 09/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 5a11e94..a887505 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -95,7 +95,7 @@ For example, if you are doing things like setting up the allow list of third-par ### Trigger, Environment, Other -Similar to `Build steps`, there are `Trigger`, `Environment`, a and catch all `Other` section that breakdown each of their uses accross the audited pipelines. +Similar to `Build steps`, there are `Trigger`, `Environment`, and a catch all `Other` section that breakdown each of their uses accross the audited pipelines. ### Example From d960da14b540e0b7e38c6abc62d378cacee46f46 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 12 Aug 2022 09:35:21 -0700 Subject: [PATCH 10/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index a887505..6d54070 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -103,7 +103,7 @@ Similar to `Build steps`, there are `Trigger`, `Environment`, and a catch all `O ### Manual Tasks -Under the Manual task section you will find a list of all the manual tasks that the pipelines would surface in a migration. Manual tasks are a Valet construct that denote what `secrets` and `self-hosted` runners were referenced in the pipeline and will need to be migrated manually. We will see how these manual tasks appear on a pull request when we do a migration in a lab later on. +Under the Manual task section you will find a list of all the manual tasks that the pipelines would surface in a migration. Manual tasks are Valet's way of indicating tasks a user needs to do in order for a pipeline to be functional, such as adding `secrets`, or setting up a `self-hosted` runner. We will see how these manual tasks appear on a pull request when we do a migration in a lab later on. ### Files From 52325cd0867ce1cc098309419e3eb992dffa794c Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 12 Aug 2022 10:16:50 -0700 Subject: [PATCH 11/22] Update valet-audit-lab.md --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 6d54070..2e62069 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -50,7 +50,7 @@ The audit summary, logs, config files, jenkinsfiles, and transformed Actions Wor ### Example -![valet-audit-2](https://user-images.githubusercontent.com/26442605/169615428-26f7a962-2064-46d0-8206-ea930109b252.png) +![valet-audit-2](https://user-images.githubusercontent.com/19557880/184410021-a5668d21-b290-48de-8aa0-00d2baa7ab90.png) ## Review the pipelines From 61e347b3d2e38c3a84e13bc5628626b165848c63 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Fri, 12 Aug 2022 10:23:15 -0700 Subject: [PATCH 12/22] Update valet-audit-lab.md --- jenkins/valet-audit-lab.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 2e62069..29b77e8 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -37,7 +37,7 @@ gh valet audit jenkins --output-dir tmp/audit ### Example -![valet-audit-1](https://user-images.githubusercontent.com/19557880/184247823-77aa9fa0-da6a-48dc-b7a3-32e1a633045a.png) +valet-audit-1 ## View audit output @@ -50,7 +50,7 @@ The audit summary, logs, config files, jenkinsfiles, and transformed Actions Wor ### Example -![valet-audit-2](https://user-images.githubusercontent.com/19557880/184410021-a5668d21-b290-48de-8aa0-00d2baa7ab90.png) +valet-audit-2 ## Review the pipelines @@ -72,7 +72,7 @@ Under the `Job types` section, we can see that the `audit` command is able to su #### Example -![valet-audit-3](https://user-images.githubusercontent.com/19557880/184190501-6bb2ad34-1680-404a-9cb5-93012a25e0c8.png) +valet-audit-3 ### Build steps @@ -91,7 +91,7 @@ For example, if you are doing things like setting up the allow list of third-par #### Example -![valet-audit-4](https://user-images.githubusercontent.com/19557880/184191935-c29c3121-66e2-4c33-a71e-07ad1ef42b5c.png) +valet-audit-4 ### Trigger, Environment, Other @@ -99,7 +99,7 @@ Similar to `Build steps`, there are `Trigger`, `Environment`, and a catch all `O ### Example -![valet-audit-4](https://user-images.githubusercontent.com/19557880/184197153-8477c147-646b-4d05-8988-29ce4d28241f.png) +valet-audit-5 ### Manual Tasks @@ -113,7 +113,7 @@ In addition, you’ll see a file that shows the raw JSON data that we pull from #### Example -![valet-audit-5](https://user-images.githubusercontent.com/19557880/184228434-4b57f77b-db93-43d6-8b8d-4eebfc445160.png) +valet-audit-6 ### Next Lab From 82dd7d97ef913aa1c266e463f6c42cfe2c19c454 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Mon, 15 Aug 2022 10:23:28 -0700 Subject: [PATCH 13/22] Update valet-audit-lab.md --- jenkins/valet-audit-lab.md | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 29b77e8..6afb0a0 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -37,7 +37,7 @@ gh valet audit jenkins --output-dir tmp/audit ### Example -valet-audit-1 +valet-audit-1 ## View audit output @@ -50,7 +50,7 @@ The audit summary, logs, config files, jenkinsfiles, and transformed Actions Wor ### Example -valet-audit-2 +valet-audit-2 ## Review the pipelines @@ -58,13 +58,13 @@ The audit summary, logs, config files, jenkinsfiles, and transformed Actions Wor The audit summary starts by giving a summary of the types of pipelines that were extracted from Jenkins. -- It shows that there are a total of 4 pipelines extracted. +- It shows that there are a total of 7 pipelines extracted. -- 50% pipelines were successful. This means that Valet knew how to map all the constructs of the Jenkins pipeline to a GitHub Actions equivalent. All of the build pluggins and triggers that are referenced were all successfully converted into a GitHub Actions equivalent. +- 42% pipelines were successful. This means that Valet knew how to map all the constructs of the Jenkins pipeline to a GitHub Actions equivalent. All of the build pluggins and triggers that are referenced were all successfully converted into a GitHub Actions equivalent. -- 50% pipelines were partially successful. This means that Valet knew how to map all the constructs of the Jenkins pipeline but there may be a plugin that was referenced that Valet wasn't able to automatically map to a Github Actions equivalent. +- 42% pipelines were partially successful. This means that Valet knew how to map all the constructs of the Jenkins pipeline but there may be a plugin that was referenced that Valet wasn't able to automatically map to a Github Actions equivalent. -- 0% of these pipelines are unsupported. If there were any that would fall under this category, that would mean that those pipelines were using a pipeline type that is fundamentally not supported by Valet. If a Jenkins instance had any scripted pipelines they would appear here. +- 1% of these pipelines are unsupported. This means that the pipeline type is fundamentally unsupported by Valet. This is most likely a Jenkins scripted pipeline. - 0% of these fail altogether. If there were any pipelines that would fall under this category, that would mean that those pipelines were misconfigured or there was an issue with Valet. @@ -72,15 +72,15 @@ Under the `Job types` section, we can see that the `audit` command is able to su #### Example -valet-audit-3 +valet-audit-3 ### Build steps Under the `Build steps` section we can see a breakdown of the build steps that were used in these pipelines. -- Supported: 7/9 discrete build steps are considered known by Valet. When Valet encounters a build step of this type, it knows exactly how to map that into a GitHub Actions equivalent. -- Unknown: 2/9 discrete build steps are considered unknown by Valet. When Valet enounters a build step of this type, it does not yet know to map this automatically to a GitHub Action equivalent. -- Unsupported: There are currently no build steps that are unsupported so this category is not shown. If there were it would mean one of three things: +- Supported: 12/16 discrete build steps are considered known by Valet. When Valet encounters a build step of this type, it knows exactly how to map that into a GitHub Actions equivalent. +- Unknown: 2/16 discrete build steps are considered unknown by Valet. When Valet enounters a build step of this type, it does not yet know to map this automatically to a GitHub Action equivalent. +- Unsupported: 1/16 discrete build steps are considered unsupported by Valet. This could mean one of three things: 1. The way that plugin was configured for a given job is unsupported. 2. The plugin itself is fundamentally not supported in GitHub Actions. 3. It's supported by default in GitHub Actions. @@ -91,7 +91,7 @@ For example, if you are doing things like setting up the allow list of third-par #### Example -valet-audit-4 +valet-audit-4 ### Trigger, Environment, Other @@ -99,12 +99,16 @@ Similar to `Build steps`, there are `Trigger`, `Environment`, and a catch all `O ### Example -valet-audit-5 +valet-audit-5 ### Manual Tasks Under the Manual task section you will find a list of all the manual tasks that the pipelines would surface in a migration. Manual tasks are Valet's way of indicating tasks a user needs to do in order for a pipeline to be functional, such as adding `secrets`, or setting up a `self-hosted` runner. We will see how these manual tasks appear on a pull request when we do a migration in a lab later on. +### Example + +valet-audit-5 + ### Files At the end of the Audit Summary page you will find a list of all of the files that were written to disk. Generally, for any given pipeline, you’ll find 2 or 3 associated files. In these files are the actual converted GitHub Actions workflows. @@ -113,7 +117,7 @@ In addition, you’ll see a file that shows the raw JSON data that we pull from #### Example -valet-audit-6 +valet-audit-6 ### Next Lab From c56f40a219f25dc367697d2b8f423a802923f2cf Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Mon, 15 Aug 2022 12:22:01 -0700 Subject: [PATCH 14/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 6afb0a0..229c722 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -21,7 +21,7 @@ By the end of this lab you will have performed an audit on the demo Jenkins inst We will be performing an audit against a preconfigured Jenkins instance. Before running the command we need to collect some information: - 1. Do we want to audit the entire Jenkins instance, or just a single folder? __In this example we will be auditing the entire Jenkins instance, but in the future if you wanted to configure a specific folder to be audited add the `-f flag to the audit command__ + 1. Do we want to audit the entire Jenkins instance, or just a single folder? __In this example we will be auditing the entire Jenkins instance, but in the future if you wanted to configure a specific folder to be audited add the `-f ` flag to the audit command__ 2. Where do we want to store the result? __./tmp/audit. This can be any valid path on the system. In the case of codespaces it is generally best to use `./tmp/SOME_DIRECTORY_HERE` so the files show in explorer__ ### Steps From 96bd95623a73c53252200ba8b3defe2bb9845881 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Mon, 15 Aug 2022 12:22:32 -0700 Subject: [PATCH 15/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 229c722..7795954 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -64,7 +64,7 @@ The audit summary starts by giving a summary of the types of pipelines that were - 42% pipelines were partially successful. This means that Valet knew how to map all the constructs of the Jenkins pipeline but there may be a plugin that was referenced that Valet wasn't able to automatically map to a Github Actions equivalent. -- 1% of these pipelines are unsupported. This means that the pipeline type is fundamentally unsupported by Valet. This is most likely a Jenkins scripted pipeline. +- 1% of these pipelines were unsupported. This means that the pipeline type is fundamentally unsupported by Valet. This is most likely a Jenkins scripted pipeline. - 0% of these fail altogether. If there were any pipelines that would fall under this category, that would mean that those pipelines were misconfigured or there was an issue with Valet. From 1c02d4fc9c69981782d0bbac3588bdceed4ee72e Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Mon, 15 Aug 2022 12:22:41 -0700 Subject: [PATCH 16/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 7795954..797992f 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -46,7 +46,7 @@ The audit summary, logs, config files, jenkinsfiles, and transformed Actions Wor 1. Under the `audit` folder find the `audit_summary.md` 2. Right-click the `audit_summary.md` file and select `Open Preview` 3. The file contains details about your current pipelines and what can be migrated 100% automatically vs. what will need some manual intervention or aren't supported by GitHub Actions. -4. Review the file, it should like like the image below: +4. Review the file, it should look like the image below: ### Example From bf3ac743af2ab2685661e656d118e35f9db79406 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Mon, 15 Aug 2022 12:22:55 -0700 Subject: [PATCH 17/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 797992f..0a016db 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -15,7 +15,7 @@ By the end of this lab you will have performed an audit on the demo Jenkins inst ## Prerequisites 1. Follow all steps [here](../jenkins#readme) to set up your environment. -2. Follow all steps [here](../jenkins#valet_configure_lab) to configure Valet. +2. Follow all steps [here](../jenkins#valet-configure-lab) to configure Valet. ## Perform an audit From c83ef24ac37bc82cc0c78d32df8bb82ee291142f Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Mon, 15 Aug 2022 12:23:02 -0700 Subject: [PATCH 18/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 0a016db..3a079b1 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -27,7 +27,7 @@ We will be performing an audit against a preconfigured Jenkins instance. Before ### Steps 1. Navigate to the codespace terminal. -2. Now, from root dirrectory, run the following Valet audit command: +2. Now, from root directory, run the following Valet audit command: ``` gh valet audit jenkins --output-dir tmp/audit From a8131c7c90b126fcd91d8b66056e3aeb00661e4c Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Mon, 15 Aug 2022 12:23:15 -0700 Subject: [PATCH 19/22] Update jenkins/valet-audit-lab.md Co-authored-by: j-dunham --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 3a079b1..8cb5571 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -33,7 +33,7 @@ We will be performing an audit against a preconfigured Jenkins instance. Before gh valet audit jenkins --output-dir tmp/audit ``` -3. Valet displays green log files to indicate a successful audit +3. Valet will log the output files in green when the audit is successful ### Example From 35de427a22f5db5d138e4f681cc8efc653060592 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Mon, 15 Aug 2022 12:24:58 -0700 Subject: [PATCH 20/22] Update valet-audit-lab.md --- jenkins/valet-audit-lab.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 8cb5571..0e8f800 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -79,7 +79,7 @@ Under the `Job types` section, we can see that the `audit` command is able to su Under the `Build steps` section we can see a breakdown of the build steps that were used in these pipelines. - Supported: 12/16 discrete build steps are considered known by Valet. When Valet encounters a build step of this type, it knows exactly how to map that into a GitHub Actions equivalent. -- Unknown: 2/16 discrete build steps are considered unknown by Valet. When Valet enounters a build step of this type, it does not yet know to map this automatically to a GitHub Action equivalent. +- Unknown: 3/16 discrete build steps are considered unknown by Valet. When Valet enounters a build step of this type, it does not yet know to map this automatically to a GitHub Action equivalent. - Unsupported: 1/16 discrete build steps are considered unsupported by Valet. This could mean one of three things: 1. The way that plugin was configured for a given job is unsupported. 2. The plugin itself is fundamentally not supported in GitHub Actions. From 669c3183e5a6e4c2592307e50c19dd797463c696 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Mon, 15 Aug 2022 13:00:41 -0700 Subject: [PATCH 21/22] Update valet-audit-lab.md --- jenkins/valet-audit-lab.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index 0e8f800..a015280 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -99,7 +99,7 @@ Similar to `Build steps`, there are `Trigger`, `Environment`, and a catch all `O ### Example -valet-audit-5 +valet-audit-5 ### Manual Tasks @@ -107,7 +107,7 @@ Under the Manual task section you will find a list of all the manual tasks that ### Example -valet-audit-5 +valet-audit-5 ### Files @@ -117,7 +117,7 @@ In addition, you’ll see a file that shows the raw JSON data that we pull from #### Example -valet-audit-6 +valet-audit-6 ### Next Lab From 7cfcdb7a125607aa444c43d39e49bb9561c71fe1 Mon Sep 17 00:00:00 2001 From: Begona Guereca Date: Mon, 15 Aug 2022 13:05:16 -0700 Subject: [PATCH 22/22] Create valet-audit-lab.md --- jenkins/valet-audit-lab.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/valet-audit-lab.md b/jenkins/valet-audit-lab.md index a015280..cad80e1 100644 --- a/jenkins/valet-audit-lab.md +++ b/jenkins/valet-audit-lab.md @@ -72,7 +72,7 @@ Under the `Job types` section, we can see that the `audit` command is able to su #### Example -valet-audit-3 +valet-audit-3 ### Build steps @@ -107,7 +107,7 @@ Under the Manual task section you will find a list of all the manual tasks that ### Example -valet-audit-5 +valet-audit-5 ### Files