Skip to content

Commit 824b8b9

Browse files
author
Rami Bououni
committed
resotre from upstreams
1 parent fc2fc04 commit 824b8b9

File tree

1 file changed

+59
-96
lines changed

1 file changed

+59
-96
lines changed

docs/artifacts/tutorials/protect-oss-packages-with-upstream-sources.md

Lines changed: 59 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Now that you've created your feed, select the appropriata tab based on the techn
6060

6161
1. Create a new *nuget.config* file in the root of your project, and paste in the XML snippet you copied in the previous step.
6262

63-
#### [Pip](#tab/pip/)
63+
#### [Python](#tab/pip/)
6464

6565
1. Sign in to your Azure DevOps organization, and then navigate to your project.
6666

@@ -183,173 +183,136 @@ Now that you've created your feed, select the appropriata tab based on the techn
183183

184184
## Restore packages
185185

186-
Now that you enabled upstream sources and set up your configuration file, you can now run the package restore command to query the upstream source and retrieve the upstream packages.
186+
Now that you've enabled upstream sources and authenticated with your feed, select the appropriate tab based on your package type, and follow the instructions to restore packages from public registries into your Azure Artifacts feed.
187187

188-
To restore packages using Azure Pipelines instead, see [Restore Maven packages with Azure Pipelines (YAML/Classic)](../../pipelines/packages/maven-restore.md) for detailed steps.
189-
190-
::: moniker range="azure-devops"
188+
::: moniker range=">= azure-devops-2022"
191189

192190
# [npm](#tab/npmrestore)
193191

194-
Remove the *node_modules* folder from your project and run the following command in an elevated command prompt window:
192+
1. Remove the *node_modules* folder from your project.
195193

196-
```Command
197-
npm install --force
198-
```
194+
1. Open a command prompt window and run the following command to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
199195

200-
Your feed now should have a saved copy of any packages you installed from upstream.
196+
```Command
197+
npm install --force
198+
```
201199

202200
> [!NOTE]
203-
> The `--force` argument will force pull remotes even if a local copy exists.
201+
> The `--force` flag ensures that packages are pulled from the remote source even if a local copy exists.
204202

205203
# [NuGet](#tab/nugetrestore)
206204

207-
1. Clear your local cache:
205+
1. Clear your local cache.
208206

209207
```Command
210208
nuget locals -clear all
211209
```
212210

213-
1. Restore your NuGet packages:
211+
1. Open a command prompt window and run the following command to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
214212

215213
```Command
216214
nuget.exe restore
217215
```
218216

219-
Your feed now should have a saved copy of any packages you installed from upstream.
220-
221-
# [dotnet](#tab/dotnet)
222-
223-
Run the following command in your project directory:
224-
225-
```Command
226-
dotnet restore --interactive
227-
```
228-
229-
Your feed now should have a saved copy of any packages you installed from upstream.
230-
231217
# [Python](#tab/python)
232218

233-
Run the following command in your project directory:
219+
- Open a command prompt window and run the following command in your project directory to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
234220

235-
```Command
236-
pip install
237-
```
238221

239-
Your feed now should have a saved copy of any packages you installed from upstream.
222+
```Command
223+
pip install
224+
```
240225

241226
# [Maven](#tab/mavenrestore)
242227

243-
Run the following command in your project directory:
228+
- Open a command prompt window and run the following command in your project directory to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
244229

245-
```Command
246-
mvn install
247-
```
248230

249-
Your feed now should have a saved copy of any packages you installed from upstream.
231+
```Command
232+
mvn install
233+
```
250234

251235
# [Gradle](#tab/gradlerestore)
252236

253-
Run the following command in your project directory:
254-
255-
```Command
256-
gradle build
257-
```
237+
- Open a command prompt window and run the following command in your project directory to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
258238

259-
Your feed now should have a saved copy of any packages you installed from upstream.
239+
```Command
240+
gradle build
241+
```
260242

261243
# [Cargo](#tab/cargorestore)
262244

