cf-janitor

command module
v0.0.0-...-e892787 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2015 License: MIT Imports: 9 Imported by: 0

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)

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:

go get -d

You will likely run into this issue (see https://github.com/cloudfoundry/cli/issues/529):

package github.com/cloudfoundry/cli/cf/resources: cannot find package "github.com/cloudfoundry/cli/cf/resources" 

To fix:

$ 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:

$ 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

# 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

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL