TeamCity: How to create a delay between build steps

I have a problem with TeamCity generating some Android APKs.

I have both the QA and the release APK, each in their own build step.

The problem is that the Release build step never completes as it seems to be accessing a file that is still in use by the QA build step.

I tried to add a Powershell build step in between using

Start-Sleep -Seconds 10

      

However, that doesn't seem to be the main reason TeamCity is waiting.

Does anyone know how to create a pause between build steps?

thank

+3


source to share


3 answers


I faced the same problem. However, I needed a controlled / large delay. I found that Teamcity can be delayed using the old ping test delay method. Anyway, I know that you solved your problem, but thought that others could take advantage of it; this url is # 1 in google search results.



REM Delay for 30 sec  
ping -n 30 127.0.0.1 > nul

      

+7


source


I solved this by using a while loop instead.

The problem was using a shared file.



while ( test-path 'D:\Builds\File.txt') {
del 'D:\Builds\File.txt'
}

      

0


source


FWIW I'm in TeamCity 9.x and the original script that sleeps for 10 seconds as stated in the question seems to work for me on a trivial one-step PowerShell project.

0


source







All Articles