kevinobee / Sitecore.Ship

Ship provides a CI service layer for Sitecore
MIT License
71 stars 61 forks source link

Sitecore.Ship does not work with Sitecore 8.2 Update 1 for Azure Deployment #66

Open SC-MNAS opened 7 years ago

SC-MNAS commented 7 years ago

None of the items gets deployed to Sitecore. The log below is quiet misleading as looking at this the package should have been installed but actually not.

Sitecore.Ship throws exception here: var installationInfo = GetInstallationInfo(packagePath); entries = UpdateHelper.Install(installationInfo, logger, out historyPath); ,<-- silently fails i.e .doesn't return any error and doesn't install package as well.

Logs: INFO:Installing package: D:\home\site\wwwroot\App_Data\data\temp\d34cb1db-dcef-4dc7-9159-576c2876dfaa.update INFO:Installation Mode: Install INFO:Installation of package 'D:\home\site\wwwroot\App_Data\data\temp\d34cb1db-dcef-4dc7-9159-576c2876dfaa.update' has been finished. INFO:Post installation step for the package 'D:\home\site\wwwroot\App_Data\data\temp\d34cb1db-dcef-4dc7-9159-576c2876dfaa.update' has been executed.

22/12/2016-11:36 PM: Starting PostDeployActions 22/12/2016-11:36 PM: Exception Could not find file 'D:\home\site\wwwroot_DEV\DeployedItems.xml'.(FileNotFoundException): at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) at System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy) at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) at System.Xml.XmlTextReaderImpl.FinishInitUriString() at System.Xml.XmlTextReaderImpl..ctor(String uriStr, XmlReaderSettings settings, XmlParserContext context, XmlResolver uriResolver) at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext) at System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext) at System.Xml.Linq.XElement.Load(String uri, LoadOptions options) at HedgehogDevelopment.SitecoreProject.PackageInstallPostProcessor.DoPostDeployActions.Run(ITaskOutput output, NameValueCollection metaData)

P.S. On my investigation, I found that Sitecore 8.2 update 1 uses Sitecore.update.dll(version 2.0). UpdateHelper.Install() function has been modified that breaks the package deployment from Sitecore.Ship.

kevinobee commented 7 years ago

Thanks for the heads up, will address. Black mark for Sitecore SemVer policy adherence ;-)

SC-MNAS commented 7 years ago

For fixing this issue in Sitecore.Ship, possible workaround could be:

Modify 'Sitecore.Ship.Infrastructure.Update.UpdatePackageRunner' class in Sitecore.Ship.Infrastructure project by replacing

entries = UpdateHelper.Install(installationInfo, logger, out historyPath);

with

using (new SecurityDisabler()) { bool flag; DiffInstaller installer = new DiffInstaller(installationInfo.Action); entries = installer.InstallPackage(installationInfo.Path, installationInfo.Mode, logger, new List(), "rollbackPackage.rlb", out flag, ref historyPath); }

Build the Sitecore.Ship.Infrastructure Project and replace the Sitecore.Ship.Infrastructure.dll in you website.

This will allow to use the simple package installation mode.

kevinobee commented 7 years ago

Fancy submitting a pull request? Thanks for the insight, much appreciated.

On 27 Dec 2016 14:53, "Muhammad Naeem Ashraf" notifications@github.com wrote:

For fixing this issue in Sitecore.Ship, possible workaround could be:

Modify 'Sitecore.Ship.Infrastructure.Update.UpdatePackageRunner' class in Sitecore.Ship.Infrastructure project by replacing

entries = UpdateHelper.Install(installationInfo, logger, out historyPath);

with

using (new SecurityDisabler()) { bool flag; DiffInstaller installer = new DiffInstaller(installationInfo.Action); entries = installer.InstallPackage(installationInfo.Path, installationInfo.Mode, logger, new List(), "rollbackPackage.rlb", out flag, ref historyPath); }

Build the Sitecore.Ship.Infrastructure Project and replace the Sitecore.Ship.Infrastructure.dll in you website.

This will allow to use the simple package installation mode.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/kevinobee/Sitecore.Ship/issues/66#issuecomment-269287314, or mute the thread https://github.com/notifications/unsubscribe-auth/ABnDonAIhG7gJ5BqJvy1TOFlZJhWmgKpks5rMMP-gaJpZM4LWFm3 .

dharnitski commented 7 years ago

Pull request submitted - https://github.com/kevinobee/Sitecore.Ship/pull/69

Please let me know if I can do anything else.

csteeg commented 7 years ago

@kevinobee could you please merge this and update the nuget package?

naveed-ahmad-biz commented 7 years ago

@kevinobee I did the above changes and it worked for me 8.2 update 3

alexshyba commented 7 years ago

I had a different problem with the Marketplace deployment. Getting this error during the install:

[ArgumentNullException: Value cannot be null.
Parameter name: path]
   System.IO.File.Delete(String path) +14235104                                Sitecore.Ship.AspNet.Package.InstallUploadPackageCommand.HandleRequest(HttpContextBase context) +593
   Sitecore.Ship.AspNet.Package.InstallPackageCommand.HandleRequest(HttpContextBase context) +280
   Sitecore.Ship.AspNet.AboutCommand.HandleRequest(HttpContextBase context) +399
   Sitecore.Ship.AspNet.BaseHttpHandler.ProcessRequest(HttpContext context) +276
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +508
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +92

To work around, patched the dataFolder variable:

<configuration xmlns:x="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <sc.variable name="tempFolder">
      <x:attribute name="value">/temp</x:attribute>
    </sc.variable>
  </sitecore>
</configuration>