263-
Run the following command in your project directory:
264-
265-
```Command
266-
cargo build
267-
```
245+
- Open a command prompt window and run the following command in your project directory to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
268246

269-
Your feed now should have a saved copy of any packages you installed from upstream.
247+
```Command
248+
cargo build
249+
```
270250

271251
- - -
272252

273253
::: moniker-end
274254

275-
::: moniker range=">= azure-devops-2020 < azure-devops"
255+
::: moniker range="azure-devops-2020"
276256

277-
# [npm](#tab/npmserver)
257+
# [npm](#tab/npmrestore)
278258

279-
Remove the *node_modules* folder from your project and run the following command in an elevated command prompt window:
259+
1. Remove the *node_modules* folder from your project.
280260

281-
```Command
282-
npm install --force
283-
```
261+
1. Open a command prompt window and run the following command to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
284262

285-
Your feed now should have a saved copy of any packages you installed from upstream.
263+
```Command
264+
npm install --force
265+
```
286266

287267
> [!NOTE]
288-
> The `--force` argument will force pull remotes even if a local copy exists.
268+
> The `--force` flag ensures that packages are pulled from the remote source even if a local copy exists.
289269

290-
# [NuGet](#tab/nugeserver)
270+
# [NuGet](#tab/nugetrestore)
291271

292-
1. Clear your local cache:
272+
1. Clear your local cache.
293273

294274
```Command
295275
nuget locals -clear all
296276
```
297277

298-
1. Restore your NuGet packages:
278+
1. Open a command prompt window and run the following command to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
299279

300280
```Command
301281
nuget.exe restore
302282
```
303283

304-
Your feed now should have a saved copy of any packages you installed from upstream.
305-
306-
# [dotnet](#tab/dotnetserver)
307-
308-
Run the following command in your project directory:
309-
310-
```Command
311-
dotnet restore --interactive
312-
```
313-
314-
Your feed now should have a saved copy of any packages you installed from upstream.
315-
316-
# [Python](#tab/pythonserver)
317-
318-
Run the following command in your project directory:
319-
320-
```Command
321-
pip install
322-
```
323-
324-
Your feed now should have a saved copy of any packages you installed from upstream.
284+
# [Python](#tab/python)
325285

326-
# [Maven](#tab/mavenserver)
286+
- Open a command prompt window and run the following command in your project directory to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
327287

328-
Run the following command in your project directory:
288+
```Command
289+
pip install
290+
```
329291

330-
```Command
331-
mvn install
332-
```
292+
# [Maven](#tab/mavenrestore)
333293

334-
Your feed now should have a saved copy of any packages you installed from upstream.
294+
- Open a command prompt window and run the following command in your project directory to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
335295

336-
# [Gradle](#tab/gradleserver)
296+
```Command
297+
mvn install
298+
```
337299

338-
Run the following command in your project directory:
300+
# [Gradle](#tab/gradlerestore)
339301

340-
```Command
341-
gradle build
342-
```
302+
- Open a command prompt window and run the following command in your project directory to restore your packages. Once completed, your feed should have a saved copy of any packages installed from upstream.
343303

344-
Your feed now should have a saved copy of any packages you installed from upstream.
304+
```Command
305+
gradle build
306+
```
345307

346308
- - -
347309

348310
::: moniker-end
349311

350-
## Related articles
312+
## Related content
313+
314+
- [Manage permissions](../feeds/feed-permissions.md)
315+
316+
- [Publish & download pipeline artifacts](../../pipelines/artifacts/pipeline-artifacts.md)
351317

352-
- [Set up upstream sources](../how-to/set-up-upstream-sources.md)
353-
- [Universal Packages upstream sources](../universal-packages/universal-packages-upstream.md)
354-
- [Feed permissions](../feeds/feed-permissions.md)
355-
- [Publish packages to NuGet.org](../nuget/publish-to-nuget-org.md)
318+
- [Publish symbols with Azure Pipelines](../../pipelines/artifacts/symbols.md)

0 commit comments

Comments
 (0)