screwdriver-store

Pluggable Artifact Store (for logs, shared steps, templates, etc).


Keywords
screwdriver, yahoo
License
BSD-3-Clause
Install
npm install screwdriver-store@3.10.4

Documentation

Artifact Store

Version Pulls Stars Build Status Open Issues Vulnerabilities License

Pluggable Artifact Store (for logs, shared steps, templates, etc).

This system provides a simple interface for builds to use the existing JWT to write artifacts (logs, test results, etc). By default, it uses a simple in-memory storage (which is destroyed on restart). It can easily be configured to use alternative storage locations like S3.

Usage

Prerequisites

  • Node v8.9.0 or higher

From Source

$ git clone git@github.com:screwdriver-cd/store.git ./
$ npm install
$ vim ./config/local.yaml # See below for configuration
$ npm start
info: Server running at http://localhost

Pre-built Docker image

$ vim ./local.yaml # See below for configuration
$ docker run --rm -it --volume=`pwd`/local.yaml:/config/local.yaml -p 8080 screwdrivercd/store:latest
info: Server running at http://localhost

Configuration

Screwdriver already defaults most configuration, but you can override defaults using a local.yaml or environment variables.

Yaml

Example overriding local.yaml:

strategy:
    plugin: memory

httpd:
    port: 8080

Environment

Example overriding with environment variables:

$ export STRATEGY=memory
$ export PORT=8080

All the possible environment variables are defined here.

Storage Strategies

Right now we're using catbox for storage, so we can support any of their plugins (Redis, S3, Memcached, etc.). We only installed the memory and S3 ones for now.

Or if you want to use disk strategy as to persist cache, you can config as following, please be sure to create ./store-data as a local directory though

strategy:
    plugin: disk
    disk:
        cachePath: './store-data'
        cleanEvery: 3600000
        partition : 'cache'

Testing

$ npm test

License

Code licensed under the BSD 3-Clause license. See LICENSE file for terms.