Skip to content

Instantly share code, notes, and snippets.

@DevWouter
Last active July 18, 2018 08:41
Show Gist options
  • Save DevWouter/c7e15710faf8edc5ca35812f9d141f07 to your computer and use it in GitHub Desktop.
Save DevWouter/c7e15710faf8edc5ca35812f9d141f07 to your computer and use it in GitHub Desktop.
JenkinsTutorial - Hello world
// A Hello World! program in C#.
using System;
namespace HelloWorld
{
class Hello
{
static void Main()
{
Console.WriteLine("Hello World!");
}
}
}
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Compile Include="helloworld.cs" />
</ItemGroup>
<Target Name="Build">
<Csc Sources="@(Compile)"/>
</Target>
</Project>
node { ws {
// Checkout de source code
checkout scm;
// Verkrijg de path van de globale geinstalleerde tool.
def msbuild_tool = tool(
name: 'MSBuild 4 (x64)',
type: 'hudson.plugins.msbuild.MsBuildInstallation');
// Draai een commando om het project te bouwen.
bat "${msbuild_tool} helloworld.csproj"
} }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment