BAPS - Build and Packaging System
Define your build using provided DSL and baps
will take care of building
the given software in a clean room environment, package it as deb
and push to packagecloud.
Usage
exe/baps -p ./definitions
This will go through every definition file in the given ./definitions
folder and if there's at least
one definition that needs to be executed baps
will pull prebuilt Docker image, copy the content of ./definitions
folder to it and fire a container based on the image for each definition needed to be executed. Inside the container
baps
will execute the given definition using exe/baps -p ./definitions/path_to_definition_file.rb
If you don't want a clean room environment i.e not execute your definition in Docker you can directly use exe/baps --no-docker -p ./definitions/path_to_definition_file.rb
.
Example
An example definition to build pmtud
from a remote git repository:
deb do
name 'pmtud'
version '0.7'
dependencies %w(libpcap0.8 libnetfilter-log1)
description 'Path MTU daemon - broadcast lost ICMP packets on ECMP networks'
build do
source git: 'https://github.com/Shopify/pmtud.git', branch: "v#{@version}"
dependencies %w(libnetfilter-log-dev libnfnetlink-dev libpcap-dev)
run 'make pmtud BUILD=release CC=gcc'
run "install -d 0700 #{deb_dir}/usr/local/bin"
run "install pmtud #{deb_dir}/usr/local/bin"
end
end
More examples can be found at https://github.com/Shopify/shopify-open-source-builds