lundi 27 juillet 2015

Deploying Website to AWS with MSBuild Using TeamCity

I am trying to automate deployment to AWS with TeamCity using an MSBuild command in the TeamCity build configuration settings.

The MSBuild command options included are:

/p:DeployOnBuild=True 
/p:PublishProfile="%system.teamcity.build.workingDir%\Properties\PublishProfiles\DeployLocally.pubxml"

Where the publish profile is a profile generated using Visual Studio which publishes the website to the filesystem...

Then, I zip the published website using Powershell via the Command Line and delete the unzipped build files:

powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::CreateFromDirectory('C:\Deploy\_deploy', 'C:\Deploy\_deploy.zip'); }"
powershell.exe -nologo -noprofile -command "& {Remove-Item C:\Deploy\_deploy\* -recurse;}"

When I inspect the deployed zip file, everything seems to be there. However, when I load the file up to AWS, the deployment fails with an error every time. I have created an AWS support ticket, and they have reviewed my upload process and the errors, and we have figured out that there is something wrong with the build and not necessarily the AWS deployment process. This is because I was able to successfully deploy the AWS sample project.

I am currently stumped and mystified as to what is going wrong. I understand that this may not be enough information to diagnose and solve the problem...so I am mainly looking for leads for the next direction to look for an answer. Also, I'm hoping that I've just forgotten something trivial in the MSBuild command...




Aucun commentaire:

Enregistrer un commentaire