https://github.com/samthor/purge-gcloud-app
Purge old gcloud deployed App Engine versions
https://github.com/samthor/purge-gcloud-app
Last synced: about 2 months ago
JSON representation
Purge old gcloud deployed App Engine versions
- Host: GitHub
- URL: https://github.com/samthor/purge-gcloud-app
- Owner: samthor
- License: apache-2.0
- Created: 2020-11-13T03:30:30.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-13T04:45:17.000Z (over 5 years ago)
- Last Synced: 2025-02-18T18:02:06.230Z (over 1 year ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Helper to delete old versions of an App Engine project.
Install via [`purge-gcloud-app`](https://www.npmjs.com/package/purge-gcloud-app).
This just farms out to `gcloud` and will use whatever credentials are available in your environment.
Even though this task is fundamentally async, we block in Node until complete.
## Usage
```js
import purgeGcloudApp from 'purge-gcloud-app';
const deletedVersionCount = purgeGcloudApp({
project: 'project-id', // required
// All other parameters are optional, here are their defaults:
service: 'default',
keepMinimum: 20, // keep the most recent versions
keepDailyAmountDefault: 7, // keep one version for each of the past days
log: (s) => console.info(s),
});
```
There's also a binary `purge-gcloud-app` which just takes a single argument the project ID, and otherwise uses all defaults.