adding package management script for vsts
|
@ -81,6 +81,10 @@ entries:
|
|||
url: labs/vsts/continuousdeployment
|
||||
output: web, pdf
|
||||
|
||||
- title: Package Management in Team Services
|
||||
url: labs/vsts/packagemanagement
|
||||
output: web, pdf
|
||||
|
||||
- title: Monitor
|
||||
output: web, pdf
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ folder: /labs/vsts/continuousdeployment/
|
|||
|
||||
## Overview
|
||||
|
||||
Release Management is a service in Visual Studio Team Services that helps you automate the deployment and testing of your software in multiple environments. Using Release Management, you can either fully automate the delivery of your software all the way to production, or set up semi-automated processes with approvals and on-demand deployments. It is an essential element of DevOps that helps your team continuously deliver software to your customers at a faster pace and with lower risk.
|
||||
<a href="https://www.visualstudio.com/en-us/docs/release/overview/">Release Management</a> is a service in Visual Studio Team Services that helps you automate the deployment and testing of your software in multiple environments. Using Release Management, you can either fully automate the delivery of your software all the way to production, or set up semi-automated processes with approvals and on-demand deployments. It is an essential element of DevOps that helps your team continuously deliver software to your customers at a faster pace and with lower risk.
|
||||
|
||||
Release Management can be used by all kinds of software developers for continuous automated deployment, or by large enterprises to improve efficiency and collaboration between various teams that participate in release processes.
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ folder: /labs/vsts/continuousintegration/
|
|||
|
||||
## Overview
|
||||
|
||||
Visual Studio Team Services simplifies continuous integration for your applications regardless of what platform you are targeting, or what language you are using.
|
||||
Visual Studio Team Services simplifies <a href="https://www.visualstudio.com/en-us/docs/build/overview/">Continuous integration</a> for your applications regardless of what platform you are targeting, or what language you are using.
|
||||
|
||||
- Build on Linux, Mac, and Windows.
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ folder: /labs/vsts/exploratorytesting/
|
|||
|
||||
## Overview
|
||||
|
||||
In this lab, you will learn about the exploratory testing and feedback management capabilities provided in the Test & Feedback extension.
|
||||
In this lab, you will learn about the <a href="https://www.visualstudio.com/en-us/docs/test/manual-exploratory-testing/getting-started/perform-exploratory-tests/">Exploratory Testing</a> and feedback management capabilities provided in the Test & Feedback extension.
|
||||
You will learn about how exploratory testing (also called XT, or agile testing) has become a first-class experience in the toolset.
|
||||
This allows a tester to more flexibly test the underlying software without relying solely on formal est cases.
|
||||
You’ll also learn about how you can manage the process of eliciting and managing the customer feedback lifecycle.
|
||||
|
|
|
@ -8,8 +8,7 @@ folder: /labs/vsts/git/
|
|||
|
||||
## Overview
|
||||
|
||||
In this lab, you’ll learn about Git support in Visual Studio Team Services. Git is a distributed version
|
||||
control system. Git repositories can live locally (such as on a developer’s machine).
|
||||
<a href="https://www.visualstudio.com/en-us/docs/git/overview/">Git</a> is a distributed version control system. Git repositories can live locally (such as on a developer’s machine).
|
||||
You will learn how to establish a local Git repository, which can easily be synchronized with a centralized Git repository in Visual Studio Team Services.
|
||||
In addition, you will learn about Git branching and merging support.
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ folder: /labs/vsts/monitor/
|
|||
|
||||
## Overview
|
||||
|
||||
Application Insights comes as part of Visual Studio. You get automatic instrumentation for ASP.NET developers and vital application telemetry data right out of the box; including usage, exceptions, requests, performance, and logs.
|
||||
<a href="https://docs.microsoft.com/en-us/azure/application-insights/">Application Insights</a> comes as part of Visual Studio. You get automatic instrumentation for ASP.NET developers and vital application telemetry data right out of the box; including usage, exceptions, requests, performance, and logs.
|
||||
|
||||
Monitor web apps—whether written in Java, Ruby, Python, PHP, Node.JS, or other languages—using open source SDKs. Install the Status Monitor on your existing Azure App Services and virtual machines through the Azure portal to get performance monitoring without needing to update and redeploy your application.
|
||||
|
||||
|
|
После Ширина: | Высота: | Размер: 24 KiB |
После Ширина: | Высота: | Размер: 62 KiB |
После Ширина: | Высота: | Размер: 56 KiB |
После Ширина: | Высота: | Размер: 48 KiB |
После Ширина: | Высота: | Размер: 61 KiB |
После Ширина: | Высота: | Размер: 44 KiB |
После Ширина: | Высота: | Размер: 86 KiB |
После Ширина: | Высота: | Размер: 115 KiB |
После Ширина: | Высота: | Размер: 127 KiB |
После Ширина: | Высота: | Размер: 126 KiB |
После Ширина: | Высота: | Размер: 63 KiB |
После Ширина: | Высота: | Размер: 20 KiB |
После Ширина: | Высота: | Размер: 32 KiB |
После Ширина: | Высота: | Размер: 81 KiB |
После Ширина: | Высота: | Размер: 36 KiB |
После Ширина: | Высота: | Размер: 69 KiB |
После Ширина: | Высота: | Размер: 26 KiB |
После Ширина: | Высота: | Размер: 59 KiB |
После Ширина: | Высота: | Размер: 52 KiB |
|
@ -0,0 +1,172 @@
|
|||
---
|
||||
title: Package Management in Team Services
|
||||
layout: page
|
||||
sidebar: vsts
|
||||
permalink: /labs/vsts/packagemanagement/
|
||||
folder: /labs/vsts/packagemanagement/
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
<a href="https://www.visualstudio.com/en-us/docs/package/overview/">Package Management</a> is an extension that makes it easy to discover, install, and publish packages.
|
||||
|
||||
It's deeply integrated with other Team Services hubs like Build so that package management can become a seamless part of your existing workflows.
|
||||
|
||||
Your product is successful, your organization is growing, and it’s time to scale up your codebase to match. As you scale out past 2-3 teams working in a single codebase on a single product, you may find yourself asking questions like:
|
||||
|
||||
- How do my teams effectively share reusable components?
|
||||
- How do I enable my feature teams to iterate rapidly without stepping on other teams’ work?
|
||||
- How do I give my teams autonomy to iterate at the pace that’s right for them?
|
||||
|
||||
These questions aren’t just applicable to newly growing teams. If you’re an established team with a legacy codebase, you may be asking these same questions as you’re being asked to deliver more value, ever faster. Regardless of your situation, componentization can help you build a codebase that scales to the size of your team and the speed of today’s development.
|
||||
|
||||
In this module, we'll explore how binary composition through package management can help you manage and share your external dependencies, your OSS, and your isolated shared components.
|
||||
|
||||
|
||||
|
||||
## Task 1: Installing Package Manager Extension
|
||||
|
||||
1. To start using Package Management from Visual Studio Team Services we must first install the Package Management extension from the Visual Studio Market place, you can find the extension <a href="https://marketplace.visualstudio.com/items?itemName=ms.feed">here</a>.
|
||||
|
||||
<img src="images/1.png" width="624">
|
||||
|
||||
2. Click **Start Trial** to install the extension and select your VSTS account to install and click **confirm**.
|
||||
|
||||
<img src="images/2.png">
|
||||
|
||||
> This has installed the extension on your account.
|
||||
> Package feeds are our own NuGet package feeds we can use for our own dependencies, or even share dependencies with other teams. **Nuget.org** is a public feed where we can publish packages for other developers.
|
||||
|
||||
3. After installation click on **Proceed to the account**. You can now see the **Package** menu option inside the Team Projects under the **Build & Release** section.
|
||||
|
||||
<img src="images/3.png" width="624">
|
||||
|
||||
## Task 2: Creating feed
|
||||
|
||||
1. Sign in to your Visual Studio Team Services account.
|
||||
|
||||
2. From your account overview page, select your team project. You can also search as well.
|
||||
|
||||
<img src="images/4.png" width="624">
|
||||
|
||||
3. Now you should see a new menu option **Package** under the **Build & Release** tab. Click on it.
|
||||
|
||||
<img src="images/3.png" width="624">
|
||||
|
||||
4. Click on **+ New feed** to create. Give a name and click **create**.
|
||||
|
||||
<img src="images/5.png" width="624">
|
||||
|
||||
5. Click on **Connect to feed**. Take a note of the **Package source URL**.
|
||||
|
||||
<img src="images/6.png" width="624">
|
||||
|
||||
<img src="images/7.png" width="624">
|
||||
|
||||
> We need the Url for the feed so we would be able to connect our developers to the feed as well as configure projects to use it during automated builds.
|
||||
|
||||
|
||||
## Task 3: Publishing packages
|
||||
|
||||
We will start from a previously created and configured package. The first step when creating a package, which in this case is just a simple class library with some custom helpers, defining its **nuspec** file.
|
||||
|
||||
This file defines the properties on how the package will appear in the listings.
|
||||
|
||||
In the **07\_Demos\_PackageManagement** solution we created a class library with a **nuspec** file definition. Instructions on how to create and use the file can be found in NuGet.org documentation <a href="https://docs.nuget.org/ndocs/create-packages/creating-a-package">here</a>.
|
||||
|
||||
It is also important to take care of package versioning, so developers know which version of the package is the latest, previous versions, and the one they are using as well as the differences between them.
|
||||
|
||||
We will publish packages to the feed with an automated build. So we will start creating a new Build definition (check Continous integration lab for more details).
|
||||
|
||||
1. We will start from the Visual Studio build template. Select the template **Visual Studio build** by creating a new build definition.
|
||||
|
||||
<img src="images/8.png" width="624">
|
||||
|
||||
2. Remove the **Publish symbols**, **Copy files** and **Publish Artifact** tasks. And configure the **Nuget Restore** and **Build** steps to build our NuGet Package solution.
|
||||
|
||||
<img src="images/9.png" width="624">
|
||||
|
||||
3. Add the **NuGet Packager** task from the **Package** section.
|
||||
|
||||
<img src="images/10.png" width="624">
|
||||
|
||||
4. Add the **Nuget Publisher** task from the **Package** section.
|
||||
|
||||
<img src="images/11.png" width="624">
|
||||
|
||||
5. Let's configure the **Nuget Packager** task. For this, we will select the **csproj** file of the project containing the NuGet Package. This must be the same name as the **nuspec** file, but with the **csproj** extension.
|
||||
|
||||
<img src="images/12.png" width="624">
|
||||
|
||||
>It is very important to point at this time to the *csproj* file, and the *nuspec* file convention of having the same name as the *csproj* file, so the package is correctly generated.
|
||||
|
||||
6. In the **Nuget publisher** task, we will need to point the feed we want to publish the target. Select **Feed type** internal and introduce the URL for our internal feed (the URL you noted earlier). Once finished **Save** and **Queue** this build definition.
|
||||
|
||||
<img src="images/13.png" width="624">
|
||||
|
||||
> Look also at the **Path/Pattern to nupkg** the default filter will only include the package we just built, it will exclude other packages which are references to this one with the *-:\*\*/packages/\*\*/\*.nupkg* filter and also exclude the symbols package with this filter _-:\*\*/\*.symbols.nupkg_ which are currently not suported.
|
||||
|
||||
7. Once the build completes, you should see the package is already publishd to the feed and ready to be used. Go to **Packages** and check.
|
||||
|
||||
<img src="images/14.png" width="624">
|
||||
|
||||
## Task 4: Configure Visual Studio
|
||||
|
||||
1. Open Visual Studio, and goto **Tools** \| **NuGet Package Manager** \|**Package Manager Settings**.
|
||||
|
||||
<img src="images/15.png" width="624">
|
||||
|
||||
>We need to configure Visual Studio to have this package manager available for developers.
|
||||
|
||||
2. Open **Package Sources**.
|
||||
|
||||
<img src="images/16.png" width="624">
|
||||
|
||||
> In this screen we will manage our own package feeds so they are availables when adding NuGet packages to a project.
|
||||
|
||||
3. Click **+** icon. A new Package source line has been added with default values. Change the **Name** to the desired name (i.e. "HealthClinic Feed") and in the **URL** paste the value of the URL for the feed we noted before. Click **Ok**.
|
||||
|
||||
<img src="images/17.png" width="624">
|
||||
|
||||
> We just added to our Visual Studio the new feed. All members of the team must do the same in their own Visual Studio in order to get the packages.
|
||||
|
||||
4. Create an empty project, or open an existing project, right click on it, select **Manage Nuget Packages**, go to **Browse** and in the **package source** selector, select the recently added feed. You should see the recently added package.
|
||||
|
||||
<img src="images/18.png" width="624">
|
||||
|
||||
> All the team members, with the feed configured in Visual Studio, will be able to access this feed and install the package into their projects, so we can better reuse the code of our common libraries across the projects.
|
||||
|
||||
## Task 5: Consuming Packages From Build
|
||||
|
||||
When we create builds, the first step is the **Nuget package restore** step, but by default, it will only look for packages in **nuget.org** feed. So we need to give instructions to **Team Build** it is done via **nuget.config** files.
|
||||
|
||||
1. Create an empty file named **nuget.config** at the same level as the solution file you will be building with **Team Build** and paste this code:
|
||||
|
||||
```
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="HealthClinic Repo" value="YOUR_PACKAGE_URL" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
||||
```
|
||||
|
||||
> The first package source is needed to indicate the original Nuget feed for the Nuget public Nuget packages. The second one is the url for our custom feed.
|
||||
|
||||
2. Commit the file to the repository.
|
||||
|
||||
3. Now, in the Team Build you are using for building the project which uses the internal Nuget package, on the package restore step, point to the **nuget.config** file we just added to the repository.
|
||||
|
||||
<img src="images/19.png" width="624">
|
||||
|
||||
4. During the build you can see the console ouput while building the project which references the internal Nuget feed.
|
||||
|
||||
```
|
||||
Feeds used:
|
||||
C:\Users\buildguest\AppData\Local\NuGet\Cache
|
||||
https://api.nuget.org/v3/index.json
|
||||
YOUR_PACKAGE_URL
|
||||
|
||||
```
|