Skip to main content

Simple monorepo build tool

Project description

drkns is a simple build tool aimed at easing the continuous integration of monorepos through the use of caching.

Build Status

Build is driven through YAML files, that can have dependencies over other YAML files.

  • Steps are built after the dependencies.
  • A failure at a step prevents the execution of the next one.
  • The result of each execution step is cached, if a directory is left unchanged no execution will be triggered again.
  • State can be persisted in Amazon S3 to have a shared memory between volatile build instances

Sample master drkns.yml

drkns.yml

dependencies:
  sub1: subProject1/drkns.yml

Sample dependency drkns.yml

subProject1/drkns.yml

checkSteps:
  buildImages: |
       docker build -q -t ...

  startContainers: "docker run --network host --name test -d backServer-test"

YAML reference

  • directory: Current directory by default, only used to compute the hash associated with this build file
  • dependencies: named external drkns yml to load, their steps becomes callables through drkns dependencyName.stepName
  • checkSteps: ordered and named commands. Commands are either a string, or have two keys: command (string) and background (bool default false)
  • buildSteps: same as checkSteps, but those are executed only if checkSteps and dependencies' checkSteps got processed without errors.
  • cleanUpSteps: same as checkSteps, but those are executed no matter the execution of the previous ones.

CLI interface

The command line interface offers the following commands:

# Checks that the configuration makes sense (no output is a good sign
drkns check

# List all steps
drkns list

# Restore previous execution information from S3
# Assuming an environment variable DRKNS_S3_PATH exists under the form 
# "s3://buck3t/d1r" 
drkns sync in

# also available for something like
# drkns sync in s3://buck3t/d1r

# Runs all steps
drkns run 

# Runs identified task
drkns run sub1.buildImages

# Runs all steps but returns 0 no matter what happens 
drkns run --force-success

# Return the last `drkns run` to get the execution status 
drkns run

# Clean persisted data older than a week old when there is more than a few
# (to not overload the cache after too many builds)
drkns clean

# Persist previous execution information from S3, see assumptions for sync in
# Beware this erase extra files 
drkns sync out

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drkns-1.0.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

drkns-1.0.1-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file drkns-1.0.1.tar.gz.

File metadata

  • Download URL: drkns-1.0.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.2

File hashes

Hashes for drkns-1.0.1.tar.gz
Algorithm Hash digest
SHA256 74cddec077ac89815cbc8a6e5cd897daed54c77e7028f4c849e13c7533d381ec
MD5 6a75c814bf55a67be650355af35a203e
BLAKE2b-256 4438b2901a1cdda86f16fc0847af9cf3388b59326c426d647eee5080441e4b11

See more details on using hashes here.

File details

Details for the file drkns-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: drkns-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.2

File hashes

Hashes for drkns-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a106bee6c6304d865d6c20dcd7a0b8cf716aa9aa1b2b48bb5d2c8d22cc4ce1c7
MD5 476b9d6bff6e8846b64951d16a653969
BLAKE2b-256 6fde89ed30ec8d02a8872fb7ea1daf11dde3e9603c85761107d8229547874d65

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page