是否可以从命令行或web上下文之外构建sitecore数据包?即使用nant

时间:2022-08-31 23:34:46

The Sitecore package wizard can be used to build a package containing data and files for the local Sitecore instance.

Sitecore包向导可用于构建包含本地Sitecore实例的数据和文件的包。

Is it possible to build a Sitecore package (items only, files are not required) from the command line, or otherwise outside the context of a website? The idea is to use Nant to create a Sitecore data package. I'm aware of Hedgehog TDS, but this question is aimed at what can be done with the existing Sitecore api.

是否有可能从命令行构建一个Sitecore包(只需要文件,不需要文件),或者在一个网站的上下文之外?其思想是使用Nant创建一个Sitecore数据包。我知道刺猬TDS,但这个问题是针对现有的Sitecore api可以做什么。

5 个解决方案

#1


5  

You should take a look at the Sitecore.Install.PackageGenerator class in the Sitecore.Kernel to see how you may go about creating traditional Sitecore packages.

您应该看看Sitecore.Install。Sitecore上的PackageGenerator类。内核来了解如何创建传统的Sitecore包。

However, you are looking to do this outside of a website context. How do you plan on getting items into the package if you don't have access to the Sitecore web site in which they exist? Before you try to create a package on your CI server I would think you would need to get the Sitecore items into source control so that you can work with them.

但是,您希望在网站上下文之外执行此操作。如果您无法访问它们存在的Sitecore网站,您打算如何将这些项目放入包中?在您尝试在CI服务器上创建一个包之前,我认为您需要将Sitecore项放到源代码控制中,以便您可以与它们一起工作。

I think you have two real options here.

我认为你有两个真正的选择。

  1. Roll your own solution, leveraging serialization APIs, for getting Sitecore items into source control and moving between environments
  2. 将您自己的解决方案,利用序列化api,使Sitecore项目进入源代码控制和在环境之间移动。
  3. Hedgehog Development's Team Development for Sitecore
  4. 刺猬开发团队开发的Sitecore。

For more information on Sitecore serialization please check out the Sitecore Serialization Guide. Specifically, check out how Sitecore envisions you use "Sitecore Serialization with a Source Control System"

有关Sitecore序列化的更多信息,请查看Sitecore序列化指南。具体来说,看看Sitecore是如何使用“Sitecore串行化和源代码控制系统”的。

Also, do some digging around for others who have rolled their own solution around serialization. For instance, http://mcore.wordpress.com/2009/03/17/sitecore-serialization-for-version-control/

还有,为其他在序列化过程中滚动自己的解决方案的人做一些挖掘工作。例如,http://mcore.wordpress.com/2009/03/17/sitecore-serialization-for-version-control/

#2


3  

As skolima suggested... I've implemented and explained a solution using Sitecore Powershell Console here: http://blog.najmanowicz.com/2011/12/19/continuous-deployment-in-sitecore-with-powershell/

skolima建议…我已经在这里使用Sitecore Powershell控制台实现并解释了一个解决方案:http://blog.najmanowicz.com/2011/12/19/continu-deploy- Sitecore -powershell/。

#3


1  

The PowerShell Console for Sitecore could be possibly extended for such scenarios (or simply scripted).

Sitecore的PowerShell控制台可能会扩展到这样的场景(或者简单的脚本化)。

#4


0  

Check this link: http://www.webdatasource.com/2011/08/exporting-and-importing-packages-from-sitecore-through-code-using-sitecore-api/

检查这个链接:http://www.webdatasource.com/2011/08/exporting-and-importing-packages-from-sitecore-through-code-using-sitecore-api/

It describes a solution of creating and installing Sitecore packages using the API.

它描述了使用API创建和安装Sitecore包的解决方案。

#5


0  

Check out Sitecore Courier Shared Source module. It compares two folders with serialized items and creates a diff package.

查看Sitecore Courier共享源模块。它将两个文件夹与序列化的项目进行比较,并创建一个diff包。

You can also browse the sources as an example of Sitecore.Update API usage.

您还可以浏览源代码作为Sitecore的示例。更新API的使用。

#1


5  

You should take a look at the Sitecore.Install.PackageGenerator class in the Sitecore.Kernel to see how you may go about creating traditional Sitecore packages.

您应该看看Sitecore.Install。Sitecore上的PackageGenerator类。内核来了解如何创建传统的Sitecore包。

However, you are looking to do this outside of a website context. How do you plan on getting items into the package if you don't have access to the Sitecore web site in which they exist? Before you try to create a package on your CI server I would think you would need to get the Sitecore items into source control so that you can work with them.

但是,您希望在网站上下文之外执行此操作。如果您无法访问它们存在的Sitecore网站,您打算如何将这些项目放入包中?在您尝试在CI服务器上创建一个包之前,我认为您需要将Sitecore项放到源代码控制中,以便您可以与它们一起工作。

I think you have two real options here.

我认为你有两个真正的选择。

  1. Roll your own solution, leveraging serialization APIs, for getting Sitecore items into source control and moving between environments
  2. 将您自己的解决方案,利用序列化api,使Sitecore项目进入源代码控制和在环境之间移动。
  3. Hedgehog Development's Team Development for Sitecore
  4. 刺猬开发团队开发的Sitecore。

For more information on Sitecore serialization please check out the Sitecore Serialization Guide. Specifically, check out how Sitecore envisions you use "Sitecore Serialization with a Source Control System"

有关Sitecore序列化的更多信息,请查看Sitecore序列化指南。具体来说,看看Sitecore是如何使用“Sitecore串行化和源代码控制系统”的。

Also, do some digging around for others who have rolled their own solution around serialization. For instance, http://mcore.wordpress.com/2009/03/17/sitecore-serialization-for-version-control/

还有,为其他在序列化过程中滚动自己的解决方案的人做一些挖掘工作。例如,http://mcore.wordpress.com/2009/03/17/sitecore-serialization-for-version-control/

#2


3  

As skolima suggested... I've implemented and explained a solution using Sitecore Powershell Console here: http://blog.najmanowicz.com/2011/12/19/continuous-deployment-in-sitecore-with-powershell/

skolima建议…我已经在这里使用Sitecore Powershell控制台实现并解释了一个解决方案:http://blog.najmanowicz.com/2011/12/19/continu-deploy- Sitecore -powershell/。

#3


1  

The PowerShell Console for Sitecore could be possibly extended for such scenarios (or simply scripted).

Sitecore的PowerShell控制台可能会扩展到这样的场景(或者简单的脚本化)。

#4


0  

Check this link: http://www.webdatasource.com/2011/08/exporting-and-importing-packages-from-sitecore-through-code-using-sitecore-api/

检查这个链接:http://www.webdatasource.com/2011/08/exporting-and-importing-packages-from-sitecore-through-code-using-sitecore-api/

It describes a solution of creating and installing Sitecore packages using the API.

它描述了使用API创建和安装Sitecore包的解决方案。

#5


0  

Check out Sitecore Courier Shared Source module. It compares two folders with serialized items and creates a diff package.

查看Sitecore Courier共享源模块。它将两个文件夹与序列化的项目进行比较,并创建一个diff包。

You can also browse the sources as an example of Sitecore.Update API usage.

您还可以浏览源代码作为Sitecore的示例。更新API的使用。