github.com/elopio/cli@v6.21.2-0.20160902224010-ea909d1fdb2f+incompatible/commands/v2/push_command.go (about)

     1  package v2
     2  
     3  import (
     4  	"os"
     5  
     6  	"code.cloudfoundry.org/cli/cf/cmd"
     7  	"code.cloudfoundry.org/cli/commands"
     8  )
     9  
    10  type PushCommand struct {
    11  	AppPorts             string      `long:"app-ports" description:"Comma delimited list of ports the application may listen on" hidden:"true"` //TODO: Custom AppPorts flag
    12  	BuildpackName        string      `short:"b" description:"Custom buildpack by name (e.g. my-buildpack) or Git URL (e.g. 'https://github.com/cloudfoundry/java-buildpack.git') or Git URL with a branch or tag (e.g. 'https://github.com/cloudfoundry/java-buildpack.git#v3.3.0' for 'v3.3.0' tag). To use built-in buildpacks only, specify 'default' or 'null'"`
    13  	StartupCommand       string      `short:"c" description:"Startup command, set to null to reset to default start command"`
    14  	Domain               string      `short:"d" description:"Domain (e.g. example.com)"`
    15  	DockerImage          string      `long:"docker-image" short:"o" description:"Docker-image to be used (e.g. user/docker-image-name)"`
    16  	PathToManifest       string      `short:"f" description:"Path to manifest"` //TODO: Custom Path flag that does validation
    17  	HealthCheckType      string      `long:"health-check-type" short:"u" description:"Application health check type (e.g. 'port' or 'none')"`
    18  	Hostname             string      `long:"hostname" short:"n" description:"Hostname (e.g. my-subdomain)"`
    19  	NumInstances         string      `short:"i" description:"Number of instances"`
    20  	DiskLimit            string      `short:"k" description:"Disk limit (e.g. 256M, 1024M, 1G)"`
    21  	MemoryLimit          string      `short:"m" description:"Memory limit (e.g. 256M, 1024M, 1G)"`
    22  	NoHostname           bool        `long:"no-hostname" description:"Map the root domain to this app"`
    23  	NoManifest           bool        `long:"no-manifest" description:"Ignore manifest file"`
    24  	NoRoute              bool        `long:"no-route" description:"Do not map a route to this app and remove routes from previous pushes of this app"`
    25  	NoStart              bool        `long:"no-start" description:"Do not start an app after pushing"`
    26  	DirectoryPath        string      `short:"p" description:"Path to app directory or to a zip file of the contents of the app directory"` //TODO: Custom Directory flag that does validation
    27  	RandomRoute          bool        `long:"random-route" description:"Create a random route for this app"`
    28  	RoutePath            string      `long:"route-path" description:"Path for the route"`
    29  	Stack                string      `short:"s" description:"Stack to use (a stack is a pre-built file system, including an operating system, that can run apps)"`
    30  	ApplicationStartTime int         `short:"t" description:"Maximum time (in seconds) for CLI to wait for application start, other server side timeouts may apply"`
    31  	usage                interface{} `usage:"Push a single app (with or without a manifest):\n   CF_NAME push APP_NAME [-b BUILDPACK_NAME] [-c COMMAND] [-d DOMAIN] [-f MANIFEST_PATH] [--docker-image DOCKER_IMAGE]\n   [-i NUM_INSTANCES] [-k DISK] [-m MEMORY] [--hostname HOST] [-p PATH] [-s STACK] [-t TIMEOUT] [-u HEALTH_CHECK_TYPE] [--route-path ROUTE_PATH]\n   [--no-hostname] [--no-manifest] [--no-route] [--no-start] [--random-route]\n\n   Push multiple apps with a manifest:\n   cf push [-f MANIFEST_PATH]"`
    32  	relatedCommands      interface{} `related_commands:"apps, create-app-manifest, logs, ssh, start"`
    33  }
    34  
    35  func (_ PushCommand) Setup(config commands.Config, ui commands.UI) error {
    36  	return nil
    37  }
    38  
    39  func (_ PushCommand) Execute(args []string) error {
    40  	cmd.Main(os.Getenv("CF_TRACE"), os.Args)
    41  	return nil
    42  }