Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wayofthepie/cf-janitor
https://github.com/wayofthepie/cf-janitor
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/wayofthepie/cf-janitor
- Owner: wayofthepie
- License: mit
- Created: 2015-11-22T22:34:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-24T23:08:38.000Z (about 9 years ago)
- Last Synced: 2024-11-06T03:44:30.507Z (about 2 months ago)
- Language: Go
- Size: 20.5 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status]
(https://travis-ci.org/wayofthepie/cf-janitor.svg?branch=master)
] (https://travis-ci.org/wayofthepie/cf-janitor)
[![Coverage Status]
(https://coveralls.io/repos/wayofthepie/cf-janitor/badge.svg?branch=master&service=github)
](https://coveralls.io/github/wayofthepie/cf-janitor?branch=master)# Cloud Foundry Janitor
A Cloud Foundry cli plugin for analyzing usage and cleaning.## Installation
Install the Cloud Foundry cli, see https://github.com/cloudfoundry/cli. Clone this repo and from the root run:
```bash
go get -d
```
You will likely run into this issue (see https://github.com/cloudfoundry/cli/issues/529):```bash
package github.com/cloudfoundry/cli/cf/resources: cannot find package "github.com/cloudfoundry/cli/cf/resources"
```
To fix:```bash
$ cd $GOPATH/src/github.com/cloudfoundry/cli
$ bin/generate-language-resources
$ cd - # Back to the root of this project
$ go install
```
Then you can install the plugin:
```bash
$ cf install-plugin $GOPATH/bin/cf-janitor
$ cf janitor -h
NAME:
janitor - Delete applications last uploaded before a certain date, filtering out certain applications by name using a regular expression.USAGE:
janitor --before ("now"|RFC3339 Timestamp) [--ignore regex]```
## Usage
```bash
# Find all apps uploaded before now, ignoring apps starting with spring.
$ cf janitor --before "2015-11-24T21:22:53.108Z" --ignore "^spring.*"
Ignoring spring-music# The --before flag takes an RFC3339 encoded timestamp or the string "now" for the current time
$ cf janitor --before "2015-11-24T21:22:53.108Z"
spring-music last uploaded 2015-11-24 16:53:06 +0000 UTC
```