You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: learn-pr/azure-devops/manage-build-dependencies/includes/1-introduction.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,9 @@ It's likely that you used open-source or other partner components in your softwa
4
4
5
5
You might also have your own app code that you can move into a library or package so that others can use it. This code might be an open-source project, or software that only your team can access.
6
6
7
-
There are many ways to build and host your packages. The right solution depends both on the kinds of programming languages and frameworks you use and who you want to access your packages. Here, you continue your work with the Tailspin web team by creating a NuGet package for .NET that's hosted on Azure Artifacts.
7
+
There are many ways to build and host your packages. The right solution depends both on the kinds of programming languages and frameworks you use and who you want to access your packages. Here, you continue your work with the Tailspin web team by creating a NuGet package for .NET thatAzure Artifacts hosts.
8
8
9
-
After completing this module, you'll be able to:
9
+
After you complete this module, you'll be able to:
10
10
11
11
- Create and share packages that multiple applications can use.
12
12
- Create a build pipeline for your package and publish your package to Azure Artifacts.
@@ -17,7 +17,7 @@ After completing this module, you'll be able to:
17
17
18
18
The modules in this learning path form a progression.
19
19
20
-
To follow the progression from the beginning, be sure to first complete the [Get started with Azure DevOps](../../../paths/evolve-your-devops-practices/index.yml?azure-portal=true) learning path.
20
+
To follow the progression from the beginning, first complete the [Get started with Azure DevOps](../../../paths/evolve-your-devops-practices/index.yml?azure-portal=true) learning path.
21
21
22
22
We also recommend you start at the beginning of this learning path, [Build applications with Azure DevOps](../../../paths/build-applications-with-azure-devops/index.yml?azure-portal=true).
23
23
@@ -47,4 +47,4 @@ You met the _Space Game_ web team at Tailspin Toys in previous modules. As a ref
47
47
48
48
:::row-end:::
49
49
50
-
Mara has prior experience with DevOps, and is helping the team adopt a more streamlined process by using Azure DevOps.
50
+
Mara has prior experience with DevOps, and is helping the team adopt a more streamlined process by using Azure DevOps.
Copy file name to clipboardExpand all lines: learn-pr/azure-devops/manage-build-dependencies/includes/2-plan-build-dependencies-for-your-pipeline.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
-
In this unit, you'll learn about packaging code to make it easier to share. You'll discover why you should make packages, the kinds of packages you can create, where you can host the packages, and how you can access them when they're hosted. You'll also learn about package versioning.
1
+
In this unit, you learn about packaging code to make it easier to share. You discover why you should make packages, the kinds of packages you can create, where you can host the packages, and how you can access them when they're hosted. You also learn about package versioning.
2
2
3
-
Codebases are always growing larger and more complex. It's unusual for a team to write all the code that their app uses. Instead, the team includes existing code written by other developers. There can be many of these packages, or dependencies, in an app. It's important to actively manage these dependencies to be able to maintain them properly and make sure they meet security requirements.
3
+
Codebases are always growing larger and more complex. It's unusual for a team to write all the code that their app uses. Instead, the team includes existing code written by other developers. There can be many of these packages, or *dependencies*, in an app. It's important to actively manage dependencies to be able to maintain them properly and make sure they meet security requirements.
4
4
5
-
Let's check in and see how the team is doing. Andy has called the team together to talk about a potential change to their code that would help out another team.
5
+
Check in and see how the team is doing. Andy called the team together to talk about a potential change to their code that would help out another team.
6
6
7
7
## Team meeting
8
8
@@ -24,9 +24,9 @@ Let's check in and see how the team is doing. Andy has called the team together
24
24
25
25
## What is a package?
26
26
27
-
A _package_ contains reusable code that other developers can use in their own projects, even though they didn't write it.
27
+
A *package* contains reusable code that other developers can use in their own projects, even though they didn't write it.
28
28
29
-
For compiled languages, a package typically contains the compiled binary code, such as .dll files in .NET, or .class files in Java. For languages that are interpreted instead of compiled, such as JavaScript or Python, a package might include source code.
29
+
For compiled languages, a package typically contains the compiled binary code, such as *.dll* files in .NET or *.class* files in Java. For languages that are interpreted instead of compiled, such as JavaScript or Python, a package might include source code.
30
30
31
31
Either way, packages are typically compressed to ZIP or a similar format. Package systems often define a unique file extension, such as *.nupkg* or *.jar*, to make the package's use clear. Compression can help reduce download time and also produce a single file to simplify management.
32
32
@@ -36,11 +36,11 @@ Packages also often contain one or more files that provide metadata, or informat
36
36
37
37
There are advantages to building a package as opposed to duplicating the code.
38
38
39
-
One reason to create a package instead of duplicating code is to prevent _drift_. When code is duplicated, each copy can quickly diverge to satisfy the requirements of a particular app. It becomes difficult to migrate changes from one copy to the others. In other words, you lose the ability to improve the code in ways that benefit everyone.
39
+
One reason to create a package instead of duplicating code is to prevent *drift*. When code is duplicated, each copy can quickly diverge to satisfy the requirements of a particular app. It becomes difficult to migrate changes from one copy to the others. In other words, you lose the ability to improve the code in ways that benefit everyone.
40
40
41
41
Packages also group related functionality into one reusable component. Depending on the programming language, a package can provide apps with access to certain types and functions, while restricting access to their implementation details.
42
42
43
-
Another reason to build a package is to provide a consistent way to build and test that package's functionality. When code is duplicated, each app might build and test that code in different ways. One set of tests might include checks from which another set could benefit.
43
+
Another reason to build a package is to provide a consistent way to build and test the functionality of that package. When code is duplicated, each app might build and test that code in different ways. One set of tests might include checks from which another set could benefit.
44
44
45
45
One tradeoff is that you have another codebase to test and maintain with a package. You must also be careful when adding features. Generally speaking, a package should contain features that benefit many kinds of apps. For example, [Json.NET](https://www.newtonsoft.com/json?azure-portal=true) is a popular NuGet package for .NET that allows you to work with JSON files. Json.NET is open source, so the community can propose improvements and report issues.
46
46
@@ -50,7 +50,7 @@ When multiple apps can benefit from the same code, the advantages far outweigh t
50
50
51
51
If the goal is to reorganize your code into separate components, you need to identify those pieces of your app that can be removed, packaged to be made reusable, stored in a central location, and versioned. You might even want to replace your own code with partner components that are either open source or that you license.
52
52
53
-
There are many ways to identify the potential dependencies in your codebase. These include scanning your code for patterns of reuse, and analyzing the architecture of your solution. Here are some ways to identify dependencies:
53
+
There are many ways to identify the potential dependencies in your codebase. These approaches include scanning your code for patterns of reuse, and analyzing the architecture of your solution. Here are some ways to identify dependencies:
54
54
55
55
***Duplicate code**.
56
56
@@ -83,11 +83,11 @@ You might already be familiar with these popular package systems:
83
83
***NuGet**: packages .NET libraries
84
84
***NPM**: packages JavaScript libraries
85
85
***Maven**: packages Java libraries
86
-
***Docker**: packages software in isolated units called _containers_
86
+
***Docker**: packages software in isolated units called *containers*
87
87
88
88
## Where are packages hosted?
89
89
90
-
You can host packages on your own network, or you can use a hosting service. A hosting service is often called a _package repository_ or _package registry_. Many of these services provide free hosting for open-source projects.
90
+
You can host packages on your own network, or you can use a hosting service. A hosting service is often called a *package repository* or *package registry*. Many of these services provide free hosting for open-source projects.
91
91
92
92
Here are some popular hosting services for the package types we just described:
93
93
@@ -107,7 +107,7 @@ Here are some popular hosting services for the package types we just described:
107
107
108
108
Docker packages are called images, and contain complete, self-contained deployments. Most commonly, a Docker image represents a software component that can be hosted and run by itself, without any dependencies on other images. Docker images are layered and might be dependent on other images.
109
109
110
-
A _package feed_ refers to your package repository server. This server can be on the internet or behind your firewall on your network. For example, you can [host your own NuGet feeds](/nuget/hosting-packages/overview?azure-portal=true) by using hosting products such as Azure Artifacts and MyGet. You can also host packages on a file share.
110
+
A *package feed* refers to your package repository server. This server can be on the internet or behind your firewall on your network. For example, you can [host your own NuGet feeds](/nuget/hosting-packages/overview?azure-portal=true) by using hosting products such as Azure Artifacts and MyGet. You can also host packages on a file share.
111
111
112
112
When you host packages behind the firewall, you can include feeds to your own packages. You can also cache packages that you trust on your network when your systems can't connect to the internet.
113
113
@@ -117,7 +117,7 @@ A good dependency management strategy depends on these three elements:
117
117
118
118
***Standardization**.
119
119
120
-
Standardizing how you declare and resolve dependencies helps your automated release process remain repeatable and predictable.
120
+
Standardize how you declare and resolve dependencies helps your automated release process remain repeatable and predictable.
121
121
122
122
***Packaging formats and sources**.
123
123
@@ -131,7 +131,7 @@ A good dependency management strategy depends on these three elements:
131
131
132
132
Many package feeds provide unrestricted access to packages. For example, you can download [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/?azure-portal=true) from nuget.org, without the need to sign in or authenticate.
133
133
134
-
Other package feeds require authentication. You can authenticate access to feeds in a few ways. For example, some kinds of feeds require a username and password. Other feeds require an _access token_, which is typically a long series of characters that identifies who you are and to what resources you have access. You can set access tokens to expire after a given time period.
134
+
Other package feeds require authentication. You can authenticate access to feeds in a few ways. For example, some feeds require a username and password. Other feeds require an *access token*, which is typically a long series of characters that identifies who you are and to what resources you have access. You can set access tokens to expire after a given period.
When you reference a package from your app, you typically _pin_—or specify—the version of that package you want to use.
163
+
When you reference a package from your app, you typically *pin*, or specify, the version of that package you want to use.
164
164
165
-
Many frameworks let you specify allowable ranges of package versions to install. Some also allow you to specify wildcards, which we call a _floating version_.
165
+
Many frameworks let you specify allowable ranges of package versions to install. Some also allow you to specify wildcards, which we call a *floating version*.
166
166
167
167
For example, in NuGet, version "1.0" means the first version that's equal to or greater than 1.0. "[1.0]" specifies to install version 1.0 only, and not a newer version.
Copy file name to clipboardExpand all lines: learn-pr/azure-devops/manage-build-dependencies/includes/2b-what-is-azure-artifacts.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
-
In this unit, you get a brief overview about how you can use Azure Artifacts to securely create and manage packages that your apps can consume.
1
+
In this unit, you get an overview about how you can use Azure Artifacts to securely create and manage packages that your apps can consume.
2
2
3
-
Let's check back in with the team as they decide whether Azure Artifacts is the appropriate way to host their .NET package.
3
+
Check back in with the team as they decide whether Azure Artifacts is the appropriate way to host their .NET package.
4
4
5
5
**Mara:** It seems to me that it would make sense for us to host the new Models package in Azure Artifacts. We're all part of the Microsoft Azure DevOps organization already, so authentication would be easier than trying to set it up on a different package manager.
6
6
@@ -22,13 +22,13 @@ Let's check back in with the team as they decide whether Azure Artifacts is the
22
22
23
23
### Create the package
24
24
25
-
First, we need to create a project in Azure Artifacts. :::image type="icon" source="../../shared/media/callout-01.png"::: We can do this from Azure DevOps.
25
+
First, create a project in Azure Artifacts. :::image type="icon" source="../../shared/media/callout-01.png"::: We can create a project from Azure DevOps.
26
26
27
-
Then, we create a pipeline in Azure Pipelines that connects to the GitHub repo for the package code. Then, the pipeline builds the code, packages it, and pushes the package to Azure Artifacts. :::image type="icon" source="../../shared/media/callout-02.png":::
27
+
Then, create a pipeline in Azure Pipelines that connects to the GitHub repo for the package code. The pipeline builds the code, packages it, and pushes the package to Azure Artifacts. :::image type="icon" source="../../shared/media/callout-02.png":::
28
28
29
-
We need to update the app that consumes this package to point to the Azure Artifacts feed that we created. :::image type="icon" source="../../shared/media/callout-03.png":::
29
+
You need to update the app that consumes this package to point to the Azure Artifacts feed that we created. :::image type="icon" source="../../shared/media/callout-03.png":::
30
30
31
-
After that, we update the pipeline that creates our app. The update allows us to use our Azure Artifacts feed to pull the new package dependency and build as normal. :::image type="icon" source="../../shared/media/callout-04.png":::
31
+
After that, update the pipeline that creates our app. The update allows us to use our Azure Artifacts feed to pull the new package dependency and build as normal. :::image type="icon" source="../../shared/media/callout-04.png":::
32
32
33
33
### Update the package
34
34
@@ -42,7 +42,7 @@ Our app might want to use this newer version of the package. In that case, we up
42
42
43
43
## Include a versioning strategy in your build pipeline
44
44
45
-
When you use a build pipeline, packages need versions before they can be consumed and tested. However, only after you tested the package can you know its quality. Because package versions should never be changed, it becomes challenging to choose a certain version beforehand.
45
+
When you use a build pipeline, packages need versions before they can be consumed and tested. However, only after you test the package can you know its quality. Because package versions should never be changed, it becomes challenging to choose a certain version beforehand.
46
46
47
47
Azure Artifacts associates a quality level with each package in its feeds, and distinguishes between prerelease and release versions. Azure Artifacts offers different views on the list of packages and their versions, which separate them based on their quality level. This approach works well with semantic versioning, which is useful for predicting the intent of a particular version. Azure Artifacts also uses a descriptor to include more metadata from the Azure Artifacts feed. A common use for views is to share package versions that have been tested, validated, or deployed, but hold back packages still under development and not ready for public consumption.
48
48
@@ -52,15 +52,15 @@ Feeds in Azure Artifacts have three different views by default. These views are
52
52
***Prerelease**: The @prerelease view contains all packages that have a label in their version number.
53
53
***Local**: The @local view contains all release and prerelease packages and the packages downloaded from upstream sources.
54
54
55
-
You can use views to help package-feed consumers to filter between released and unreleased versions of packages. Essentially, views allow a consumer to make a conscious decision to choose from released packages, or opt in to prereleases of a certain quality level.
55
+
You can use views to help package-feed consumers to filter between released and unreleased versions of packages. Views allow a consumer to make a conscious decision to choose from released packages, or opt in to prereleases of a certain quality level.
56
56
57
57
## Package security in Azure Artifacts
58
58
59
-
Ensuring the security of your packages is as important as ensuring the security of the rest of your code. One aspect of package security is securing access to the package feeds (where a feed, in Azure Artifacts, is where you store packages). Setting permissions on the feed allows you to share your packages with as many or as few people as your scenario requires.
59
+
Ensuring the security of your packages is as important as ensuring the security of the rest of your code. One aspect of package security is securing access to the package feeds. A *feed*, in Azure Artifacts, is where you store packages. Setting permissions on the feed allows you to share your packages with as many or as few people as your scenario requires.
60
60
61
61
### Feed permissions
62
62
63
-
Feeds have four levels of access: Owners, Contributors, Collaborators, and Readers. Each level of access has a certain set of permissions. For example, Owners can add any type of identity—individuals, teams, and groups—to any access level. By default, the Project Collection Build Service is a Collaborator and your project team is a Reader.
63
+
Feeds have four levels of access: *Owners*, *Contributors*, *Collaborators*, and *Readers*. Each level of access has a certain set of permissions. For example, Owners can add any type of identity—individuals, teams, and groups—to any access level. By default, the Project Collection Build Service is a Collaborator and your project team is a Reader.
64
64
65
65
### Configure the pipeline to access security and license ratings
0 commit comments