All Projects → Houfeng → Cize

Houfeng / Cize

🔌 Continuous integration with the simplest solution

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Cize

Ci Matters
Integration (comparison) of different continuous integration services on Android project
Stars: ✭ 119 (+19%)
Mutual labels:  ci, jenkins, travis-ci
Ci Detector
Detect continuous integration environment and get information of current build
Stars: ✭ 138 (+38%)
Mutual labels:  ci, jenkins, travis-ci
Nevergreen
🐤 A build monitor with attitude
Stars: ✭ 170 (+70%)
Mutual labels:  ci, jenkins, travis-ci
Unity Actions
Github actions for testing and building Unity projects
Stars: ✭ 358 (+258%)
Mutual labels:  ci, test
Previs
🎯 Testing your project locally in a clean environment.
Stars: ✭ 312 (+212%)
Mutual labels:  ci, test
Cob
Continuous Benchmark for Go Project
Stars: ✭ 326 (+226%)
Mutual labels:  ci, test
Travis Buddy
🚀 Seamless integration between TravisCI and GitHub
Stars: ✭ 262 (+162%)
Mutual labels:  ci, travis-ci
Bzppx Codepub
暴走皮皮虾之代码发布系统,是现代的持续集成发布系统,由后台管理系统和agent两部分组成,一个运行着的agent就是一个节点,本系统并不是造轮子,是"鸟枪"到"大炮"的创新,对"前朝遗老"的革命.
Stars: ✭ 471 (+371%)
Mutual labels:  ci, jenkins
Danger Js
⚠️ Stop saying "you forgot to …" in code review
Stars: ✭ 4,076 (+3976%)
Mutual labels:  ci, jenkins
Newman
Newman is a command-line collection runner for Postman
Stars: ✭ 5,607 (+5507%)
Mutual labels:  ci, jenkins
Docker Jenkins
Jenkins with Blue Ocean and support for builiding jobs in Docker
Stars: ✭ 18 (-82%)
Mutual labels:  ci, jenkins
Ccmenu
CCMenu is a Mac application to monitor continuous integration servers.
Stars: ✭ 306 (+206%)
Mutual labels:  ci, jenkins
Nvwa Io
Nvwa-io is a open source DevOps CI/CD auto-build and auto-deploy system(女娲 - 开源 DevOps CI/CD 自动构建和自动部署系统). http://nvwa-io.com
Stars: ✭ 283 (+183%)
Mutual labels:  ci, jenkins
Node Build Monitor
A Build Monitor written in Node.js, which supports several build services and can be easily extended.
Stars: ✭ 336 (+236%)
Mutual labels:  jenkins, travis-ci
Skyhook
Parses webhooks and forwards them in the proper format to Discord.
Stars: ✭ 263 (+163%)
Mutual labels:  jenkins, travis-ci
Pipeline
Pipeline is a package to build multi-staged concurrent workflows with a centralized logging output.
Stars: ✭ 433 (+333%)
Mutual labels:  ci, jenkins
Ansible Role Jenkins
Ansible Role - Jenkins CI
Stars: ✭ 689 (+589%)
Mutual labels:  ci, jenkins
Flutter engine build
Flutter Engine构建产物归档
Stars: ✭ 19 (-81%)
Mutual labels:  ci, jenkins
Nagios Plugins
450+ AWS, Hadoop, Cloud, Kafka, Docker, Elasticsearch, RabbitMQ, Redis, HBase, Solr, Cassandra, ZooKeeper, HDFS, Yarn, Hive, Presto, Drill, Impala, Consul, Spark, Jenkins, Travis CI, Git, MySQL, Linux, DNS, Whois, SSL Certs, Yum Security Updates, Kubernetes, Cloudera etc...
Stars: ✭ 1,000 (+900%)
Mutual labels:  jenkins, travis-ci
Test-Assignments
List of test assignments. ⚡
Stars: ✭ 85 (-15%)
Mutual labels:  job, test

CIZE 是什么?

CIZE 是一个「持续集成」工具,希望能让开发人员更快捷的搭建一个完整、可靠、便捷的 CI 服务。 甚至可以像 Gulp 或 Grunt 一样,仅仅通过一个 cizefile.js 即可完成几乎所有的工作。

npm version Build Status

快速搭建

全局安装

$ [sudo] npm install cize -g

