Execute continuous delivery from application change delivery
A developer delivers a change to an application by “checking-in” the change to an SCM system. This event triggers an automated build (link to build scenario).
After the build completes a deployment process is request for the given application build that just completed.
The deployment process has a series of automated tasks defined that will be executed. The first automation task is used to provision a virtual environment for the application. The environment automation task is retrieved and executed with a set of pre-defined configuration values (e.g., user credentials, environment size and other environmental specific settings). Note the properties that are passed to provision the environment may be a complex data structure versus a simple set of name-value pairs. This will be dictated by the service provider.
The environment provisioning automation task executes and begins posting activity events describing the progress of the execution. The activity postings are gathered by the continuous delivery process and presented to the user in a manner that is consumable to the development team (i.e., a deployment results page).
When the provisioning automation request completes execution the result is marked “complete” and a status indicator is provided indicating the level of success or failure
The continuous delivery process posts the completed results and status for the environment provisioning task. Based on the status of the results the continuous delivery process may decide to terminate the process or continue to the next configured task.
The next configured task is the application deployment task. The task is retrieved and an execution request is made using pre-defined parameter values as well as values that are mapped to the results from the environment provisioning task.
The application deployment task is executed and results are posted in a similar manner as for the environment provisioning task.
Other automated tasks are executed based on the configuration of the delivery process. For example there may be a series of test automation tasks that are executed against the application within the provisioned environment.
Once all automation tasks have been completed the continuous delivery process posts its results as well as its status for the development team and is marked complete.
Configure continuous delivery process for a single environment
A release coordinator opens a tool for configuring a stage within a continuous delivery process. His goal is to define a stage that will be used to deploy an application into an environment, run a suite of tests against the application and finally post results (see scenario 1).
He starts by determining the environment pattern that will be used for the application’s target environment. He selects an action to browse for available cloud service providers.
He is presented with a list of available service providers where he selects an appropriate provider and receives a list of available services that can be provisioned.
The coordinator selects an appropriate service and a task is added to the stage to provision the environment in the cloud.
The coordinator edits the new task and is presented with a set of input parameters and their default values. He may change the default values that will be used when executing the service based on his needs. These configuration values are then saved with the stage.
The coordinator decides to add a condition to the stage that will prevent the continuation of execution of additional tasks if the provisioning of the environment fails. He adds a new policy onto the stage that will reference the output result of the previous tasks and checks to see if the results completed successfully (i.e., no error status). If so then execution can proceed. If not then execution is cancelled, results are posted, and stakeholders are notified of the failure.
The coordinator continues to add additional tasks to the stage such as a task to deploy the application. Note when using a task to deploy the application it is likely that the coordinator will need to reference results from the build output task that will identify where to retrieve the deployable artifacts (i.e., the identifier for the build which is used to locate the bill of materials).
Once the application is deployed and configured the coordinator wishes to run a suite of tests. He starts by browsing for available test service providers and selects the appropriate provider. From the provider he selects one or more available test automation tasks. For each he can edit the input parameters and link values to output parameters from other automation tasks.
Once all of the desired automation plans have been selected, input parameter values set, and policies defined the stage is marked complete and is associated into the continuous delivery process (the structure of the continuous delivery process is out of scope for this discussion).