azure-pipelines-agent: Cache persist doesn't work on server 2012 R2 or 2016 (I assume) because it doesn't inclued tar
Having issue with Tasks?
Since this is the embedded cache task I believe this belongs here.
Agent Version and Platform
Version of your agent? 2.160 on prem
OS of the machine running the agent? Windows 2012 R2
Azure DevOps Type and Version
dev.azure.com
What’s not working?
CacheBeta@1 isn’t saving the cache because tar isn’t included in 2012 R2.
Agent and Worker’s Diagnostic Logs
2019-11-12T21:42:35.5033236Z ##[debug]Starting 'tar' with arguments '-h -v -cf "4092ddf38c57400cbae3ca85f9ae5178_archive.tar" -C "D:\SharedBuild2\1\s\.pipeline-cache\nuget" .'...
2019-11-12T21:42:36.0435164Z Information, ApplicationInsightsTelemetrySender correlated 1 events with X-TFS-Session 8a46dbca-e561-4dd7-ab21-92c8c86e4de1
2019-11-12T21:42:36.0512117Z ##[error]The system cannot find the file specified
2019-11-12T21:42:36.0520742Z ##[debug]Processed: ##vso[task.logissue type=error;]The system cannot find the file specified
2019-11-12T21:42:36.0521458Z ##[debug]Processed: ##vso[task.complete result=Failed;]
2019-11-12T21:42:36.1115284Z ##[debug] at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at Agent.Plugins.PipelineCache.TarUtils.RunProcessAsync(AgentTaskPluginExecutionContext context, ProcessStartInfo processStartInfo, Func`3 additionalTaskToExecuteWhilstRunningProcess, Action actionOnFailure, CancellationToken cancellationToken)
at Agent.Plugins.PipelineCache.TarUtils.RunProcessAsync(AgentTaskPluginExecutionContext context, ProcessStartInfo processStartInfo, Func`3 additionalTaskToExecuteWhilstRunningProcess, Action actionOnFailure, CancellationToken cancellationToken)
at Agent.Plugins.PipelineCache.TarUtils.ArchiveFilesToTarAsync(AgentTaskPluginExecutionContext context, String inputPath, CancellationToken cancellationToken)
at Agent.Plugins.PipelineCache.PipelineCacheServer.GetUploadPathAsync(ContentFormat contentFormat, AgentTaskPluginExecutionContext context, String path, CancellationToken cancellationToken)
at Agent.Plugins.PipelineCache.PipelineCacheServer.UploadAsync(AgentTaskPluginExecutionContext context, Fingerprint fingerprint, String path, CancellationToken cancellationToken, ContentFormat contentFormat)
at Agent.Plugins.PipelineCache.SavePipelineCacheV0.ProcessCommandInternalAsync(AgentTaskPluginExecutionContext context, Fingerprint fingerprint, Func`1 restoreKeysGenerator, String path, CancellationToken token)
at Agent.Plugins.PipelineCache.PipelineCacheTaskPluginBase.RunAsync(AgentTaskPluginExecutionContext context, CancellationToken token)
at Agent.Plugins.PipelineCache.SavePipelineCacheV0.RunAsync(AgentTaskPluginExecutionContext context, CancellationToken token)
at Agent.PluginHost.Program.Main(String[] args)
2019-11-12T21:42:36.1219290Z ##[section]Finishing: Cache NuGet packages
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 24 (5 by maintainers)
The referenced PR should be included in 2.146.6 of the agent
Let’s make this error clearer that TAR needs to be on the path
Hi @johnterickson , @b-barthel already has a PR out for “Can we add C:\Program Files\Git\usr\bin to the search path for tar on Windows?”
PR: https://github.com/b-barthel/azure-pipelines-agent/commit/6e0d9b7a64cf48c9e558b3e81f86850916ec3e2a
Docs are live: https://docs.microsoft.com/en-us/azure/devops/pipelines/caching/index?view=azure-devops#required-software-on-self-hosted-agent
Thanks @fadnavistanmay!
@fadnavistanmay Can we add
C:\Program Files\Git\usr\bin
to the search path for tar on Windows?Hi @garfbradaz , sorry for the delay in documentation update. We have a PR out, it looks like it haven’t merged yet. I’ll follow up to get the docs updated.
@fadnavistanmay I was able to reproduce this on my public azure devops. It really is as simple as installing the agent on a 2012 r2 server. I just created one in azure: https://dev.azure.com/mike-barry/Demo2012Issue/_build/results?buildId=420&view=results
If you need additional access please let me know