Multiple checkout with custom paths fails in the container job
See original GitHub issueRequired Information
Type: Bug
Task Name: checkout
aka 6d15af64-176c-496d-b583-fd2ae21d4df4@1
Environment
-
Server - Azure Pipelines
This is a private CI setup, I can provide the account name, team project name, build definition name/build number via email.
-
Agent - Hosted, Azure Pipelines,
ubuntu-latest
Issue Description
When trying to use multiple checkout feature inside container job, it fails with ##[error]Unable to process command '##vso[plugininternal.updaterepositorypath alias=self;]/home/vsts/work/1/s' successfully.
This azure-pipelines.yml
reproduces the issue:
resources:
containers:
- container: netcore_sdk_3
image: mcr.microsoft.com/dotnet/core/sdk:3.1
stages:
- stage:
jobs:
- job:
container: netcore_sdk_3
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
path: s
- checkout: self
path: s/.azd
Task logs
Anonymized task logs: azd_logs.zip
Error logs
==============================================================================
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
##[error]Unable to process command '##vso[plugininternal.updaterepositorypath alias=self;]/home/vsts/work/1/s' successfully. Please reference documentation (http://go.microsoft.com/fwlink/?LinkId=817296)
##[error]Repository path '/home/vsts/work/1/s' should be located under agent's work directory '/__w/1'.
##[debug]System.ArgumentException: Repository path '/home/vsts/work/1/s' should be located under agent's work directory '/__w/1'.
at Microsoft.VisualStudio.Services.Agent.Worker.Build.BuildDirectoryManager.GetRelativeRepositoryPath(String buildDirectory, String repositoryPath)
at Microsoft.VisualStudio.Services.Agent.Worker.PluginInternalUpdateRepositoryPathCommand.Execute(IExecutionContext context, Command command)
at Microsoft.VisualStudio.Services.Agent.Worker.BaseWorkerCommandExtension.ProcessCommand(IExecutionContext context, Command command, IWorkerCommandRestrictionPolicy restrictionPolicy)
at Microsoft.VisualStudio.Services.Agent.Worker.WorkerCommandManager.TryProcessCommand(IExecutionContext context, String input)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:14
Top Results From Across the Web
Check out multiple repositories in your pipeline - Microsoft Learn
Specify multiple repositories; Repository resource definition; Inline syntax checkout; Checkout path; Checking out a specific ref; Triggers ...
Read more >Job artifacts - GitLab Docs
The paths keyword determines which files to add to the job artifacts. All paths to files and directories are relative to the repository...
Read more >Azure DevOps Container Job with Multiple Repositories
Found out what is the problem When using path, the repo is being checked out to the WORK directory and not the sources...
Read more >Using Workspaces to Share Data between Jobs - CircleCI
If multiple concurrent jobs persist the same filename then attaching the workspace will error. If a workflow is re-run it inherits the same...
Read more >Using Docker with Pipeline - Jenkins
Workspace synchronization; Caching data for containers; Using multiple containers; Using a Dockerfile; Specifying a Docker Label; Path setup for mac OS ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@qmfrederik FYI, I’ve worked around this issue by specifying
target: host
for checkout steps.@beatcracker thank you so much for the work around, I am having the same issue and your method solved it.