djinn-ci.com

module
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2021 License: Apache-2.0

README

Djinn CI

Djinn CI is a continuous integration system that allows for running builds in Docker containers and Linux VMs. Builds can be run on the server, or they can be run offline using the offline runner. Each build is configured via a simple YAML manifest that describes how the build should be run, and what commands should be executed within the build.

Contributing

Before you start contributing read the Architecture document that details the architecture of Djinn CI and how everything fits together.

Building from source

If you cannot get hold of a binary distribution then you can always build Djinn from source. Read through docs/admin/building.md for more information on building from source.

Local development

You can download the djinn-dev image that is used in the build itself, and use this for local development. The image can be downloaded here. You can use the image for local development via qemu, like so,

$ qemu-system-x86_64 -daemonize \
        -enable-kvm \
        -m 8192 \
        -drive file=djinn-dev,media=disk,if=virtio \
        -net nic,model=virtio \
        -smp 2 \
        -net user,hostfwd=tcp::2222-:22,hostfwd=tcp::5432-:5432,hostfwd=tcp::6379-:6379 \
        -display none

once booted you will be able to SSH into it as root on port 2222,

$ ssh -p 2222 root@localhost

the ports for Redis (6379), and PostgreSQL (5432) will also be locally accessible too.

mgrt is used for performing revisions against for Djinn CI. Once the virtual machine is booted, you can run the following mgrt command,

$ mgrt run -c schema -type postgresql -dsn "host=localhost port=5432 dbname=djinn user=djinn password=secret"
$ mgrt run -c perms -type postgresql -dsn "host=localhost port=5432 dbname=djinn user=djinn password=secret"

Directories

Path Synopsis
Package build provides database implementations for the Build entity and its related entities.
Package build provides database implementations for the Build entity and its related entities.
cmd
Package cron implements the database.Model interface for the Cron entity.
Package cron implements the database.Model interface for the Cron entity.
Package crypto implements functions for hashing, encrypting, and decrypting data.
Package crypto implements functions for hashing, encrypting, and decrypting data.
Package database provides basic interfaces for modelling data from the database.
Package database provides basic interfaces for modelling data from the database.
Package driver has implementations of the runner.Driver interface for the different drivers available in Djinn.
Package driver has implementations of the runner.Driver interface for the different drivers available in Djinn.
docker
Package docker providers an implementation of a Driver driver for job execution.
Package docker providers an implementation of a Driver driver for job execution.
qemu
Package qemu provides an implementation of a Driver driver for job execution.
Package qemu provides an implementation of a Driver driver for job execution.
ssh
Package ssh provides an implemention of an Driver driver for executing jobs on.
Package ssh provides an implemention of an Driver driver for executing jobs on.
Package env loads in the environment variables that Djinn expects and makes use of into package globals.
Package env loads in the environment variables that Djinn expects and makes use of into package globals.
Package errors implements some utility functions for giving detailed errors.
Package errors implements some utility functions for giving detailed errors.
Package image provides the database.Model implementation for the Image entity.
Package image provides the database.Model implementation for the Image entity.
integration
key
Package key providers the database.Model implementation for the Key entity.
Package key providers the database.Model implementation for the Key entity.
Package log providers a simple logging implementation.
Package log providers a simple logging implementation.
Package mail provides a simple SMTP client for sending plain-text emails.
Package mail provides a simple SMTP client for sending plain-text emails.
Package namespace provides database implementations for the Namespace entity and its related entities.
Package namespace provides database implementations for the Namespace entity and its related entities.
Package oauth2 provides model implementations for and functionality for the OAuth2 server.
Package oauth2 provides model implementations for and functionality for the OAuth2 server.
Package object implements the database.Model interface for the Object entity.
Package object implements the database.Model interface for the Object entity.
Package provider provides the database.Model implementation for the Provider entity that represents an external provider a user has connected to (GitHub, GitLab, etc.).
Package provider provides the database.Model implementation for the Provider entity that represents an external provider a user has connected to (GitHub, GitLab, etc.).
github
Package github provides an implementation of the provider.Client interface for the GitHub REST API.
Package github provides an implementation of the provider.Client interface for the GitHub REST API.
gitlab
Package gitlab provides an implementation of the provider.Client interface for the GitLab REST API.
Package gitlab provides an implementation of the provider.Client interface for the GitLab REST API.
Package queue provides the Queue interface for the queueing and processing of background jobs.
Package queue provides the Queue interface for the queueing and processing of background jobs.
Package runner providers various structs and interfaces for Running arbitrary Jobs in a Driver.
Package runner providers various structs and interfaces for Running arbitrary Jobs in a Driver.
Package server provides an HTTP server implementation that wraps the http.Server from the stdlib, and a Router interface for implementing routing.
Package server provides an HTTP server implementation that wraps the http.Server from the stdlib, and a Router interface for implementing routing.
Package user provides the database implementation for the User entity.
Package user provides the database implementation for the User entity.
Package object implements the database.Model interface for the Variable entity.
Package object implements the database.Model interface for the Variable entity.
Package version contains version information about the built Go binaries.
Package version contains version information about the built Go binaries.
Package web provides utility for working with HTTP requests, responses, and middleware.
Package web provides utility for working with HTTP requests, responses, and middleware.
Package worker contains the Worker implementation that is used for handling builds that are submitted to the server.
Package worker contains the Worker implementation that is used for handling builds that are submitted to the server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL