Skip to content

Agent.WorkingDirectory appears not to be writable when run from inside a container #21

@flcdrg

Description

@flcdrg

Not exactly sure why, but when I run Cake from within a Linux Container (Ubuntu / .NET Core) as part of an Azure Pipelines build, the directory pointed at by Agent.WorkFolder (aka TFBuild.Environment.Agent.WorkingDirectory ) is not writable, such that Cake.TFBuild.Module.TFBuildReportPrinter.WriteToMarkdown is failing to create the tasksummary.md file.

This results in the following error:

========================================
Default
========================================
##[debug]Processed: ##vso[task.logdetail finishtime=02/25/2019 05:00:15;progress=100;result=Succeeded;id=3f293bfc-27b1-42cf-af56-139f503340c8;]update
##[debug]Processed: ##vso[task.logdetail finishtime=02/25/2019 05:00:15;progress=100;state=Completed;result=Succeeded;id=0ffa0556-53ab-4a01-8f8a-c7dd226e3a15;]update
Error: One or more errors occurred. (Access to the path "/__w/tasksummary.md" is denied.)
	Access to the path "/__w/tasksummary.md" is denied.
##[debug]Exit code 1 received from tool '/bin/bash'

(I wasn't having this problem when I was building in a non-container Ubuntu hosted agent)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions