UNPKG

1.29 kBMarkdownView Raw
1# @financial-times/tc-schema-publisher
2
3This package saves a treecreeper schema to s3
4
5## API
6
7`sendSchemaToS3(environment, bucketName)`
8
9This saves the rawData contained in the local `tc-schema-sdk` instance to the `bucketName` s3 bucket (defaulting to the environment variable `TREECREEPER_SCHEMA_BUCKET`), prefixing the file with an `/${environment}` prefix.
10
11### Deploy CLI command
12
13This package provides CLI command of `tc-schema-publisher` for publishing a set of schema yaml files to S3.
14
15```
16Usage: tc-schema-publisher [options]
17
18Publish schemas to S3 bucket
19
20Options:
21 -D, --schema-directory <directory> directory to the schema. (default: "process.env.TREECREEPER_SCHEMA_DIRECTORY")
22 -B, --bucket-name <bucket> S3 bucket name which you want to upload. (default: "process.env.TREECREEPER_SCHEMA_BUCKET")
23 -E, --env <env> specify publish environment (default: "latest")
24
25Example:
26
27 tc-schema-publisher -D ./example-schema -B schema-bucket -E latest
28```
29
30You can see this help typing `tc-schema-publisher -h` and some option can override by specifying environment variables:
31
32- `TREECREEPER_SCHEMA_DIRECTORY` absolute path to the directory containing the schema yaml files
33- `TREECREEPER_SCHEMA_BUCKET` name of the treecreeper schema s3 bucket