modified seleniuim,aspmodern,gitpipeline,sonarcloud (#658)
Co-authored-by: suraj <suraj@ecanarys.com>
После Ширина: | Высота: | Размер: 45 KiB |
|
@ -94,11 +94,14 @@ In this exercise, you will create a SQL Azure instance and migrate the applicati
|
|||
|
||||
## Exercise 2: Add Docker Support and debug the application locally within the Docker container using Visual Studio
|
||||
|
||||
1. Visual Studio has great support for Docker. In order to containerize the application using Docker, all you have to do is right-click on the project, select **Add->Container Orchestrator Support**
|
||||
1. Visual Studio has great support for Docker. In order to containerize the application using Docker, all you have to do is right-click on the project, select **Add->Container Orchestrator Support**.
|
||||
|
||||
![adddockersupport](images/adddockersupport.png)
|
||||
|
||||
2. Visual Studio then adds the Docker file, compose files and a specific Docker project to the solution. It also inspects the project to determine the proper base image to use for your project.
|
||||
1. Choose **Docker Compose** in Container Orchestrator drop-down.
|
||||
|
||||
![choosecontorch](images/dockercompose.png)
|
||||
1. Visual Studio then adds the Docker file, compose files and a specific Docker project to the solution. It also inspects the project to determine the proper base image to use for your project.
|
||||
|
||||
![dockersupportfiles](images/dockersupportfiles.png)
|
||||
|
||||
|
@ -111,7 +114,7 @@ In this exercise, you will create a SQL Azure instance and migrate the applicati
|
|||
COPY ${source:-obj/Docker/publish} .
|
||||
```
|
||||
|
||||
3. To run the application locally and debug within the Docker container using Visual Studio and to test the connectivity to the SQL Azure instance, set the **docker-compose** as the startup project and click on **Docker**.
|
||||
1. To run the application locally and debug within the Docker container using Visual Studio and to test the connectivity to the SQL Azure instance, set the **docker-compose** as the startup project and click on **Docker**.
|
||||
|
||||
![rundocker](images/rundocker.png)
|
||||
|
||||
|
|
Двоичные данные
labs/vstsextend/github-azurepipelines/images/azuredevopslabs-testing1.png
Normal file
После Ширина: | Высота: | Размер: 33 KiB |
Двоичные данные
labs/vstsextend/github-azurepipelines/images/azurepipelines-extension1.png
Normal file
После Ширина: | Высота: | Размер: 33 KiB |
|
@ -85,7 +85,7 @@ This will involve setting up a pipeline so that commits to the GitHub repo invok
|
|||
|
||||
1. Search for "**pipelines**" and click **Azure Pipelines**.
|
||||
|
||||
![](images/azurepipelines-extension.png)
|
||||
![](images/azurepipelines-extension1.png)
|
||||
|
||||
1. Scroll to the bottom and click **Install it for free**. If you previously installed Azure Pipelines, select **Configure access** instead to skip steps 6-8.
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ Let us configure a ***private*** self-hosted agent on this VM. Selenium requires
|
|||
|
||||
![](images/extractagent.png)
|
||||
|
||||
1. Open Powershell in **administrator mode**. Change the path to **C:\AzAgent** and type **Config.cmd** and hit **Enter**.
|
||||
1. Open Powershell in **administrator mode**. Change the path to **C:\AzAgent** and type **.\config.cmd** and hit **Enter**.
|
||||
|
||||
1. Provide the following details:
|
||||
|
||||
|
|
После Ширина: | Высота: | Размер: 40 KiB |
После Ширина: | Высота: | Размер: 18 KiB |
После Ширина: | Высота: | Размер: 26 KiB |
После Ширина: | Высота: | Размер: 40 KiB |
После Ширина: | Высота: | Размер: 43 KiB |
После Ширина: | Высота: | Размер: 75 KiB |
После Ширина: | Высота: | Размер: 46 KiB |
После Ширина: | Высота: | Размер: 46 KiB |
|
@ -33,9 +33,9 @@ In this lab, you will learn how to integrate Azure DevOps Services with SonarClo
|
|||
|
||||
1. You will need a Microsoft account.
|
||||
|
||||
2. Using this account, sign in to [**Azure DevOps Services**](https://dev.azure.com){:target="\_blank"}.
|
||||
1. Using this account, sign in to [**Azure DevOps Services**](https://dev.azure.com){:target="\_blank"}.
|
||||
|
||||
3. Create a new Azure DevOps project for this lab:
|
||||
1. Create a new Azure DevOps project for this lab:
|
||||
|
||||
Every project in Azure DevOps belongs to an organization. You will be placed into an automatically created default organization on sign in, the name of which is based on your user name (in our example, the user Claudia Sonarova has been given the organization **claudiasonarova**).
|
||||
|
||||
|
@ -59,7 +59,7 @@ In this lab, you will learn how to integrate Azure DevOps Services with SonarClo
|
|||
|
||||
The scanning examples repository contains sample projects for a number of build systems and languages including C# with MSBuild, and Maven and Gradle with Java.
|
||||
|
||||
4. Install the SonarCloud Azure DevOps extension in your Azure DevOps account
|
||||
1. Install the SonarCloud Azure DevOps extension in your Azure DevOps account
|
||||
|
||||
Navigate to the [SonarCloud extension](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud) in the Visual Studio Marketplace and click **Get it free** to install it, and **Proceed to organization** once the installation has finished.
|
||||
|
||||
|
@ -72,15 +72,19 @@ In this lab, you will learn how to integrate Azure DevOps Services with SonarClo
|
|||
|
||||
The SonarCloud extension contains build tasks, build templates and a custom dashboard widget.
|
||||
|
||||
5. Using the same account as you used for Azure Devops, sign into SonarCloud: https://sonarcloud.io/
|
||||
1. Using the same account as you used for Azure Devops, sign into SonarCloud: https://sonarcloud.io/
|
||||
|
||||
![SonarCloud Welcome](images/sonarcloud.io2.png)
|
||||
![SonarCloud Welcome](images/sonarcloud.io3.png)
|
||||
|
||||
6. In SonarCloud, create an organization and, within that, a new project. The organization and project you set up in SonarCloud will mirror the organization and project that you set up in Azure DevOps.
|
||||
1. In SonarCloud, create an organization and, within that, a new project. The organization and project you set up in SonarCloud will mirror the organization and project that you set up in Azure DevOps.
|
||||
|
||||
Once you sign in, click **Import project from Azure** on the welcome page:
|
||||
Once you sign in, click **Analyze new project** on the welcome page:
|
||||
|
||||
![SonarCloud Welcome](images/import.png)
|
||||
![SonarCloud Welcome](images/import1.png)
|
||||
|
||||
Click on **Import another organization** option
|
||||
|
||||
![Importing Organization](images/import2.png)
|
||||
|
||||
Add your Azure DevOps organization name (dev.azure.com/{YOUR-ORG}) , create and provide a personal access token in your Azure DevOps organization settings. **Check the following scope: Code (Read & Write)**. [Create PAT](https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=preview-page)
|
||||
|
||||
|
@ -99,7 +103,7 @@ In this lab, you will learn how to integrate Azure DevOps Services with SonarClo
|
|||
|
||||
Make sure that the the green checkmark appears beside the **Key** field. This indicates that the key is unique across SonarCloud.
|
||||
|
||||
![SonarCloud org creation](images/org-create2.png)
|
||||
![SonarCloud org creation](images/org-create3.png)
|
||||
|
||||
|
||||
Next, you can choose your plan. For this example, we choose a free plan (that is, one for public repos only), but you can choose a paid plan if you intend to have private repos:
|
||||
|
@ -110,16 +114,18 @@ In this lab, you will learn how to integrate Azure DevOps Services with SonarClo
|
|||
|
||||
The next step is to create, within that organization, the SonarCloud project that will mirror the Azure DevOps project **SonarExamples**. Click on **Analyze new project**.
|
||||
|
||||
![Create SonarCloud project](images/new-project.png)
|
||||
![Create SonarCloud project](images/new-project1.png)
|
||||
|
||||
Choose your Azure DevOps project and click **Set up**.
|
||||
|
||||
![Create SonarCloud project](images/choose-project.png)
|
||||
![Create SonarCloud project](images/choose-project1.png)
|
||||
|
||||
|
||||
Lets follow the guide in Sonarqube to set up the scanning in Azure Pipelines:
|
||||
|
||||
![Scan using pipeline](images/with-pipelines.png)
|
||||
Create a service connection in the Azure DevOps project by following the provided instructions
|
||||
|
||||
![Scan using pipeline](images/service-connection.png)
|
||||
|
||||
|
||||
You can skip extension creation (if done previosly). Click **Continue**. Click on the **.NET** option and keep these instructions close for Exercise 1. We will need the information shown to set up a Service Connection (from Azure DevOps to Sonarcloud) and configure the scanning in the pipeline.
|
||||
|
@ -317,7 +323,7 @@ Configuring SonarCloud analysis to run when a pull request is created involves t
|
|||
- Browse to the **Sonar Examples** dashboard in SonarCloud
|
||||
- Click on **Administration** > **General Settings**
|
||||
|
||||
![Click general settings](images/sc_click_general_settings.png)
|
||||
![Click general settings](images/sc_click_general_settings1.png)
|
||||
|
||||
- Select the **Pull Requests** tab
|
||||
- Set the **Provider** drop-down to **Azure DevOps Services** and click **Save**
|
||||
|
|
После Ширина: | Высота: | Размер: 27 KiB |
После Ширина: | Высота: | Размер: 76 KiB |
После Ширина: | Высота: | Размер: 47 KiB |
|
@ -76,26 +76,26 @@ You have a **Java code** provisioned by the Azure DevOps demo generator. You wil
|
|||
![go back](images/back.png)
|
||||
![build_summary](images/build_summarynew.png)
|
||||
|
||||
1. Navigate to **Mend Bolt** tab and wait for the report generation of the completed build to see the vulnerability report.
|
||||
1. Navigate to **WhiteSource Bolt Build Report** tab and wait for the report generation of the completed build to see the vulnerability report. This report shows the list of all vulnerable open source components with **Vulnerability Score**, **Vulnerable Libraries**, **Severity Distribution**
|
||||
|
||||
|
||||
![report](images/mendboltreport.png)
|
||||
![report](images/whitesourcebuildreport.png)
|
||||
|
||||
## Exercise 3: Analyze Reports
|
||||
|
||||
Mend bolt automatically detects OpenSource components in the software including transitive dependencies and their respective licenses.
|
||||
|
||||
### Security Dashboard
|
||||
### Security Vulnerabilities
|
||||
|
||||
The security dashboard shows the vulnerability of the build.
|
||||
This report shows the list of all vulnerable open source components with **Vulnerability Score, Vulnerable Libraries, Severity Distribution**.
|
||||
The security vulnerability section shows **vulnerabilty**, **name of the library**, **description** and **Top Fix**
|
||||
|
||||
![Security](images/mendsecuritytab.png)
|
||||
|
||||
![Security](images/securityvelnerability.png)
|
||||
|
||||
### License risks
|
||||
You can see the opensource license distribution and a detailed view of all components and links to their metadata and licensed references.
|
||||
|
||||
![LicenceRisks](images/mendlicencerisks.png)
|
||||
![LicenceRisks](images/mendlicencerisks1.png)
|
||||
|
||||
|
||||
|
||||
|
|