Pregunta

I'm part of a large developmentteam with a big project that is built with TFS 2013. We have gotten the build to work with automatic tests and web transformations as well as deployment to correct folders. The last part we need is a way to copy additional files to the drop location with regards to different environment.

We have a folder in the solution that contains several deployment files for different environments. We build for several environment with each build.

The folder looks like the following: A folder named contains several powershell scriptfiles (Deploy.ps1, RunDeploy.ps1, StartService.ps1) The first file should be copied to the root of the drop folder location for each configuration/environment. The last two files should be copied to a new folder named Deploy under each configuration in the drop folder. Additional to this we have several settings files in the same sourcefolder. One file for each environment named settings-.txt These files should be copied to the Deploy folder for the correct configuration under the drop location.

We are using TFS 2013 so preferable using a custom workflow but we can use a target-file if needed.

Any idea how this can be created? Where should I start?

I have been unable to locate a variable in a custom task in the build process that contains the location of the dropfolder for each configuration.

¿Fue útil?

Solución

I managed to create a custom task in the build template after some searching for the variables I finally could create a custom task that created the correct folders and located the files that needed to be brought along in the build.

To find the variables I used the common task GetEnvironmentVariable with the specified variables. To see what each variable contained I added a print line just afterwards and tried the build and then when I had found the needed sources of information the task to create a custom build task was fairly easy.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top