| 17 | ) |
| 18 | |
| 19 | type CopySourceCommand struct { |
| 20 | BaseCommand |
| 21 | |
| 22 | RequiredArgs flag.CopySourceArgs `positional-args:"yes"` |
| 23 | usage interface{} `usage:"CF_NAME copy-source SOURCE_APP DESTINATION_APP [-s TARGET_SPACE [-o TARGET_ORG]] [--no-restart] [--strategy STRATEGY] [--no-wait]"` |
| 24 | InstanceSteps string `long:"instance-steps" description:"An array of percentage steps to deploy when using deployment strategy canary. (e.g. 20,40,60)"` |
| 25 | MaxInFlight *int `long:"max-in-flight" description:"Defines the maximum number of instances that will be actively being started. Only applies when --strategy flag is specified."` |
| 26 | NoWait bool `long:"no-wait" description:"Exit when the first instance of the web process is healthy"` |
| 27 | NoRestart bool `long:"no-restart" description:"Do not restage the destination application"` |
| 28 | Organization string `short:"o" long:"organization" description:"Org that contains the destination application"` |
| 29 | Space string `short:"s" long:"space" description:"Space that contains the destination application"` |
| 30 | Strategy flag.DeploymentStrategy `long:"strategy" description:"Deployment strategy can be canary, rolling or null"` |
| 31 | relatedCommands interface{} `related_commands:"apps, push, restage, restart, target"` |
| 32 | envCFStagingTimeout interface{} `environmentName:"CF_STAGING_TIMEOUT" environmentDescription:"Max wait time for staging, in minutes" environmentDefault:"15"` |
| 33 | envCFStartupTimeout interface{} `environmentName:"CF_STARTUP_TIMEOUT" environmentDescription:"Max wait time for app instance startup, in minutes" environmentDefault:"5"` |
| 34 | |
| 35 | Stager shared.AppStager |
| 36 | } |
| 37 | |
| 38 | func (cmd *CopySourceCommand) ValidateFlags() error { |
| 39 | if cmd.Organization != "" && cmd.Space == "" { |
nothing calls this directly
no outgoing calls
no test coverage detected