简体   繁体   English

项目版本控制 - CI/CD - Jenkins - AEM

[英]Project Versioning - CI/CD - Jenkins - AEM

AEM muti-module project has pom.xml at each module level. AEM 多模块项目在每个模块级别都有pom.xml Version can we changed at that level, new build shows the artifacts with updated version.我们可以在那个级别更改版本,新版本显示更新版本的工件。

With versions, there would be a new AEM Package created for each version.对于版本,将为每个版本创建一个新的 AEM 包。 We would want to uninstall/delete the old package before installing new version.我们希望在安装新版本之前卸载/删除旧包。

Question is, how can we handle the uninstallation/deletion part of old package (new package to be installed is of different version) in CI-CD job?问题是,我们如何处理 CI-CD 作业中旧包(要安装的新包是不同版本)的卸载/删除部分? We could think of following solutions我们可以想到以下解决方案

  1. Query the list of packages to get the version and use that to uninstall.查询软件包列表以获取版本并使用它来卸载。
  2. Pass version as parameter to Jenkins Job in "Build with Parameters".在“使用参数构建”中将版本作为参数传递给 Jenkins 作业。 But automatic build trigger on code check-in could have issue.但是代码签入时的自动构建触发器可能有问题。

Has anyone faced similar situation?有没有人遇到过类似的情况? Please share if there is best practice which is followed for AEM CI-CD jobs for handling different release versions.请分享 AEM CI-CD 作业是否有处理不同版本的最佳实践。

Querying the list of packages is your best option I think.我认为查询软件包列表是您最好的选择。 You can collect any previous version of your package then, no matter when you deployed that specific package to that server the last time.然后,您可以收集任何以前版本的软件包,无论您上次将该特定软件包部署到该服务器的时间。

An alternative option might be to delete the package immediately after installing it, but I fear there might be lots of problems waiting for you then: Some packages need a restart, you may not delete the package to early, ...另一种选择可能是安装后立即删除包,但我担心可能会有很多问题等着你:有些包需要重新启动,你可能不会提前删除包,......

As I said, I would go for the querying solution.正如我所说,我会寻求查询解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM