Builds

Build process

The build process is managed by the trigger of a pipeline with all the needed jobs in the Continuous integration process for a specific repository. For this example, we will see the build pipeline for the Mobilize.SilverlightConverter.CmdRunner, which includes just one job, but we will see what it does

Figure1. Step in the build pipeline of Mobilize.SilverlightConvert.CmdRunner.

We will separate the build phase in parts: Pre-jobs, which are tasks needed to prepare the environment, ConversionTool Build which will restore packages and start the build, test execution and SonarQube analysis. And finally, Post-jobs, which will clean the environment for the next process.

Pre-Jobs

These tasks are usually setup by DevOps to prepare the environment for the next tasks related with the build and test phases.

Figure 2. Pre-Jobs phases of Mobilize.SilverlightConvert.CmdRunner.

Build and test phase

Tasks that are steps used to build the solution locally. These steps can be automatized and be part as the tasks in this pipeline.

Figure 3. Steps to build Mobilize.SilverlightConvert.CmdRunner.

After the build steps, it will execute the tasks related with testing. In this case, run the unit and integration tests. Then, it will publish the test results.

Figure 4. Steps to test Mobilize.SilverlightConvert.CmdRunner.

When the test results are ready, it will be imported to SonarQube, and it will run the analysis which will evaluate some metrics, such as the coverage, technical debt, maintainability, reliability.

Figure 5. SonarQube steps for Mobilize.SilverlightConvert.CmdRunner.
Figure 6. SonarQube analysis metrics.

Post-Jobs

The post-job tasks will do the respective cleanup of the machines used to execute the previous steps.

Figure 7. Post-Jobs phases of Mobilize.SilverlightConvert.CmdRunner.

How to run a new build

To run a new build, we actually run a pipeline. This execution can be made manually, but in most cases it will run automatically with every new version of artifacts generated after the development cycle.

For example, in this case the Silverlight Conversion Tool, a new build will be executed whenever is a stable version of the Silverlight Components, that will automatically trigger the process.

Figure 8. Silverlight functional tests being triggered by a new version of the CmdRunner.

Now, to execute it manually, in Azure DevOps, open the pipeline of the build that we want to run, for this example, using Mobilize.SilverlightConverter.CmdRunner. Then click on the Run pipeline button

Figure 9. Build pipeline for Mobilize.SilverlightConverter.CmdRunner.

There are two options to run the pipeline. The Agent pool, which normally it is configured by default in the pipeline. And the branch or tag, where we can set on which branch or version, the pipeline will execute the tasks for this build process.

Figure 10. Run Pipeline options.

Last updated

Was this helpful?