Build Automation

Build Automation

SERVUS! 1 . 1 HELLO! 1 . 2 ПРИВЕТ! 1 . 3 ABOUT ME 2 . 1 I'M LAZY 2 . 2 AUTOMATION Source: https://xkcd.com/1319/ But being lazy makes me care a lot about automation Taking repetitive tasks, and putting them into some kind of algorithm, so that I can relax again 2 . 3 AUTOMATION Source: https://xkcd.com/1319/ Sometimes automation can also go completely wrong.... Anyway 2 . 4 BUILD AUTOMATION Source: https://gradle.org Process of automating the creation of a software build Build steps like Cleaning, Compiling, Packaging Reproducible => eliminate chance of human error 3 . 1 Source: https://github.com/dotnet/roslyn Builds can get quite complicated 3 . 2 BUILD TOOLS You could put that into batch or shell scripts, but there is something called 3 . 3 BUILD SERVERS Lock-in for complex scripts Hard to execute local Feedback cycle (occupying / money) Versioning? 3 . 4 BUILD SYSTEM Tool orchestration Build everywhere Better feedback cycle Minimal coupling Versioning & Branching 3 . 5 GOTTA USE 'EM ALL! Still build servers provide: historical statistics, investigation mechanisms, parallelization 3 . 6 BUILD SYSTEMS 3 . 7 BUILD SYSTEMS Is MSBuild a handy build system? Yes, but mostly for project related information (precompile, code-generation). Not so much for tool invocations, loops, conditional code 3 . 8 PATH CONCATENATION <CombinePath BasePath="$(OutDir)" Paths="$(ManifestFileName)" Condition="$(CreateModule) == 'true'"> <Output TaskParameter="CombinedPaths" ItemName="ManifestPath"/> </CombinePath> 3 . 9 BUILD SYSTEMS If you're using one of these, there are 3 different situations I can think of: 1. You're already using the language inside your project - everything alright. 2. You point out that one person, that is responsible for the build - might become a bottleneck. 3. Everyone needs to know about the new language - increased complexity for the team. 3 . 10 BUILD SYSTEMS 3 . 11 CAKE var target = Argument("target", "Default"); Task("Default") .Does(() => { Information("Hello from CAKE"); }); RunTarget(target); 3 . 12 CAKE var target = Argument("target", "Default"); Task("Default") .IsDependentOn("Initialization"); Task("Initialisation"); RunTarget(target); Throws exception! 3 . 13 CAKE Task("Default") .Does(() => { Information("Hello from CAKE"); Just.Say("Something"); }); class Just { public static void Say (string str) { Information(str); } } Doesn't compile! 3 . 14 CAKE Task("Default") .Does(() => { Information("Hello from CAKE"); Just.Say("Something", Context); }); class Just { public static void Say (string str, ICakeContext ctx) { ctx.Information(str); } } 3 . 15 Just an observation: experience is much better in VSCode Anyone using Cake in other IDEs? How do you know which alias to use? 3 . 16 BUILD SYSTEMS 3 . 17 BUILD AUTOMATION SYSTEM FOR C# DEVELOPERS 4 SETUP & EXECUTION Invoke setup script Tell about solution and platform choice git status --untracked Show added project in solution - it's a project! Help + 5 . 1 IMPLEMENTATION Console application, default target Targets are actual symbols -> refactoring/navigation 6 . 1 Clean Restore Compile Pack Push Clean: predefined directories; globbing Restore: default settings Compile: GitVersion field Pack: path construction Push: parameter resolution 6 . 2 6 . 3 CONSOLE APP Want to discover a method? Go to declaration! Refactorings? Use your IDE features! Debugging? Set a breakpoint and run! 6 . 4 TOOLS ... and many more! 7 . 1 HOW DO WE GET SUPPORT? 7 . 2 CODE-GENERATION 7 . 3 CODE-GENERATION 7 . 4 extract generate Reference Metadata Code 7 . 5 GENERATED CODE Invocation Tool resolution Argument configuration XML documentation Assertions 7 . 6 THANKS TO Patrick Schwarz Robert Schili Sebastian Karasek Stefan Bertels Ulrich Buchgraber 8 . 1 8 . 2 www.nuke.build nuke-build/nuke @nukebuildnet gitter.im/nuke-build/nuke present.nuke.build Matthias Koch 8 . 3.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    39 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us