How to REDUCE Build Time Using Caching in Azure Pipelines (Cache)

preview_player
Показать описание
Pipeline caching can help reduce build time by allowing the outputs or downloaded dependencies from one run to be reused in later runs, reducing or avoiding the cost to recreate or redownload the same files again.

Let's see how to enable and use caching in Azure Pipelines in this 3 minutes friday.

🌟EXCLUSIVE CONTENT🌟

🆘 NEED HELP? 🆘

🙏🏻SUPPORT THE CHANNEL🙏🏻

💬JOIN THE COMMUNITY

🎥VIDEOS

❓QUESTIONS?
Have a question about DevOps, Cloud, Coding, or Anything Else? Post in comments section of this video!

_______________

🔮TOOLS I USE

📸🖥️GEAR AND SOFTWARE

Disclaimer:
Some product links are affiliate links which means if you buy something I'll receive a small commission at no additional cost to you.
As an Amazon Associate, I earn from qualifying purchases.
Рекомендации по теме
Комментарии
Автор

✨ *Question of the Day* ✨: Do you use caching? In which scenario?

CoderDave
Автор

Good video! Do you know if it is possible to clear/delete the cache without changing the key or content of packages-locks?

Mckorkprop
Автор

Thank you very much, that was very useful!
What about docker images? For example: A hosted agent that have to download .net frameworks on every build.
Can we cache that too?

ricardomianelli
Автор

Could I use caching if I need to make my build task faster. Now it spend about 10 minutes and this is big soulution which is rebuilted with any changes.

tmcdsgl
Автор

How about doing one on caching tools? Like I have this task that does "dotnet tool install dotnet-ef" that takes time. How would you go about doing that? Btw I´m using the classic pipeline

sturla
Автор

Hi Dave, I do not have a package.lock.json file in my solution. will this not work without this file?

aswinraaj
Автор

Can we also cache the yarn packages? My a first attempt to try this by regering the documentation for yarn was a failure.

_pseudoinfluencer__
Автор

I have added the code ' to each of the csProj files. However, on build the packages.lock.json file doesn't get generated. Any clue on how to solve this ?

shamiljay
Автор

Hi, I am facing an issue directory not found issue in post cache Any clue what might be my mistakes.

LovelyJSJFamily
Автор

WHY initial build run was 1.57min where second run 2.10min? how is it shorter than no cahce task involve? I am trying to make a use of it and doesn't seems I am only one with same issue...

peterchaploutskiy
Автор

Hi thanks for the Video.. i am using Hosted Pipeline wil this possible ie Cache, or only in Self hosted agent we can use this Cache to optimize the Build time.?

raghur
Автор

Did you forget to show the timing when you can skip the Nuget restore step when you hit the cache?

MichaelDenny
Автор

Hi i need to tag the master as 1.0.0 and after that develop to 1.0.1, ,how can i achieve this? in azure devops pipeline

raghur
Автор

Where is NuGet Cache is being stored ? In artifact or where ?

vineethkumarbompally
Автор

Following are the steps:
displayName: 'Login Azure DevOps'
inputs:
targetType: inline
failOnStderr: true
script: echo $(System.AccessToken) | az devops login


inputs:
key: 'nuget | "$(Agent.OS)" | **/packages.lock.json, !**/bin/**, !**/obj/**'
restoreKeys: nuget | "$(Agent.OS)"
path: $(NUGET_PACKAGES)
cacheHitVar: CACHE_RESTORED
displayName: Cache NuGet packages

inputs:
command: 'restore'
restoreSolution: '$(solution)'
feedsToUse: 'config'
nugetConfigPath: 'Nuget.config'
condition: ne(variables.CACHE_RESTORED, 'true')

pankajpawar
Автор

hi, i need help in caching in azure pipeline
??

vikramtomar