To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorrbld create
As a CLI user
I want to be able to create new environments with rbld create
- Background
-
- Given
-
non-existing environments:
test-env test-env:v001
- Scenarios
-
- create help succeeds and usage is printed
- create environment without base
- create environment with multiple bases
- create environment with tag
- create environment with incorrect name
- create environment with correct name
- create environment from nonexisting base
- create environment from nonexisting file
- create environment from existing base
- create environment from local docker image
- create environment from existing file
- create environment from existing file outside of current directory
- create environment that already exists
- create help succeeds and usage is printed
-
- Given
- I successfully request help for rbld create
- Then
- help output should contain "Usage: rbld create [OPTIONS] [ENVIRONMENT]"
- And
- help output should contain "Create a new environment"
- And
- help output should match ".*-b.*--base.*Base image from Docker Hub"
- And
- help output should match ".*-f.*--basefile.*Base file"
- And
- help output should match ".*--help.*Print usage"
- create environment without base
-
- When
-
I run
rbld create test-env
- Then
-
it should fail with:
ERROR: Environment base not specified
- create environment with multiple bases
-
- When
-
I run
rbld create --base base --basefile basefile test-env
- Then
-
it should fail with:
ERROR: Exactly one environment base must be specified
- create environment with tag
-
- When
-
I run
rbld create --base alpine:3.4 test-env:v001
- Then
-
it should fail with:
ERROR: Environment tag must not be specified
- create environment with incorrect name
-
- Given
- non-existing environment incorrect name
- When
-
I run
rbld create --base alpine:3.4 incorrect name
- Then
-
it should fail with:
ERROR: Invalid environment name (incorrect name), it may contain lowercase and uppercase letters, digits, underscores, periods and dashes and may not start or end with a dash, period or underscore.
Examples: incorrect name .envname _envname envname_ envname- envname. env#name - create environment with correct name
-
- Given
- non-existing environment correct name
- When
-
I run
rbld create --base alpine:3.4 correct name
- Then
- environment correct name should be successfully created
Examples: correct name envname env-name env.name env_name envname8 b - create environment from nonexisting base
-
- When
-
I run
rbld create --base nonexisting:nonexisting test-env
- Then
-
it should fail with:
Failed to create test-env:initial
- And
- environment test-env should not exist
- create environment from nonexisting file
-
- When
-
I run
rbld create --basefile nonexisting.file test-env
- Then
-
it should fail with:
ERROR: Base file nonexisting.file does not exist
- And
- environment test-env should not exist
- create environment from existing base
-
- When
-
I run
rbld create base option alpine:3.4 test-env
- Then
- environment test-env should be successfully created
Examples: base option --base -b - create environment from local docker image
-
- Given
- local docker image test_image:latest
- When
-
I run
rbld create --base test_image:latest test-env
- Then
- environment test-env should be successfully created
- create environment from existing file
-
- Given
- existing base file test_base_file.tar
- When
-
I run
rbld create basefile option test_base_file.tar test-env
- Then
- environment test-env should be successfully created
Examples: basefile option --basefile -f - create environment from existing file outside of current directory
-
- Given
- existing base file test_subdir/test_base_file.tar
- When
-
I run
rbld create --basefile test_subdir/test_base_file.tar test-env
- Then
- environment test-env should be successfully created
- create environment that already exists
-
- Given
- existing environment test-env
- When
-
I run
rbld create --base alpine:3.4 test-env
- Then
-
it should fail with:
ERROR: Environment test-env:initial already exists
Last published almost 5 years ago by Rebuild.