编写 Job

新建 cizefile.js

$ mkdir your_path
$ cd your_path
$ vim cizefile.js

输入如下内容

//定义「项目」
const demo = cize.project('demo', {});

//定义一个 Job,这是一个最基础的 Job
demo.job('hello', function (self) {
  self.console.log('hello world');
  self.done();
});

然后,在「工作目录」中执行 cize 启动服务

$ cize
Strarting...
The server on "localhost:9000" started 

默认会启动和 CPU 核数相同的「工作进程」。

接下来,可以在浏览器中访问 http://localhost:9000 , 并可以在 UI 中手动触发这个名为 hello 的 Job

定义 Project

const demo = cize.project('demo', {
  ...
  //可以在此添加针对项目的配置
  ...
});

注意,即便一个项目不需要任何配置,也不能省略第二个参数, 没有第二个参数时 cize.project(name) 为获取指定的项目

定义 Job

假定现在已经有一个定义好的名为 demoproject

用 js 编写的 Job

demo.job('test', function (self) {
  self.console.log('test');
  self.done();
});

这是最基础的 Job 类型,是其它 Job 类型或「扩展」的基础。

用 shell 编写的 Job

demo.job('test', cize.shell(function () {
  /*
    echo "hello world"
  */
}));

定义一个用 SHELL 编写的 Job,用到了 cize.shell,这是一个「内置扩展」

定时执行的 Job

demo.job('test', cize.cron('* */2 * * * *', cize.shell(function () {
  /*
    echo "hello world"
  */
})));

如上定义了一个每两分种触发一次的 Job 并且,嵌套使用了 shell.

监听其它 Job 的 Job

demo.job('test2', cize.by('test1', function(self){
  self.console.log('hello');
  self.done();
});

如下,在 test1 执行成功后,将会触发 test2

串行执行的 Job

demo.job('test', cize.series([
  "test1",
  function(self){
    self.console.log('hello');
    self.done();
  },
  "test3"
]));

series 是一个内置扩展,可以定义一个「串行执行」多个步骤的任务列表,每个步骤可以是一个任意类型的 job, 也可以是指定要调用的其它 Job 的名称。

并行执行的 Job

demo.job('test', cize.parallel([
  "test1",
  function(self){
    self.console.log('hello');
    self.done();
  },
  "test3"
]));

series 是一个内置扩展,可以定义一个「并行执行」多个步骤的任务列表,每个步骤可以是一个任意类型的 job, 也可以是指定要调用的其它 Job 的名称。

多步嵌套的 Job

CIZE 所有的 Job 可以自由嵌套,例如:

demo.job('test', cize.parallel([
  "test1",
  function(self){
    self.console.log('hello');
    self.done();
  },
  "test3",
  cize.series([
    "test4",
    cize.shell(function(){
      /*
        echo hello
      */
    })
  ])
]));

当你使用一个「外部扩展」时,也可以混合使用。

编写一个扩展

如上用到的 cize.shell、cize.series、cize。parallel、cize.cron、cize.by 是 cize 默契认包含的「内置扩展」。 编写一个「外部扩展」和「内置扩展」并无本质区别,如下:

module.exports = function(options...){
  return function(self){
    //处理逻辑
  };
};

如查需要在 Job 定义时进行一些处理,可以使用 register ,如下

module.exports = function(options...){
  return {
    register: function(Job){
      //Job 是你的「自定义 Job 类型」
      //注册时逻辑
    },
    runable: function(self){
      //执行时逻辑
    }
  };
};

可以将扩展发布为一个「npm 包」,让更多的人使用。

服务选项

可以通过一些选择去控制 CI 服务的端口、密钥等,有两种方式,如下

在 cizefile.js 中配置

cize.config({
  port: 9000,
  secret: '12345'
});

通过命令行工具

cize ./ -p=port -s=secret

通过 cize -h 可以查看完整的说明

Usage:
  cize [folder|file] [options]

Options:
  -w   set the number of workers
  -p   set the port
  -s   set the secret
  -h   display help information

Example:
  cize ./ -p=9000 -s=12345 -w=4

更多内容

请访问 wiki: https://github.com/Houfeng/cize/wiki

路线图

  • 所有 Job 都在单儿独立在一个进程中执行(现在可能会有 n 个 job 共用一个主进程)
  • 集成 Docker
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].