Skip to content
April 2, 2016 / kiranpatils

Sitecore Automatic Deployment learnings

Challenge:

Last week have been spending some time configuring Automatic deployment using Team city for one of our new project (If you are new to Team City and Sitecore automatic deployment. I would encourage you to search and read on that topic. It makes your deployment process smoother!) . The steps are clear, tried, tested and documented. But still faced some issues while configuring it. [Life won’t be boring? If everything works as per documentation 🙂] So, thought to share with you as well!

Ready? Let’s go:

Solution:

  1. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets(4331, 5): The value for PublishProfile is set to ‘QA.CM’, expected to find the file at ‘C:\BuildAgent\work\dcf5173b83de3020\SCBasics.Website.Web\Properties\PublishProfiles\QA.CM’ but it could not be found. : We use Web Deploy for publishing and for that have add Publish Profile which has been named as QA.CM. Initially I thought it might not get pulled over using Team City. But after verifying at given directory — File was there. This issue puzzled me for around 12 hours and then did a quick search and it revealed thisYou can’t have . (dot) while naming Publish Profile name — Replaced . by – and now name looks like this QA-CM — And it works!
  2. sitecore\content\Global\ABC.item(1, 0): error TDS0005: Deploy of /sitecore/content/global/abc failed. Reason: Error reading item: /sitecore/content/Global/abc
    Failed to load version 1 for language en Length of field content does not match the content-length attribute. Field name: ABC Field, field id: {32E448F6-6A9F-4DEA-8F1D-C420F9586918}
  3. sitecore\media library\SCWebsite\Images\Story Slides\XYZ.item(1, 0): error TDS0005: Deploy of /sitecore/media library/SCwebsite/images/story slides/xyz failed. Reason: Failed to paste item: /sitecore/media library/SCWebsite/Images/Story Slides/xyz
    The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.

By looking at #2 and #3 — You will jump out of your chair and say – Hey I know “content-lenghth” issue’s solution. It is easy. Just follow this blog and you will be done : https://theagilecoder.wordpress.com/2013/03/02/tds-so-youre-deploying-sitecore-to-a-new-environment/But life is not as easy as it seems to be! We already did that blog for Local and it works! (Thanks to Jason!). But still we were facing this issue while deploying Sitecore items on Target environment using  Team City. Then quick search pointed out this : We needed to enable the “convert line endings to CRLF” in the Git VCS plugin settings for TeamCity (Reference : https://jrodsmitty.wordpress.com/2015/01/20/team-development-for-sitecore-tds-github-teamcity-and-line-endings-oh-my/)

Now, We can deploy on QA CM and CD Environments with just one click and deployment gets completed with .NET/Sitecore files, Sitecore Items and publishing as well in 3-5 Minutes!

As I mentioned earlier. There are plenty of blogs on web about doing Sitecore deployment using Team City and that’s why have not written anything on it. But let me know If you want me to write (One of my reader — Requested me to do so — But haven’t had a chance to do so. And I believe If I do now. It might not add value)

Hope this helps!

Happy Deployment! 🙂

Advertisements

2 Comments

Leave a Comment
  1. balaji b / Nov 29 2016 10:18 pm

    Hi i’m also trying to build the team city but i faced the below issue
    Deploy of /sitecore/templates/user defined/XXX/page templates/multi instance templates/shows/XXX/XXX/YYYY failed. Reason: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    do you have any solution to resolve this issue ?

    • kiranpatils / Mar 2 2017 10:57 pm

      What’s your project folder? Try to keep it simple e.g. c:\test

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: