Logo: Relish

  1. Sign in

Project: Foreplay

deploy

In order to deploy my app
From the CLI
I want to be able to use all features

Scenarios
No arguments
When
I run foreplay deploy
Then
the output should contain:
ERROR: "foreplay deploy" was called with no arguments
Usage: "foreplay deploy ENVIRONMENT"
invalid parameter
When
I run foreplay deploy test --invalid xyz
Then
the output should contain:
ERROR: "foreplay deploy" was called with arguments ["test", "--invalid", "xyz"]
Usage: "foreplay deploy ENVIRONMENT"
short invalid parameter
When
I run foreplay deploy test -x xyz
Then
the output should contain:
ERROR: "foreplay deploy" was called with arguments ["test", "-x", "xyz"]
Usage: "foreplay deploy ENVIRONMENT"
no config file
When
I run foreplay deploy test
Then
the output should contain "Deploying"
And
the output should contain "test environment"
And
the output should contain "all roles"
And
the output should contain "all servers"
And
the output should contain "Can't find configuration file"
deploy all roles
When
I run foreplay setup
And
I run foreplay deploy test
Then
the output should contain "create config/foreplay.yml"
And
the output should contain "Deploying"
And
the output should contain "test environment"
And
the output should contain "all roles"
And
the output should contain "all servers"
And
the output should contain "No deployment configuration defined for test environment"
And
the output should not contain "Can't find configuration file"
And
the following files should exist:
config/foreplay.yml
deploy one role
When
I run foreplay deploy test --role worker
Then
the output should contain "Deploying"
And
the output should contain "test environment"
And
the output should contain "worker role"
And
the output should contain "all servers"
deploy to one server
When
I run foreplay deploy test --server worker.example.com
Then
the output should contain "Deploying"
And
the output should contain "test environment"
And
the output should contain "all roles"
And
the output should contain "worker.example.com server"
deploy to one role - short role parameter
When
I run foreplay deploy test -r worker
Then
the output should contain "Deploying"
And
the output should contain "test environment"
And
the output should contain "worker role"
And
the output should contain "all servers"
deployto one server - short server parameter
When
I run foreplay deploy test -s worker.example.com
Then
the output should contain "Deploying"
And
the output should contain "test environment"
And
the output should contain "all roles"
And
the output should contain "worker.example.com server"
deploy all roles
When
I run foreplay setup
And
I run foreplay deploy test
Then
the output should contain "create config/foreplay.yml"
And
the output should contain "Deploying"
And
the output should contain "test environment"
And
the output should contain "all roles"
And
the output should contain "all servers"
And
the output should not contain "Can't find configuration file"
And
the following files should exist:
config/foreplay.yml
deploy
When
I run foreplay setup -r [email protected]:Xenapto/foreplay.git -s web.example.com --password "top-secret"
And
I run foreplay deploy production
Then
the output should contain "Deploying aruba to web.example.com for the web role in the production environment"
And
the output should contain "Connecting to web.example.com"
And
the output should contain "There was a problem starting an ssh session on web.example.com"

Last published over 4 years ago by Dominic Sayers.