Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

Mitch Thompson January 9, 2014

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

0 votes
Answer accepted
Mitch Thompson January 14, 2014

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

0 votes
Mitch Thompson May 18, 2014

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

0 votes
Mitch Thompson January 12, 2014

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

0 votes
Mitch Thompson January 12, 2014

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.

0 votes
Gretchen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 12, 2014

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?

0 votes
Gretchen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 12, 2014

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.

Mitch Thompson January 12, 2014

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events