Why does Bamboo + msbuild + DeployOnBuild create corrupt zip files?

I work for STTI, a nonprofit organization that qualified for your non-profit license agreement. We have pretty much every single atlassian product installed and currently being utilized.

I am working on a site-wide deployment solution for all of our websites. One of the steps is to utilize parameterized deployments. When I attempt to manually use msbuild on my development PC, the deployment zip files that are created are fine. When i have bamboo create the build, using our build agent PC, the same process creates corrupt deployment zip files (bad CRC errors on random files). Also, sometimes all artifacts are not created. I've tried all of the basic troubleshooting and even some advanced things, but all I keep returning to is that something with Java possibly is causing the msbuild's built in zip file creation to cause problems. FYI I've turned off parallel build but it didn't help any.

I've already confirmed I have the exact same version of msbuild on the dev and build agent computers. We are using the latest server operating systems from our MSDN licenses, hence everything is up to date. Has anyone come across this problem before?

6 answers

1 accepted

I was asking the wrong question.. I should have been asking this:

Why are zip file artifacts corrupted, but are ok on my build agent?

https://answers.atlassian.com/questions/251415/why-are-zip-file-artifacts-corrupted-but-are-ok-on-my-build-agent

I can't imagine how Bamboo can be the cause of the issue since it just executes the commands you give it. I did google this for you (slow day) and found similar problems reported elsewhere like here: http://forums.iis.net/t/1160014.aspx. It specifically talks to parameterized deployments (I think, not being a MS expert but it looks like it to me.)

Incidentally, questions on this site are generally responded to by other users although frequently Atlassian employees will also jump in. By your description (since this appeared to be addressed to Atlassian specifically) it seems as though you might think this is the primary support site. It's not. Just thought I'd point that out so your expectations are set appropriately. Hope the link helps.

I had noticed that this problem is confined to the 'copy' of artifacts from the build agent to the bamboo machine. The zip files are always fine on the build agent, but after they are moved to the shared dirs on bamboo, they are corrupt. This was just discovered this morning.

What do your logs tell you about this? Specifically in the steps that do the copy. Check to make sure your parameters don't have extra characters (spaces etc.) if they are variabilized (new word, I just made it up). Also how different is the file size between the corrupt and the non-corrupt version?

I had noticed that this problem is confined to the 'copy' of artifacts from the build agent to the bamboo machine. The zip files are always fine on the build agent, but after they are moved to the shared dirs on bamboo, they are corrupt. This was just discovered this morning.

The logs don't say anything useful.... Also, the steps that do the copy are built into Bamboo, its the system that moves the actual artifact files around. Its nothing i've built that is custom.

We're going to upgrade to the latest version of bamboo (we're running 5.1 now and 5.3 is available) but i'm not having high hopes.

2014-01-10 11:13:19,067 INFO [7-BAM::Default Agent::Agent:pool-20-thread-1] [AbstractArtifactManager] Publishing [Parameters] for MANAGE-DEV-JOB1-108: 3 file(s) matching [**STTIEnvironments/*.xml] in directory C:\bamboo-home\xml-data\build-dir\MANAGE-DEV-JOB1\code
2014-01-10 11:13:19,067 INFO [7-BAM::Default Agent::Agent:pool-20-thread-1] [AbstractArtifactManager] Publishing [PowerShell] for MANAGE-DEV-JOB1-108: 4 file(s) matching [**/*.ps1] in directory C:\bamboo-home\xml-data\build-dir\MANAGE-DEV-JOB1\PowerShell\SiteDeploy
2014-01-10 11:13:19,083 INFO [7-BAM::Default Agent::Agent:pool-20-thread-1] [ExecutionPhaseServiceImpl] Management Site - Management Site - Default Job #108 (MANAGE-DEV-JOB1-108) execution finished
2014-01-10 11:13:19,083 INFO [7-BAM::Default Agent::Agent:pool-20-thread-1] [DefaultBuildExecutionManager] onExecutionFinishedTimingPoint for MANAGE-DEV-JOB1-108
2014-01-10 11:13:19,083 INFO [7-BAM::Default Agent::Agent:pool-20-thread-1] [LocalBuildResultProcessor] Processing build result MANAGE-DEV-JOB1-108...
2014-01-10 11:13:19,083 INFO [7-BAM::Default Agent::Agent:pool-20-thread-1] [ExecutionPhaseServiceImpl] Management Site - Management Site - Default Job #108 (MANAGE-DEV-JOB1-108) execution finished

It ended up being a setting in the network card setup. The "Large Send Offload" needs to be set to Disabled for it to work properly. This setting is in "Advanced" un the network card -> properties on the build agent.

A related problem of artifacts randomly not copying led us to this solution.

See https://confluence.atlassian.com/display/BAMKB/Windows+build+artifacts+are+not+copied

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,077 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot