Issue when using "Workspace Clean" in Azure devops - azure

I've got privately hosted pipelines using Azure DevOps and want to be able to clean the directory before each deployment. I found that I could use workspace: clean all which works and deletes all of the content in the directory, the issue being that the task immediately fails afterwards with the error:
I don't understand why this error is happening, it clearly deletes the content but then immediately fails . Has anybody else encountered this?

##[error]The directory is not empty. :XXX
When other processes are using the contents of the target folder, I run into a similar issue.
For example:
When I set the clean: all and keep the folder opening in File Explorer, I get the error.
To solve this issue, you could try the following points:
Check if the target folder is using by other processes.
You can restart the local machine to block the background process。
Try to manually delete the folder D:\azagent\A5\_work\15\client_build and check if it could work.

Related

git hub process seems to be running in this repository after deleting index.lock

Another git process seems to be running in this repository, e.g.
an editor opened by 'git commit'. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.
After deleting index.lock file
The first test would be a simple reboot, to check if the issue persists.
If you cannot reboot right away, check a tool like Process Explorer, which allows you to search for any process keeping an handle to your repository folder 'rmc_backend'(or any file within that folder)

Jenkins build on temp "#" directory

I'm having some issues with Jenkins where my job keeps building under a temp directory example build_job_name##.
I tried deleting all of the folders with that were created in the Workspace/, deleted all of the past builds under Jobs/, added the delete workspace before and after the job runs and even recreated the job from scratch.
The name of the job is important so I need to get build_job_name to stop building as build_job_name##.
Does anyone know what needs to be done to stop it from building temp folders?

Unable to run dotnet under certain directories?

I am using the command: dotnet "myfile.dll"
Initially it was giving me this error: The user's home directory could not be determined. Set the 'DOTNET_CLI_HOME' environment variable to specify the directory to use.
Now after messing around with it, I have moved my files to c:/mydir, and it is giving this error: Failed to initialize CoreCLR, HRESULT: 0x80070057. I found this, but isn't c:/mydir a drive root?
Couple of things I noted:
I am able to run the .dll fine in a different directory.
Both directories contain same files.
The reason I want to run it in c:/mydir is because I am using AWS CodeDeploy, and that is where it copies the files (as far as I know; and the other directories are just the old versions where the files get copied from).
These issues are not linked (the first one I get from running a automated shell script after installation, and the second I get from manually trying to launch the .dll).
If someone could help me solve either one of these issues it would be greatly appreciated.
Try adding Environment=DOTNET_CLI_HOME=/temp to your Service declaration in your .service file. Example syntax:
[Service]
...
Environment=VARNAME=VARCONTENTS
So the actual like would look like this
Environment=DOTNET_CLI_HOME=/temp

Qt creator cannot upload files onto the remote device

I have been using the QtCreator to develop qt application for my remote generic Linux device, when i press the 'Run' button, the program will be deployed into the targeted directory on the remote device and running automatically, everything is fine until recently, i just changed lines of code, but haven't change any settings of the project, after that i'm not able to upload the program onto the remote device anymore, in the .pro file:
TARGET = Test
target.files = Test
target.path = /home/root
INSTALLS += target
The compile output info shows that:
mkdir: cannot create directory '/home/root': permission denied
Failed to upload file...
Deploy step failed.
Error while building/deploying project Test
When executing step 'Upload files via SFTP'
This is confusing, because i'm not creating the directory but just deploy the program into it, that's what i did before and it worked alright.
I was suspecting maybe i need to update the SFTP to newer version, but based on the fact that i can still manually upload files to the remote device via SFTP without any problems, so i guess this is not the reason.
Is anyone here encountered this issue before? Any suggestions and comments are appreciated, and thanks in advance.
check /home/root folders can have rights to access by using command (ls -l)
I just found out the problem has nothing to do with ssh or access right.
It is because i have added more than one linux generic devices, but i'm using the kit for the project with selecting the wrong device.

Where's the "TEMP" folder for Custom Build Steps?

Visual Studio 2010, in my project I made a custom build step which renames a dll file and copies it to other folder. So, Alt+F7, Config props, Custom Build Step / General, command line:
copy /y $(TargetPath) $(TargetName).node
It didn't do anything. Then I also added
ping bat.femei.ro -n 1 -w 5000
It still didn't do anything. It simply flashed a command prompt window for a split second then the window went away. I googled as much as I could concluding that there might be a problem with the folder where the batch file is generated.
I did my best to screenshot that split second with the command prompt and after a boring F7-PrintScreen-PasteInPaint session finally I got
C:\Users\FURAT\AppData\Local\Temp\blablablablablablablablabla.exec.cmd is not recognized as internal or external...
I double checked the directory. It has Everyone permissions set to Allow both Read & Write operations. What's wrong? How do I fix this?
I was unable to find any knobs to tweak temp folder path. It's not Env and it's not in the config either.
What did work however was running VS2010 as Administrator. Now the Custom Build Step works.

Resources