在本文中,我将描述我完成的内部设置。 我已经完成了多项任务,包括构建,测试,部署,执行重复的计划任务。 为此,我使用了Java程序,Tomcat和Jenkins本地安装。 詹金斯·乔布斯(Jenkins Jobs)有一个不错的选择,可以通过以下几种方式触发和执行:
- 通过CRON表达式–每天,每五分钟,每周一次或按计划在CRON表达式中输入的内容及时地启动作业。每当我将某些东西提交到在自动化设置中使用了一些代码的Git存储库中时,即会在挂接到git post update脚本后执行作业,并调用一个简单的cURL命令。执行作业后-可以以分层,链接的方式触发其他作业-附加条件仅在某些构建状态下才能进行。
部署任务–我执行的最基本的Jenkins任务是–提交内容后–执行构建脚本并产生一些结果– WAR文件,Zip文件,Jar,EXE或其他内容,以及–发布过程将结果上传到我的服务器。 从理论上讲,结果可以通过电子邮件发送,上传到某些云存储甚至是应用商店。 还没做到,但这是有可能的。
清除任务,备份作业–我有一份备份站点中数据库的作业。 保存最近的存档可以节省资源。 我还有一些任务需要清除一些特殊表-构建完成表-因此,在拥有新版本的构建工具之后,所有“从数据模型构建应用程序”任务都将再次执行。
CRON任务–备份任务是计划的作业。 而且,从数据模型构建应用程序的任务每隔“某个”分钟执行一次,即5,15或我认为合适的任何时间。
更新CRON可执行文件–数据模型构建器只是简单的Jar。 它们依赖于几个项目或模块,因此当我对依赖项进行更改时,在成功部署之后,将触发多个“更新Jar”任务。
GeneratorApp – This is one of my core projects. It does the creation of CRUD operations, data model oriented layers and user interfaces based on – my own or publicly defined data models. It has a deployment job, after the deployment Update the CRON executables and Clean Build tasks are chained and executed in a work flow.
一种ndroid GeneratorApp Builder – This is an app for creating android apps from data models. It Generates offline CRUD operations on the records with your definitions. I have an idea extending this builder to not only offline data models. Will see how it goes.
Flutter offline Web app GeneratorApp builder – Flutter is a cross platform framework that I’ve spend most of 2019 on. In year 2020 I am considering moving away from it. The advantage of fast building interfaces for all platforms – Desktop, Mobile, Web – with close to only one source code repository – is for early stage products. Whenever a project succeeds getting fame and some money – the time saving feature is cleared out and killed by the disadvantages – bigger app size, integration issues, and the fact that – there is no true escape from the native part. Whenever an app does something more that simple CRUD operations or a “Hello World” – a native package is required.
As a part of the evolution of my tool I have a next version of my Flutter online Web app builder. It is still in BETA. It creates crud operations with association of the data models around the a core data model – “The User/Profile/Registration”. In my own use of it I see more and more features needed, so the end result to require less and less actual code change or update. And all the new features require custom code beyond simple CRUD operations. Will see how things will go in 2020, but I’m definitely considering all kinds of directions.