My Very Own CI-server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Stefan Naumann 414cda112f added vet target to Makefile преди 5 месеца
build build-script find function; oauth creds of the Repository owning users are used преди 5 месеца
core build-script find function; oauth creds of the Repository owning users are used преди 5 месеца
hook build-script find function; oauth creds of the Repository owning users are used преди 5 месеца
static oauth token views and key-exchange with gitea, gitea: push release builds to gitea, using oauth, separate build-script for releases преди 5 месеца
views queue on dashboard, fixed build-now using a wrong build script преди 5 месеца
web build-script find function; oauth creds of the Repository owning users are used преди 5 месеца
.gitignore Installer: fixed bugs in postgreSQL database server support преди 1 година
LICENSE Initial commit преди 1 година
Makefile added vet target to Makefile преди 5 месеца
README.md changed url in the footer, Readme lists gitlab and bitbucket преди 6 месеца
main.go rewritten config to use JSON files, listing of login tokens on User-edit page, white logo variant преди 1 година

README.md

mvoCI

Build Status

My Very Own CI-server (Continuous Integration). With it you can build Git-repositories with webhooks, i.e. whenever commits are pushed or on the press of a button.

mvoCI aims to be simple and do as much as is necessary and nothing more. No Plugins, no Modules, no 500 MB of RAM eaten (your mileage may vary).

Be advised, that mvoCI has shell access. It is your responsibility to secure your machine from damage by mvoCI.

What it does

  • organize Repositories and Builds of them
  • build Repositories on webhook, on click “Build Now”
  • have a rudimentary account management
  • bindings to Gogs, Gitea, Gitbucket, Gitlab, Bitbucket and Github

What it does not

  • Anything more, like
    • timed builds
    • after build scripts
    • SVN, Mercurial, VCS (although there should not be a real reason for this constraint)
    • internationalization (currently only English)

Requirements

Build-time Dependencies

mvoCI uses the following golang libraries:

  • github.com/jinzhu/gorm
  • github.com/labstack/echo
  • golang.org/x/crypto/bcrypt
  • github.com/foolin/goview
  • github.com/foolin/goview/supports/echoview-v4

Install with:

go get github.com/jinzhu/gorm github.com/labstack/echo golang.org/x/crypto/bcrypt github.com/foolin/goview github.com/foolin/goview/supports/echoview-v4

Database

You need a database server, or use SQLite as database backend. You may use one of the following:

  • PostgreSQL
  • MySQL / MariaDB
  • MSSQL
  • SQLite3

Set up

  • ./mvo --install for the installation dialogues
  • ./mvo for production mode

Configuration

  • Configuration options are in mvo.cfg.

mvo.cfg

LogFile              -> path to the log file
LogFileEnable        -> (bool) should a log-file be produced?
LogMode              -> write logs also to the terminal on (stderr/stdout)
app_title            -> Name your Instance
compression_method   -> compression method used for archiving build artifacts (e.g. gz)
database_provider    -> what database backend do you use?
    -> based on that more database-options, the Install dialog helps you configuring these
debug                -> (bool) more verbose output
dir_build            -> path to where the build artifacts are stored
dir_repo             -> path to where the repos are cloned to on build
host                 -> hostname of the server
http_port            -> (int) port, the server listens to
impress_*            -> information about the administrator for impress (city, mail, owner, street, zip)
impress_privacy      -> privacy statement
login_token_duration -> (int) specifies how long the login-token stays valid (in seconds)
parallel_builds      -> (int) the number of build threads and therefore the number of possible builds in parallel on the instance

Lock down

As stated earlier, it is recommended, that mvoCI is not executed as root. It should be used with as little rights are possible, but enough to be useful for your usecase.

systemd

You may use this script to start mvoCI automatically as an own user (e.g. mvo). Please make sure, that that user cannot do anything you wouldn’t do yourself!

[Unit]
Description=mvoCI
After=syslog.target
After=network.target
After=mysqld.service
#After=postgresql.service

[Service]
RestartSec=2s
Type=simple
User=mvo
Group=mvo
WorkingDirectory=/home/mvo
ExecStart=/home/mvo/mvo
Restart=always
Environment=USER=mvo HOME=/home/mvo

[Install]
WantedBy=multi-user.target