Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CacheBeta task: .git folder is not cached? #10942

Closed
lukka opened this issue Jul 18, 2019 · 3 comments
Closed

CacheBeta task: .git folder is not cached? #10942

lukka opened this issue Jul 18, 2019 · 3 comments

Comments

@lukka
Copy link
Member

lukka commented Jul 18, 2019

Required Information

Entering this information will route you directly to the right team and expedite traction.

Type: Bug

Enter Task Name: CacheBeta

Environment

  • Server - Azure Pipelines

    • Account name, team project name, build definition name/build number:

https://dev.azure.com/CppBuild/CppBuildTasks/_apps/hub/ms.vss-ciworkflow.build-ci-hub?_a=edit-build-definition&id=16

  • Agent - Hosted or Private:

    • If using Hosted agent, provide agent queue name: any (Ubuntu, Windows VS 2017)

Issue Description

CacheBeta does not save in the cache the ".git" folder.

Task logs

Logs are not useful, they never mentions about excluding .git folder.

The task CacheBeta is like this:
steps:

  • task: CacheBeta@0
    displayName: CacheBeta
    inputs:
    key: '$(packages)linux'
    path: '$(Build.BinariesDirectory)/vcpkg'

and the directory /../vcpkg/ when is restored does not contain the .git directory. Verified with listing dirs that the .git dir is there when cache is missed and created thereafter. But when i hit the cache (and i skip cloning the repo and all its build artifact created in the previous build), the cacheBeta tasks does not restore the .git folder.

@johnterickson
Copy link
Contributor

You should be able to override this behavior via https://docs.microsoft.com/en-us/azure/devops/artifacts/reference/artifactignore?view=azure-devops#ignored-by-default

@willsmythe what's your take on what the behavior should be?

@johnterickson
Copy link
Contributor

@fadnavistanmay How does #10925 play in here?

@fadnavistanmay
Copy link
Contributor

Hi @lukka - If you are using the agent 2.160.0 - you will see the .git folder cached. Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants