grim/convey

closing merged branch
draft redux
2021-12-20, Gary Kramlich
f99cb2775fc3
closing merged branch
# Convey
Convey is a pipeline for running containers and protecting the host as much as
possible. It accomplishes this goal by creating a volume and making it
available to each item in the pipeline.
Convey was created out of the need to build [Pidgin](https://pidgin.im) and its
supporting libraries on multiple Linux distributions, Windows and MacOS. While
there are many continuous integration tools out there, all of them still
require maintenance and can only be used by the project itself.
This becomes a problem when you have a community of plugin developers who would
also like to build against all of its supported operating systems but can't and
shouldn't need to put forth the effort and maintenance involved with using
other available tools.
This is where Convey's concept of [build containers](#markdown-header-concepts)
comes into use. Once you have all the dependencies required to build something,
like a Pidgin plugin, you are then able to share that container image with
everyone using this system and they are then able to use that image to build
against. So a project like Pidgin can supply build images containing the most
recent releases with all of the build dependencies for multiple platforms and
then plugin developers can use that image to test their plugins against.
If you still have doubts about how Convey can simplify your workflow and
increase productivity, please contact me via
[email](mailto:grim@reaperworld.com) or by opening an issue and let me know!
----
# License
GPLv3+
----
# Concepts
Convey is built around a concept that I call a build container. A build
container is a container that has all of the dependencies to turn an input into
something else. This could be source code or even just data processing. For
example the `convey/go-build` image is a simple wrapper around the `golang`
image that just builds a project instead of installing it. You can find more
information on build containers
[here](http://blog.terranillius.com/post/docker_builder_pattern/).
Convey is built around this concept to allow you to build/process anything on
any platform while at the same time protecting the host from a malicious
config. This protection is provided by not exposing dangerous options like
volume mounts or port forwards while running containers. This is accomplished
by creating a volume a data volume at the start of the build plan and volume
mounting it into containers as they are run. This allows you to pass state
between modular tasks that can be reused between multiple plans.
Once built, convey can build itself entirely. This is done by using an import
task to copy the source code into the workspace. Once that stage is complete,
it runs another stage that builds for linux-x86_64, windows-x86_64, and
darwin-x86_64 in parallel. The final stage will take those compiled binaries
and export them back to the hosts file system.
Of course you don't have to export back to the host file system. Since these
are just containers, you could instead upload them to your staging environment,
packagecloud.io, bintray.com, whatever. Or you could export to the host and
create another plan that will import the artifacts and then publish them.
----
# Installation
There are a few ways you can install convey. The easiest is to grab it from
[Source Forge](https://sourceforge.net/projects/pidgin/files/convey/) section.
If you want to use the version currently in development and have a golang
environment setup, you can run `go install keep.imfreedom.org/grim/convey` and
it'll install into your `$GOPATH`.
----
# Usage
## Basic
Usage: convey <command>
Convey is a container pipeline runner.
Flags:
-h, --help Show context-sensitive help.
--color Enable colorized output.
-v, --verbose Be more verbose
Commands:
run Run plans
version Show the version and exit
Run "convey <command> --help" for more information on a command.
## Run Command
Usage: convey run [<plans> ...]
Run plans
Arguments:
[<plans> ...] The names of the plans to run
Flags:
-h, --help Show context-sensitive help.
--color Enable colorized output.
-v, --verbose Be more verbose
-f, --config-file=FILE The config file to load
-S, --force-sequential Force concurrent stages to be ran sequentially
--keep-workspace Keep the workspace directory after running
--timeout=DURATION The maximum amount of time a plan can run. 0 to disable. Units must be
specified.
-e, --env=ENV,... Set an environment variable
## Version Command
Usage: convey version
Show the version and exit
Flags:
-h, --help Show context-sensitive help.
--color Enable colorized output.
-v, --verbose Be more verbose
# Configuration
Documentation for this format can be found in [REFERENCE.md](REFERENCE.md).