Exercise - select an artifact source
In this exercise, you'll investigate Artifact Sources.
Steps
Let's look at how to work with one or more artifact sources in the release pipeline.
In the Azure DevOps environment, open the Parts Unlimited project, then from the main menu, select Pipelines, then select Releases.
In the main screen area, select New pipeline.
In the Select a template pane, see the available templates, but then select the Empty job option at the top. It's because we're going to focus on selecting an artifact source.
In the Artifacts section, select +Add an artifact.
See the available options in the Add an artifact pane, and select the option to see more artifact types, so that you can see all the available artifact types:
While we're in this section, let's briefly look at the available options.
Select Build and see the parameters required. This option is used to retrieve artifacts from an Azure DevOps Build pipeline. Using it requires a project name and a build pipeline name. (Projects can have multiple build pipelines). It's the option that we'll use shortly.
Select Azure Repository and see the parameters required. It requires a project name and asks you to select the source repository.
Select GitHub and see the parameters required. The Service is a connection to the GitHub repository. It can be authorized by either OAuth or by using a GitHub personal access token. You also need to select the source repository.
Select TFVC and see the parameters required. It also requires a project name and asks you to select the source repository.
Note
A release pipeline can have more than one set of artifacts as input. A typical example is when you also need to consume a package from a feed and your project source.
Select Azure Artifacts and see the parameters required. It requires you to identify the feed, package type, and package.
Select GitHub Release and see the parameters required. It requires a service connection and the source repository.
Note
We'll discuss service connections later in the module.
Select Azure Container Registry and see the parameters required. Again, it requires a secure service connection, and the Azure Resource Group details that the container registry is located. It allows you to provide all your Docker containers directly into your release pipeline.
Select Docker Hub and see the parameters required. This option would be helpful if your containers are stored in Docker Hub rather than in an Azure Container Registry. After choosing a secure service connection, you need to select the namespace and the repository.
Finally, select Jenkins and see the parameters required. You don't need to get all your artifacts from Azure. You can retrieve them from a Jenkins build. So, if you have a Jenkins Server in your infrastructure, you can use the build artifacts from there directly in your Azure Pipelines.
Configuring the build artifact
Let's return to adding our Build output as the artifact source.
Select the Build source type again. See that the Project should show the current project. From the Source (build pipeline) drop-down list, select Parts Unlimited-ASP.NET-CI. Take a record of the default values for the other options, and then select Add.
We've now added the artifacts that we'll need for later walkthroughs.
To save the work, select Save, then in the Save dialog box, select OK.