Persistence of project directory for a Process/Remote Process build worker

Oliver Collyer's Avatar

Oliver Collyer

26 Feb, 2020 07:58 AM

My Appveyor.yml is setup to override the clone_script by first checking if the folder exists and only cloning if it does not. If it does exist, then I cd into it and do a pull. This speeds things up enormously. I noticed that if I do not override clone_script, then it clones each time and then deletes this folder at the end of the build.

Secondly, in my before_build script, I perform similar "if not exist then clone else pull" for a variety of dependent repos, which I then install in a folder parallel to my main repo clone.

Thus my c:\Users\appveyor folder contains this folder structure:

main_repo - the main repo being cloned, that contains the appveyor.yml
thirdparty
  dependency_repo1
  dependency_repo2
  ...etc

I want to ask - can I relly on the persistence of these folders? I wasn't too sure why overriding the clone_script meant it didn't delete the folder at the end, even though I am pleased it works like this. But is this guaranteed?

  1. Support Staff 1 Posted by Feodor Fitsner on 26 Feb, 2020 06:27 PM

    Feodor Fitsner's Avatar

    Hi Oliver,

    If you open appsettings.build-agent.json in the root of Host Agent installation folder (C:\Program Files\AppVeyor\HostAgent) there is an option DoNotDeleteBuildFolderOnFinish which allows you to control cleanup logic on build completion. But, of course, clone_script should be used anyway. Let me know if that worked for you.

  2. 2 Posted by Oliver Collyer on 27 Feb, 2020 09:12 AM

    Oliver Collyer's Avatar

    Thanks for this - is there an equivalent setting when the AppVeyor server is running a build in “Process”?

    I can see it uses the TEMP user for the build in this case (whereas Remote Process uses the “appveyor” user it seems), and clears down the build folder each time. Is there a way to stop it clearing down the build folder - there is no HostAgent folder on the server in the program data folder.

    Alternatively, maybe I can just use %APPDATA% and do everything in my own workspace folder and bypass the build folder completely?

  3. Support Staff 3 Posted by Feodor Fitsner on 27 Feb, 2020 07:14 PM

    Feodor Fitsner's Avatar

    Well, if you can use some external directory to clone the sources then I'd do that.

  4. Feodor Fitsner closed this discussion on 28 Apr, 2020 09:04 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

 

01 Oct, 2024 04:27 PM
26 Sep, 2024 03:49 PM
26 Sep, 2024 09:02 AM
25 Sep, 2024 07:07 PM
24 Sep, 2024 08:39 PM
24 Sep, 2024 06:47 AM