'creating a release pipeline, I am not able to create a release pipeline due to shell script failure in the tasks [closed]
cp /dockeragents/sw/ADOAgents/ADOAgent2/_work/r15/a/ws_ordermanagement_bookit_order_enrichment/manifest.yaml /dockeragents/sw/ADOAgents/ADOAgent2/_work/r15/a/ws_ordermanagement_bookit_order_enrichment/drop/manifest.yaml
2022-04-27T17:22:16.0009260Z [command]/bin/bash /dockeragents/sw/ADOAgents/ADOAgent2/_work/r15/a/user_script.sh
2022-04-27T17:22:16.0100843Z mkdir: cannot create directory ‘/dockeragents/sw/ADOAgents/ADOAgent2/_work/r15/a/ws_ordermanagement_bookit_order_enrichment/drop’: No such file or directory
2022-04-27T17:22:16.0130519Z cp: cannot stat '/dockeragents/sw/ADOAgents/ADOAgent2/_work/r15/a/ws_ordermanagement_bookit_order_enrichment/manifest.yaml': No such file or directory
2022-04-27T17:22:16.0175479Z /bin/bash failed with return code: 1
2022-04-27T17:22:16.0180179Z return code: 1
2022-04-27T17:22:16.0198746Z ##[section]Finishing: Shell Script
Solution 1:[1]
- You'll get a "
No such file or directory
" error when trying to write script or file into directory that don't exist. Please check destination path is correct. If that’s the case, try running the script in required directory. - Also check if the user that is trying to access the directory has proper permissions to access as you need the directory to be owned by the same user the container is running as, you need to take care of permissions of the volumes.
Note that
workingDirectoryInput
is to specify the working directory in which you want to run the script. It does not define where to find the script. The scriptPath input is used to specify the script path.
For more details see: AzureCLIV2,parameters-of-the-task
- When we run pipeline artifacts where the directory changes often, you may have to change the script path rather than keeping it the workingDirectory. Please check your scriptPath or script location which is Fully qualified path of your script file or a path relative to the default working directory
According to Troubleshoot pipeline runs - Azure Pipelines | Microsoft Docs :
If you invoke MSBuild during your build, make sure to pass the argument /nodeReuse:false
(short form /nr:false
) as MSBuild can interfere with attempts to delete or move a directory - due to a conflict with the working directory of the MSBuild process(es).
References:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | kavyasaraboju-MT |