Keep agent from purging work directory when new build starts
We have builds running for multiple projects serially but each project build deletes subsequent build folders, under buildagent/work folder, not related to the current build. I'd like to stage builds and keep older builds so I can deploy them at a later time. How do I prevent the agent from deleting other project builds before beginning a new project build.
Please sign in to leave a comment.
Hi Haimiko,
your desired behavior is the default behavior, as long as you don't specify the same folder for all builds, or share the exact same VCS settings for all builds.
If you want to deploy different or older versions, the recommendation would be to set whatever you need to deploy as a build artifact, and keep the build artifacts you might want to deploy later. Then have a separate configuration for the deployment, that simply gathers the build artifacts you specify and performs the deployment.