Project Icon

jervis

Jenkins 自动化作业生成与管理工具

Jervis 是一个增强 Jenkins 自动化能力的开源工具。它利用 Job DSL 插件脚本和共享管道库,简化作业生成过程。Jervis 支持多种编程语言和构建工具,通过约定优于配置的方式,简化项目接入流程,特别适合大规模项目管理。该工具提供完整文档和示例,便于用户快速掌握和应用。

Jervis: Jenkins as a service

Build Status Coverage Status Maven Central Release GH commits since latest release

  • Project status: released to maven central.
  • Currently Targeted platforms:
    • Jenkins server host: Linux and Mac OS X (Windows compatible)
    • Jobs on clients: Linux only (Multi-platform capable)
What is Jervis?

Documentation

The library API is also fully documented. To generate the latest developer docs execute the following command.

./gradlew groovydoc

The documentation can be found in build/docs/groovydoc.

Provided examples

More about Jervis

Jervis is a combination of some letters in the words Jenkins and Travis: JEnkins tRaVIS. Jenkins is a continuous integration tool which is typically installed on premises. Travis is a hosted, distributed continuous integration system used by many open source projects. Both Jenkins and Travis have paid and enterprise offerings.

Jervis uses Travis-like job generation using the Job DSL plugin and groovy scripts. It reads the .jervis.yml file of a project and generates a job in Jenkins based on it. If .jervis.yml doesn't exist then it will fall back to using the .travis.yml file.

For development planning and other documentation see the Jervis wiki. If you wish to stay up to date with the latest Jervis news then please feel free to watch this repository because I use the issue tracking and wiki for planning.

Why Jervis?

What is Jervis attempting to scale? Let's talk about some scale bottlenecks that have been overcome by Jenkins (formerly Hudson) and its community.

The scaling issue is a main bullet. The solution for the issue is in a sub-bullet.

  • Developers are challenged with integrating work, building often, and even deploying often.
    • Jenkins was invented.
  • Jenkins infrastructure is strained when too many agents are in one server and too many jobs are queued up on a daily basis. A single Jenkins server struggles to perform all requested builds in a timely manner. Jenkins also suffers from single point of failure as a lone server.
    • Multi-controller Jenkins was invented. This provides redundancy for the server. Throughput for daily build capacity is improved.
  • Jenkins jobs suffer from a lot of duplicate code. It is difficult to fix a bug in one job and have it propagate to other jobs.
    • Jenkins Job DSL plugin was invented. Configuration through code is now possible. Multiple jobs can be generated and regenerated with the same code using templates in a domain specific language.
  • Onboarding new projects in a Jenkins installation can be difficult. Typically engineers will get together and discuss the needs of the project and then configure a Jenkins job for the needs of the project. For enterprises with a very large number of projects it is typically hard to scale number of build engineers to match with the large number of projects which require onboarding into the build ecosystem.
    • Jervis is being invented. Job generation through convention over configuration. Scaling the onboarding for a project by creating and abiding by conventions in how jobs are generated. This is for large scale job generation and project onboarding. Jervis is taking lessons learned from a seasoned build engineer and attempting to fill this gap in the Jenkins ecosystem.

Set up

To include this library for use in your Job DSL plugin scripts you only need include it in your build tool.

Maven

<dependency>
  <groupId>net.gleske</groupId>
  <artifactId>jervis</artifactId>
  <version>2.0</version>
  <type>pom</type>
</dependency>

Gradle

Your Job DSL scripts should have a build.gradle file which has the following contents.

apply plugin: 'maven'

repositories {
    mavenCentral()
}


configurations {
    libs
}

dependencies {
    libs 'net.gleske:jervis:2.0'
    libs 'org.yaml:snakeyaml:2.0'
}

task cleanLibs(type: Delete) {
    delete 'lib'
}

task libs(type: Copy) {
    into 'lib'
    from configurations.libs
}

defaultTasks 'clean', 'libs'
clean.dependsOn cleanLibs

Then execute ./gradlew libs to assemble dependencies into the lib directory of the Jenkins workspace. Don't forget to add lib to the classpath. This must be done before you configure your Jenkins job to execute Job DSL scripts.

Interactive debugging

Groovy Console is built into the Gradle file.

./gradlew console

Other development commands

Generate code coverage reports.

./gradlew clean check jacocoTestReport

Build the jar file.

./gradlew clean jar

Sign build jars and sign archives.

./gradlew clean check signArchives

See also RELEASE.md.

Local SonarQube Analysis

See SonarQube README.

License

Copyright 2014-2024 Sam Gleske

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
项目侧边栏1项目侧边栏2
推荐项目
Project Cover

豆包MarsCode

豆包 MarsCode 是一款革命性的编程助手,通过AI技术提供代码补全、单测生成、代码解释和智能问答等功能,支持100+编程语言,与主流编辑器无缝集成,显著提升开发效率和代码质量。

Project Cover

AI写歌

Suno AI是一个革命性的AI音乐创作平台,能在短短30秒内帮助用户创作出一首完整的歌曲。无论是寻找创作灵感还是需要快速制作音乐,Suno AI都是音乐爱好者和专业人士的理想选择。

Project Cover

有言AI

有言平台提供一站式AIGC视频创作解决方案,通过智能技术简化视频制作流程。无论是企业宣传还是个人分享,有言都能帮助用户快速、轻松地制作出专业级别的视频内容。

Project Cover

Kimi

Kimi AI助手提供多语言对话支持,能够阅读和理解用户上传的文件内容,解析网页信息,并结合搜索结果为用户提供详尽的答案。无论是日常咨询还是专业问题,Kimi都能以友好、专业的方式提供帮助。

Project Cover

阿里绘蛙

绘蛙是阿里巴巴集团推出的革命性AI电商营销平台。利用尖端人工智能技术,为商家提供一键生成商品图和营销文案的服务,显著提升内容创作效率和营销效果。适用于淘宝、天猫等电商平台,让商品第一时间被种草。

Project Cover

吐司

探索Tensor.Art平台的独特AI模型,免费访问各种图像生成与AI训练工具,从Stable Diffusion等基础模型开始,轻松实现创新图像生成。体验前沿的AI技术,推动个人和企业的创新发展。

Project Cover

SubCat字幕猫

SubCat字幕猫APP是一款创新的视频播放器,它将改变您观看视频的方式!SubCat结合了先进的人工智能技术,为您提供即时视频字幕翻译,无论是本地视频还是网络流媒体,让您轻松享受各种语言的内容。

Project Cover

美间AI

美间AI创意设计平台,利用前沿AI技术,为设计师和营销人员提供一站式设计解决方案。从智能海报到3D效果图,再到文案生成,美间让创意设计更简单、更高效。

Project Cover

AIWritePaper论文写作

AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。

投诉举报邮箱: service@vectorlightyear.com
@2024 懂AI·鲁ICP备2024100362号-6·鲁公网安备37021002001498号