Purge all after configuring Fastly

This commit is contained in:
Ray Schamp 2016-04-29 15:40:44 -04:00
parent dd1c2c1627
commit fce7c0cd9b
2 changed files with 12 additions and 7 deletions

View file

@ -70,13 +70,14 @@ pip install -r requirements.txt
make deploy make deploy
``` ```
| Variable | Default | Description | | Variable | Default | Description |
| ----------------------- | ------- | ----------------------------------------------- | | ------------------------ | ------- | ------------------------------------------------ |
| `FASTLY_SERVICE_ID` | `''` | Fastly service ID for `bin/configure-fastly.js` | | `FASTLY_SERVICE_ID` | `''` | Fastly service ID for `bin/configure-fastly.js` |
| `FASTLY_API_KEY` | `''` | Fastly API key for `bin/configure-fastly.js` | | `FASTLY_API_KEY` | `''` | Fastly API key for `bin/configure-fastly.js` |
| `AWS_ACCESS_KEY_ID` | `''` | AWS access key id for S3 | | `FASTLY_ACTIVATE_CHANGES`| `false` | Activate changes and purge all after configuring |
| `AWS_SECRET_ACCESS_KEY` | `''` | AWS secret access key for S3 | | `AWS_ACCESS_KEY_ID` | `''` | AWS access key id for S3 |
| `S3_BUCKET_NAME` | `''` | S3 bucket name to deploy into | | `AWS_SECRET_ACCESS_KEY` | `''` | AWS secret access key for S3 |
| `S3_BUCKET_NAME` | `''` | S3 bucket name to deploy into |
### Current issues with the development ### Current issues with the development

View file

@ -255,6 +255,10 @@ async.auto({
fastly.activateVersion(results.version, function (err, response) { fastly.activateVersion(results.version, function (err, response) {
if (err) throw new Error(err); if (err) throw new Error(err);
process.stdout.write('Successfully configured and activated version ' + response.number + '\n'); process.stdout.write('Successfully configured and activated version ' + response.number + '\n');
fastly.purgeAll(FASTLY_SERVICE_ID, function (err) {
if (err) throw new Error(err);
process.stdout.write('Purged all.\n');
});
}); });
} }
} }