4.0.0 • Published 4 years ago
@financial-times/fastly-tools v4.0.0
fastly-tools 
This library is a command line tool for interacting with the FT.com CDN, Fastly.
Requirements
- Node version defined by
engines.nodeinpackage.json. Run commandnvm useto switch your local Node version to the one specified in.nvmrc.
Installation
git clone git@github.com:Financial-Times/fastly-tools.git
cd fastly-tools
make installDevelopment
Testing
In order to run the tests locally you'll need to run:
make testInstall from NPM
npm install --save-dev @financial-times/fastly-toolsUsage
Usage: fastly [options] [command]
Options:
-h, --help output usage information
Commands:
deploy [options] [folder] Deploys VCL in [folder] to the specified fastly service. Requires FASTLY_APIKEY env var which can be found in the repo's corresponding Vault directory.Deploy
Usage: deploy [options] [folder]
Deploys VCL in [folder] to the specified fastly service. Requires FASTLY_APIKEY env var which can be found in the repo\'s corresponding Vault directory.
Options:
-m, --main <main> Set the name of the main vcl file (the entry point). Defaults to "main.vcl"
-v, --vars <vars> A way of injecting environment vars into the VCL. So if you pass --vars AUTH_KEY,FOO the values {$AUTH_KEY} and ${FOO} in the vcl will be replaced with the values of the environment variable. If you include SERVICEID it will be populated with the current --service option
-e, --env Load environment variables from local .env file (use when deploying from a local machine
-s, --service <service> REQUIRED. The ID of the fastly service to deploy to.
-V --verbose Verbose log output
-b --backends <backends> Upload the backends specified in <backends> via the api
-k --api-keys <keys> list of alternate api keys to try should the key stored in process.env.FASTLY_API_KEY hit its rate limit
--skip-conditions <conditions> list of conditions to skip deleting
-h, --help output usage informationExample
For example to deploy to a given environment, you would use the following command:
fastly-tools deploy -V --vars SERVICEID --main main.vcl --service ${FASTLY_STAGING_SERVICE_ID} --api-keys ${FASTLY_STAGING_APIKEY} --backends backends.js ./vcl/4.0.0
4 years ago
3.0.1
4 years ago
1.7.1
8 years ago
1.7.0
8 years ago
1.6.3
8 years ago
1.6.2
9 years ago
1.6.1
9 years ago
1.6.0
9 years ago
1.5.5
9 years ago
1.5.4
9 years ago
1.5.3
9 years ago
1.5.2
9 years ago
1.5.1
9 years ago
1.5.0
9 years ago
1.4.2
9 years ago
0.0.1
9 years ago
1.4.1
9 years ago
1.4.0
9 years ago
1.3.1
9 years ago
1.3.0
10 years ago
1.2.4
10 years ago
1.2.3
10 years ago
1.2.2
10 years ago
1.2.1
10 years ago
1.2.0
10 years ago
1.1.0
10 years ago
1.0.1
10 years ago
1.0.0
10 years ago
1.0.0-rc1
10 years ago