Download - Builds with a side of Cake - CodeStock 2016
![Page 1: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/1.jpg)
Builds with a side ofJamie Phillips Web: http://phillipsj.netTwitter: @phillipsj73Github: phillipsj
![Page 2: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/2.jpg)
BUILD TOOLS VS CI SERVERS
• Build runs the same regardless of CI server used. Can easily port your build from TeamCity to Jenkins.
• Builds run the same locally as they do on the CI server• Part of source control• Separation of Concerns --
https://lostechies.com/derekgreer/2016/02/28/separation-of-concerns-application-builds-continuous-integration/
![Page 3: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/3.jpg)
![Page 4: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/4.jpg)
MSBUILD
<Project DefaultTargets="Compile“ xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name = "Compile"> <!-- Run the Visual C# compilation using input files of type CSFile --> <CSC Sources = "@(CSFile)“ OutputAssembly = "$(appname).exe">
<!-- Set the OutputAssembly attribute of the CSC task to the name of the executable file that is created -->
<Output TaskParameter = "OutputAssembly“ ItemName = "EXEFile" /></CSC> <!-- Log the file name of the output file --> <Message Text="The output file is @(EXEFile)"/>
</Target></Project>
![Page 5: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/5.jpg)
ALBACORE
require 'albacore' require 'albacore/tasks/versionizer' require 'albacore/ext/teamcity'
Albacore::Tasks::Versionizer.new :versioning
desc 'Perform fast build (warn: doesn\'t d/l deps)' build :quick_build do |b|
b.logging = 'detailed' b.sln = 'src/MyProj.sln'
end
![Page 6: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/6.jpg)
FAKE
#r "tools/FAKE/tools/FakeLib.dll" // include Fake lib open Fake
Target "Test" (fun _ -> trace "Testing stuff..."
)
Target "Deploy" (fun _ -> trace "Heavy deploy action"
)
"Test" // define the dependencies ==> "Deploy"
Run "Deploy"
![Page 7: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/7.jpg)
CAKE
var target = Argument("target", "Default");
Task("Default").Does(() =>
{ Information("Hello World!");
});
RunTarget(target);
![Page 8: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/8.jpg)
WHAT IS CAKE?
• Cake (C# Make) is a cross platform build automation system with a C# DSL to do things like compiling code, copy files/folders, running unit tests, compress files and build NuGet packages.
• http://cakebuild.net
![Page 9: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/9.jpg)
WHY CAKE?
• C#• Consistent across environments• Build server agnostic• Great Plugin System -- Addins• .NET at your finger tips• No other runtime dependencies• Repeatable• Reduced learning curve
![Page 10: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/10.jpg)
TOOLS
Chocolatey GitVersionMSTest NSIS NuGetDNUDotCoverMSBuild Fixie
GitReleaseNotesGitTools
NUnit ILMergeOctopus DeployOpenCoverRoundhouse
GitReleaseManager
SignTool WiXXBuild
TextTransformxUnitReportGeneratorDupFinder
InspectCodeSpecFlowGitLink
plist
SwaggerReSharper
Squirrel*
Vagrant
WyamVsce
XamarinXCode
YAMLXdtTransform*
PowershellTopShelfStrongNameToolWebDeploy
Unity
MagicChunks
IIS
Orchard*
![Page 11: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/11.jpg)
SOMETHING MISSING?
![Page 12: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/12.jpg)
HOW DO YOU US IT?
• Web Apps• Desktop Apps• Libraries• Electron Apps
![Page 13: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/13.jpg)
EXAMPLES
![Page 14: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/14.jpg)
SOME OF OUR PLUGINS
• Cake.XdtTransform• Cake.Orchard• Cake.Squirrel• Cake.AzureStorage
![Page 15: Builds with a side of Cake - CodeStock 2016](https://reader035.vdocuments.mx/reader035/viewer/2022070602/5876413d1a28ab68098b8541/html5/thumbnails/15.jpg)
QUESTIONS