All Projects → alpacaaa → Quad Ci

alpacaaa / Quad Ci

Licence: mit
A CI server written in Simple Haskell.

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Quad Ci

Monday
⚡️ A dev tool for microservice developers to run local applications and/or forward others from/to Kubernetes SSH or TCP
Stars: ✭ 1,246 (+1171.43%)
Mutual labels:  architecture
Freecad
This is the official source code of FreeCAD, a free and opensource multiplatform 3D parametric modeler. Issues are managed on our own bug tracker at https://www.freecadweb.org/tracker
Stars: ✭ 10,366 (+10477.55%)
Mutual labels:  architecture
Cleanarchitecture
Android Kotlin Clean Architecture
Stars: ✭ 94 (-4.08%)
Mutual labels:  architecture
Ribot Android Boilerplate Kotlin
Kotlin version of android boilerplate app that showcases architecture and libraries used at ribot http://ribot.co.uk
Stars: ✭ 85 (-13.27%)
Mutual labels:  architecture
Alfonz
Mr. Alfonz is here to help you build your Android app, make the development process easier and avoid boilerplate code.
Stars: ✭ 90 (-8.16%)
Mutual labels:  architecture
Cake Slayer
🍰🔪 Architecture of Haskell backend applications
Stars: ✭ 92 (-6.12%)
Mutual labels:  architecture
Architecture Center
Azure Architecture Center
Stars: ✭ 1,207 (+1131.63%)
Mutual labels:  architecture
Paper Code
对一些好的技术文章结合自己的实践经验进行翻译、举例说明等或自己的经验分享。主要包括架构设计、模式设计、模型设计、重构等。
Stars: ✭ 94 (-4.08%)
Mutual labels:  architecture
Ios Architectures
Sample app for iOS architectures
Stars: ✭ 90 (-8.16%)
Mutual labels:  architecture
Measureit arch
An expansion of Antonio Vazquez's MeasureIt addon to add features to create Architectural Drawings in Blender 2.8
Stars: ✭ 93 (-5.1%)
Mutual labels:  architecture
Fisco Bcos Doc
Document of FISCO BCOS
Stars: ✭ 86 (-12.24%)
Mutual labels:  architecture
App Test Arch
Android 单元测试、Monkey、LeakCanary测试demo项目【粗略示例】
Stars: ✭ 90 (-8.16%)
Mutual labels:  architecture
Aws Lambda Vpc Nat Examples
Example of setting up AWS lambda function with VPC and NAT
Stars: ✭ 92 (-6.12%)
Mutual labels:  architecture
Swift Design Patterns
🚀 The ultimate collection of various Software Design Patterns implemented in Swift [Swift 5.0, 28 Patterns].
Stars: ✭ 85 (-13.27%)
Mutual labels:  architecture
1975
1975 - Modelando Domínios Ricos
Stars: ✭ 94 (-4.08%)
Mutual labels:  architecture
Suas Android
Unidirectional data flow architecture implementation for Android
Stars: ✭ 80 (-18.37%)
Mutual labels:  architecture
Easymvp
A full-featured framework that allows building android applications following the principles of Clean Architecture.
Stars: ✭ 1,312 (+1238.78%)
Mutual labels:  architecture
Cosmic
A 𝒔𝒕𝒆𝒍𝒍𝒂𝒓 simulated 8-bit computer architecture
Stars: ✭ 97 (-1.02%)
Mutual labels:  architecture
Software Architect Cheat Sheet
Stars: ✭ 95 (-3.06%)
Mutual labels:  architecture
Architecture.wechat Tencent
互联网公司架构: 微信技术架构, 腾讯技术架构
Stars: ✭ 1,315 (+1241.84%)
Mutual labels:  architecture

Quad CI

Build Status

Quad CI is a simple, tiny and beginner friendly Continuous Integration system written in Haskell.

Features

  • sandboxed builds in docker containers
  • multi-node architecture with agents picking up jobs to work on
  • http api to interact with the frontend and other nodes
  • support for triggering builds with github webhooks

All in 1K lines of code!

Screenshot

📼 Watch the Intro video (~2 minutes).


Check out the Simple Haskell Handbook where we start from zero lines of code and build Quad CI from scratch!



Getting Started

# Needed for RecordDotSyntax
$ stack install record-dot-preprocessor

# Run server
$ stack run -- start-server

# Run agent
$ stack run -- start-agent

Try running a simple build:

$ curl -X POST -H "Content-Type: application/json" -d \
@test/github-payload.sample.json "http://localhost:9000/webhook/github"

Quad CI comes with a web UI, which can be accessed at http://localhost:3000. To install it, run the following:

cd frontend/
yarn
yarn next

Why?

This project tries to answer the question: How do I build an application with Haskell?

Intermediate level practical resources on Haskell are notoriously hard to find. My goal is to provide a real world example of an Haskell application, while keeping the scope small (Quad CI is only 1000 lines of code, including tests).

Another goal is to showcase Simple Haskell (or at least my own interpretation of it).

Finally, I think RecordDotSytax is one of the coolest things that happened in Haskell land recently and I wanted to show how to use it in practice.

Architecture

Single server - multiple agents.

Builds share workspace.

STM queue

1 build/agent concurrency limit

Codebase overview

src/Core.hs
Domain types (Build, Pipeline etc.) along with main state machine (progress)

src/Docker.hs
Talks to Docker api

src/Runner.hs
Runs a single build, collecting logs (Core.collectLogs) and processing state updates (Core.progress)

src/JobHandler.hs
Introduces Job type, which is just a Build that can be queued and scheduled

src/JobHandler/Memory.hs
An in-memory implementation of JobHandler, built on top of STM

src/Github.hs
Talks to Github api

src/Agent.hs
Agents ask the server for work to do, run builds (Runner) and send updates back to the server

src/Server.hs
The server collects jobs to be run (when receiving webhook events). It keeps an internal job queue (JobHandler) exposed as an http api (used by web ui)

src/Cli.hs
Main entrypoint. Calls either Server.run or Agent.run

src/Socket.hs
Low-level code to send http requests to a socket. Not interesting, can be ignored.


For a full overview of the codebase, check out the Simple Haskell Handbook where we start from zero lines of code and build Quad CI from scratch!

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].