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.
- Node v8.9.0 or higher
$ 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
$ 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
Screwdriver already defaults most configuration, but you can override defaults using a local.yaml
or environment variables.
Example overriding local.yaml
:
strategy:
plugin: memory
httpd:
port: 8080
Example overriding with environment variables:
$ export STRATEGY=memory
$ export PORT=8080
All the possible environment variables are defined here.
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'
$ npm test
Code licensed under the BSD 3-Clause license. See LICENSE file for terms.