question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiple checkout with custom paths fails in the container job

See original GitHub issue

Required 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:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:14

github_iconTop GitHub Comments

4reactions
beatcrackercommented, May 27, 2020

@qmfrederik FYI, I’ve worked around this issue by specifying target: host for checkout steps.

2reactions
jennlicommented, Jun 18, 2020

@beatcracker thank you so much for the work around, I am having the same issue and your method solved it.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found