1

We have an Azure DevOps Server 2019 on the server with no internet access so upstream sources can not work. How we can populate it with needed packages (npm and nuget) for development and CI/CD?

2 Answers2

1

You can do this two ways, either manually or automatically.

Both ways require you to know where you are pushing and can be found in Azure Devops by going to Collection > Project > Artifacts > Select your feed > click "Connect to Feed" button and copy the "Push a Package" command.

Ex: nuget.exe push -Source "MyNugetFeed" -ApiKey AzureDevOps my_package.nupkg

The manual method requires you having a nuget package to push to the Azure Devops Feed by using the nuget push command shown above. If you don't have a nuget package, then you must create one with the nuget pack command.

The automatic method works by using build definitions with nuget tasks to pack and push your nuget packages to the Azure Devops Feed. These can be found in Collection > Project > Pipelines > Builds. Use the NuGet Tasks to populate your feed.

Detailed explaination here: https://docs.myget.org/docs/how-to/publish-nuget-packages-from-azure-devops-pipelines

Samskins
  • 11
  • 2
0

Your project would require the missing nuget/npm packages during pipeline run, so you have to make sure your offline machine can access those packages.

Here're two tickets about how to restore nuget/npm packages in offline machine, see:

Is it possible to create a cache of nuget packages for computers without internet

How to install NodeJS project locally without internet connection

To sum up, we need to restore the missing packages in an machine with Internet, and they distribute(Copy or File share) the dependency packages to offline machine. Then you can use CMD task to call nuget/npm commands to install missing packages for your project.

LoLance
  • 25,666
  • 1
  • 39
  • 73