Rodrigo Gonzalez CEO April 20, 2018 - 1 min read Scheduling your pipeline stages Some considerations for defining your continuous deployment pipelines scheduled for a deferred run. Running pipeline jobs to critical environments often requires a scheduled execution to take place. Clarive scheduled jobs run always in 3 main steps, called “Pre”, “Run” and “Post”. Why run a pipeline in phases? Most of the time the entire deployment job should not run all of its tasks at the scheduled time but as soon as the job is scheduled. There are several phases or stages to every scheduled deployment, most of which can run as early as it’s scheduled. Tasks such as building, packaging, testing and even provisioning infrastructure can take place earlier if they do not impact on the productive environments. When defining a pipeline, always think of what can be detected in earlier phases so that the evening deployment run will not fail on something that could have been checked previously. Separating your pipeline into different stages Pipeline phases Here are the different pipeline deployment phases you can run in Clarive. Deployment preparation (PRE) The deployment pipeline will take care of: Creating the temporary deployment directory Identifying the files changed to be deployed (BOM) Checking out the files related to the changesets to be deployed from either code repositories (code) or directly attached to the changesets (SQL). Renaming environment specific files (i.e web{PROD}.properties will be used just for deployments to the PROD environment) Replacing variables inside the files (i.e. it will replace ${variable} with the real value of the variable configured for the project affected for the target environment) Nature detection Clarive will identify the technologies to deploy analyzing the BOM Common deployment operations Deployment operations (RUN) Actual deployment operations will be executed in this phase of the Clarive job (movement of binaries, restart of servers, check the proper installation, etc.) Deployment operations Post-deployment operations (POST) After the deployment is finished Clarive will take care of any task needed depending on the final status. Some of the typical operations performed then are: Notify users Transition changesets states Update repositories (i.e. tag Git repositories with an environment tag) Synchronize external systems Cleanup temporary directories locally and remotely Synchronize related topics statuses (defects, releases, etc.) Post deployment operations Recap Regardless of if you use Clarive or not, when defining your deployment pipelines always think on these three stages or phases. PRE – everything that can run as soon as it has been scheduled RUN – crucial changes that run at the scheduled time POST – post activities or error recovery procedures Happy DevOps! Try Clarive now and start with your DevOps journey to continuous delivery. Share this:Click to print (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to share on Twitter (Opens in new window)Click to share on Google+ (Opens in new window)Click to share on Facebook (Opens in new window)