DEV Community

prince raj
prince raj

Posted on

cp: cannot stat 'bhfonlineshop': No such file or directory. Azure devops pipeline error

I am running a azure devops pipeline and facing the error below.
I am running a azure devops pipeline and facing the error below.
/usr/bin/bash --noprofile --norc /home/***/myagent/_work/_temp/d6b34bdf-89e5-43e9-862a-c0c33f02f84f.sh
cp: cannot stat 'onlineshop': No such file or directory

[error]Bash exited with code '1'.

This is the code snippet of the pipeline

stages:

  • stage: Checkout displayName: 'Checkout Stage' jobs:
    • job: CheckoutJob displayName: 'Checkout Job' steps:
      • checkout: self
      • checkout: shop clean: true path: shop
      • script: | cd $(System.DefaultWorkingDirectory) && sudo cp -r onlineshop $(buildFolder)/builds

My source code i.e. onlineshop is not coming under _work/5/s when $(System.DefaultWorkingDirectory) is running. source code onlineshop is coming under _work/5/onlineshop. because of this I am getting error.

Please help if anyone can help to resolve the issue.

Thanks in advance.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

πŸ‘‹ Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay