VSoft Technologies BlogsVSoft Technologies Blogs - posts about our products and software development.https://www.finalbuilder.com/resources/blogsDaily Builds with Continua CIhttps://www.finalbuilder.com/resources/blogs/postid/838/daily-builds-with-continua-ciContinua CI,Delphi,Deployment,TriggersSun, 24 May 2020 09:22:55 GMT<p>Generally, at VSoft, we like to build. So we build every commit and this allows us to look back at our build history and see which changes caused the build to fail. We use manual stage promotion to prevent every build being released until we decide that it is ready to go.</p> <p><img alt="Build promotion" src="/blogimages/daves/dailytriggers/BuildPromotion.png" /></p> <p>Many teams like to trigger a build at the end of each day, or during the night, compiling the work for the day in one single package.</p> <p>The obvious choice for this scenario is the Daily Trigger. This can be set to run a build at a specific time every day, or just weekdays - even just weekends for those with alternative lifestyles.</p> <p><img alt="Build promotion" src="/blogimages/daves/dailytriggers/DailyTrigger.png" /></p> <p>But what if the team is just having a design day, is off on a team building excursion or, perish the thought, a day of meetings! No commits are made, but the daily build still runs even though there are no changes. One possible solution is to use a Discard condition.</p> <p><img alt="Discard condition" src="/blogimages/daves/dailytriggers/DiscardCondition.png" /></p> <p>This will prevent the build running if there are no changes since the last build.</p> <p><img alt="Build being discarded" src="/blogimages/daves/dailytriggers/DiscardCondition.gif" /></p> <p>Another option has been added to Continua CI recently. The Quiet Period setting on Repository Triggers now allows you to enter an End Time rather than an Interval.</p> <p><img alt="Quiet period end time on repository trigger" src="/blogimages/daves/dailytriggers/EndTimeRepositoryTrigger.png" /></p> <p>Any builds triggered from a repository change are then queued right through the day until the specified end time. Any additional changes added to the configuration repositories during the day are added to the queued build, and when the end time comes up, the build executes on the latest changeset.</p> <p><img alt="Build waiting on quiet period end time" src="/blogimages/daves/dailytriggers/QuietPeriodTrigger.png" /></p> <p>If you're going home earlier than the end time and want stuff deployed already, you can swiftly end the quiet period at the click of a button. Using a repository trigger in this way means that you can ignore changes to some files, changesets with a specific comment, or commits from certain users.</p> <p><img alt="Trigger with user exclusion" src="/blogimages/daves/dailytriggers/TriggerUserExclusion.png" /></p> <p> - like that hands-on manager who thinks of his commit count as a key performance indicator.</p> <p><a href="https://www.commitstrip.com/en/2016/05/09/when-the-pm-fixes-a-bug/" target="_blank"><img alt="'When the PM fixes a bug' cartoon by commitstrip.com" src="/blogimages/daves/dailytriggers/Strip-Quand-les-PM-se-mettent-au-code-650-finalenglish-1.jpg" /></a> </p> 838Introducing Continua CI Version 1.9.1 Betahttps://www.finalbuilder.com/resources/blogs/postid/835/introducing-continua-ci-version-191-beta.NET,Continua CI,Delphi,DeploymentWed, 01 May 2019 07:00:08 GMT<p>This new <a href="/downloads/continuaci/continua-ci-version-history-v191" target="_blank">beta release</a> includes substantial improvements to the expressions engine including new several expressions objects and functions. We have also made some updates to the stage editor, implemented automatic report generation for some reporting actions, and added several new deployment actions providing support for Docker, Azure, SQL packages, File Transfer and SSH.</p> <p>Continue reading for details of all the new features.</p> <ul> <li><a href="#expressions-engine">Enhanced expressions engine</a></li> <li><a href="#stage-editor-changes">Stage editor changes</a></li> <li><a href="#deployment-actions">New premium deployment actions</a></li> <li><a href="#other-actions">Other new and updated actions</a></li> <li><a href="#automatic-reporting">Automatic reporting</a></li> </ul> <h2><a name="expressions-engine">Enhanced expressions engine</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>The expression engine in Continua CI evaluates expression objects and variables denoted with $ and % characters. It also provides auto-completion suggestions when typing such expressions into expression fields. This has now been overhauled to include function return types, chaining of functions, nesting functions as function parameters, selection and filtering of collections and many improvements to expression parsing. We have added several new functions, objects and collections to give access to more values and allow you to manipulate those values.</p> <p><img alt="Expression in Set Variable action list categories" src="/blogimages/daves/v1.9.1/SetVariableAction.png" /></p> <p>You can now, for example, use the following expression to get the time that the penultimate build stage finished;</p> <pre class="brush:javascript;toolbar:false;gutter:false;"> $Build.Stages.Item($Build.Stages.Count.Decrement()$).Finished.ToLongTimeString()$</pre> <p>combine the result of multiple flags by chaining functions, as in this expression;</p> <pre class="brush:plain;toolbar:false;gutter:false;"> $Build.HasErroredStages.Or($Build.HasFailedStages$).Or($Build.HasWarnings$)$</pre> <p>or use the following expression to get the comment of the first build changeset in the build containing the word 'merge' (ignoring case):</p> <pre class="brush:plain;toolbar:false;gutter:false;"> $Source.SuperFancyRepo.Changesets.First(Comment, Contains, "merge", true).Comment$</pre> <p>We have also included functions to get the value of a variable as a type, allowing you to use properties or functions on the variable value.</p> <p>You can, for example, now use the following expression to get the abbreviated day of the week from a variable entered using a DateTime prompt;</p> <pre class="brush:javascript;toolbar:false;gutter:false;"> $Utils.GetDateTime(%DateTimeTest%).DayOfWeek.Substring(0, 3)$</pre> <p>use expressions to do some more complex maths on a Numeric variable;</p> <pre class="brush:plain;toolbar:false;gutter:false;"> $Utils.GetNumber(%NumberTest%).Floor().Modulus(10).Multiply(100)$</pre> <p>or get the first selected value in a checkbox select variable with this expression:</p> <pre class="brush:plain;toolbar:false;gutter:false;"> $Utils.GetString(%CheckboxSelectTest%).SplitWithQuotes(",").First()$</pre> <p>You can see a full list of available expression objects, collection and functions on the <a href="https://wiki.finalbuilder.com/x/C4DmAQ">Expression Objects page</a> of the documentation.</p> <p>Auto-completion has also been revamped so show more information in the suggestions list. A list of parameters with types is now shown for each for each function. Descriptions are also displayed on mouse over for each object, collection and function in the suggestions list. We have also removed some annoying quirks with expression auto-completion where the cursor would end up in the wrong place or end characters would be added in the wrong place.</p> <h2><a name="stage-editor-changes">Stage editor changes</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>As Continua CI matures, the number of actions (and categories) has increased. This can make it more difficult to find the action you need. We have therefore redesigned the action list.</p> <p>The list of categories has been pulled up into a drop down menu with all actions listed below by default.</p> <p><img alt="Action list categories" src="/blogimages/daves/v1.9.1/ActionListCategories.png" /></p> <p>The filtering of actions using the search box is now fuzzier, using partial and keyword matches.</p> <p><img alt="Action list search" src="/blogimages/daves/v1.9.1/ActionListSearch.png" /></p> <p>Stage buttons now resize (up to a maximum) to fit the stage name. If you stage names are short, this means you can fit more stages into your browser width. If your stage names are long, then the text will no longer escape the stage borders. Really long stage names which do not fit the maximum stage button size will now be truncated.</p> <p><img alt="Stages" src="/blogimages/daves/v1.9.1/Stages.png" /></p> <p>All actions now include a Validate button to allow you to check that all fields have valid values before saving.</p> <h2><a name="deployment-actions">New premium deployment actions</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>We have added a set of premium actions which can be used for deploying the results of your build. The following actions can only be used if you have purchased one or more concurrent build licenses.</p> <p><b>File Transfer action:</b> This allows you to upload files to a remote server via FTP, FTPS and SFTP. <a href="https://wiki.finalbuilder.com/x/GADc" target="_blank" title="Further information on File Transfer action"><img src="/images/info.png" /></a></p> <p><b>SSH Run Script action:</b> This can be used to run a script or list of commands on an SSH server. <a href="https://wiki.finalbuilder.com/x/KIAJAQ" target="_blank" title="Further information on SSH Run Script action"><img src="/images/info.png" /></a></p> <p><b>Azure actions:</b> Several new actions are available to allow you to deploy web apps, function apps, files and blobs to Azure. <a href="https://wiki.finalbuilder.com/x/OwBJAg" target="_blank" title="Further information on Azure actions"><img src="/images/info.png" /></a></p> <p><img alt="Azure actions" src="/blogimages/daves/v1.9.1/AzureActions.png" /></p> <ul class="horizontal"> <li>Create Azure Resource Group</li> <li>Delete Azure Resource Group</li> </ul> <ul class="horizontal"> <li>Create Azure App Service Plan</li> <li>Delete Azure App Service Plan</li> </ul> <ul class="horizontal"> <li>Create Azure Web App</li> <li>Deploy Azure Web App</li> <li>Upload Azure Web App</li> <li>Control Azure Web App</li> <li>Delete Azure Web App</li> </ul> <ul class="horizontal"> <li>Create Azure Function</li> <li>Deploy Azure Function</li> <li>Delete Azure Function</li> </ul> <ul class="horizontal"> <li>Create Azure Storage Account</li> <li>Get Azure Storage Account Keys</li> <li>Delete Azure Storage Account</li> </ul> <ul class="horizontal"> <li>Create Azure Storage Container</li> <li>Delete Azure Storage Container</li> </ul> <ul class="horizontal"> <li>Upload Azure Blob</li> <li>Delete Azure Blob</li> </ul> <ul class="horizontal"> <li>Create Azure File Share</li> <li>Delete Azure File Share</li> </ul> <ul class="horizontal"> <li>Create Azure Directory</li> <li>Delete Azure Directory</li> </ul> <ul class="horizontal"> <li>Upload Azure File</li> <li>Delete Azure File</li> </ul> <p><b></b></p> <p><b>Docker actions:</b> These new actions are available to allow you to build, deploy and manage Docker containers. <a href="https://wiki.finalbuilder.com/x/AwAPAg" target="_blank" title="Further information on Docker actions"><img src="/images/info.png" /></a></p> <ul class="horizontal"> <li>Docker Build</li> <li>Docker Command</li> <li>Docker Commit</li> <li>Docker Inspect</li> <li>Docker Pull</li> <li>Docker Push</li> <li>Docker Run</li> <li>Docker Stop</li> <li>Docker Tag</li> </ul> <p><b></b></p> <p><b>SQL Package actions:</b> These new actions allow you to create, update and export SQL Server database schemas and table data. <a href="https://wiki.finalbuilder.com/x/PwBJAg" target="_blank" title="Further information on SQL Package actions"><img src="/images/info.png" /></a></p> <ul class="horizontal"> <li>SQL Package Export</li> <li>SQL Package Extract</li> <li>SQL Package Import</li> <li>SQL Package Publish</li> <li>SQL Package Script</li> </ul> <h2><a name="other-actions">Other new and updated actions</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p><b>Extent Reports:</b> Wrapper for the Extent Reports CLI for reporting on NUnit results. <a href="https://wiki.finalbuilder.com/x/3oE6Ag" target="_blank" title="Further information on Extent Reports action"><img src="/images/info.png" /></a></p> <p><b>ReportGenerator:</b> Updated to include all the latest command line options. <a href="https://wiki.finalbuilder.com/x/WQMZ" target="_blank" title="Further information on ReportGenerator action"><img src="/images/info.png" /></a></p> <p><b>Rename Directory:</b> Does what it says on the tin.. <a href="https://wiki.finalbuilder.com/x/BgAxAg" target="_blank" title="Further information on Rename Directory action"><img src="/images/info.png" /></a></p> <h2><a name="automatic-reporting">Automatic reporting</a> <a class="up-link" href="#" title="Go to top"><img src="/images/up-icn.png" /></a></h2> <p>Currently, there are a few steps to configure when setting up a report. You have to ensure that the report files are included in the Workspace Rules and that the report is defined in the Reports section of the configuration wizard. Furthermore, it's also recommended to include the report files in the artifact rules so that you can control when they are cleaned up.</p> <p>To simplify this process, we have added a new option to automatically register the report with the server to actions which generate reports (FinalBuilder, ReportGenerator and the new Extent Reports action). Ticking this option shows a new tab where you can enter the name, description and run order of the report. When a stage completes, any report files generated by actions where this option is turned on, will automatically be copied to the server workspace. The main report file will be registered as a report and all report files will be registered as artifacts.</p> <p><img alt="FinalBuilder automatic report option" src="/blogimages/daves/v1.9.1/FinalBuilderAutomaticReport.png" /></p> <p>Download the installers for Continua CI v1.9.1 Beta from the <a href="/downloads/continuaci" target="_blank">Downloads</a> page</p> <style type="text/css">ul.horizontal { overflow: auto; margin: 10px 0 0 0; } ul.horizontal li { float: left; margin-left: 2em } .syntaxhighlighter { background-color: #eee !important; margin-top: 0 !important; padding: 10px; outline-style: dashed; outline-width: 1px; outline-color: #666; width: 97% !important; } .syntaxhighlighter .line.alt2 { background-color: #eee !important; } .syntaxhighlighter table td.code { overflow-y: hidden !important; } .syntaxhighlighter .plain, .syntaxhighlighter .plain a { color: #639099 !important; } h1 { margin-bottom: 0.6em !important; } .up-link { float: right } </style> 835