Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution.
After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.
You use Azure Pipelines to build and test a React.js application.
You have a pipeline that has a single job.
You discover that installing JavaScript packages from 9pm takes approximately five minutes each time you run the pipeline.
You need to recommend a solution to reduce the pipeline execution time.
Solution: You recommend using pipeline artifacts.
Does this meet the goal?
Correct Answer: B
Pipeline artifacts are a way to persist build outputs, test results, and other files generated during a pipeline run.
They allow you to share data between stages, jobs, and pipelines, and to persist data for longer than the lifetime of a pipeline run. While artifacts can be useful for sharing data between pipeline runs and reducing the time required to download dependencies, they are not a solution for reducing the time required to install JavaScript packages from 9pm during a pipeline run.
The solution of reducing the pipeline execution time could be achieved by using package caching, which allows you to store and reuse 9pm packages from previous pipeline runs. There are several package caching options available for Azure Pipelines, including the 9pm task, the 9pm cache task, and the 9pm ci task. All of these options allow you to configure caching for your 9pm packages, which can significantly reduce the time required to install packages during subsequent pipeline runs.
Another solution could be using a dedicated agent that has those packages already installed, this way the pipeline doesn't have to install them again.
You can find more information on package caching by following this link
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/npm-cache?view=azure-devops