Skip to content

Instantly share code, notes, and snippets.

@kulmam92
Last active January 31, 2019 02:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kulmam92/2aec7ad0c54f4d60a75d7d9970f4b2b1 to your computer and use it in GitHub Desktop.
Save kulmam92/2aec7ad0c54f4d60a75d7d9970f4b2b1 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WorkingDirectory>$(WORKSPACE)</WorkingDirectory>
<EnvironmentName>$(Environment)</EnvironmentName>
<devEnvTool Condition="'$(devEnvTool)'==''">C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe</devEnvTool>
</PropertyGroup>
<!--Build using Devenv.exe-->
<!--MSBuild Batching: Target batching (Outputs)-->
<Target Name="BuildSSAS" Condition="'@(SSASProject)'!=''" Outputs="%(SSASProject.Identity)" AfterTargets="ReadSSASProjectListFromFile">
<Message Text="Checking for SSAS changes to build..." />
<Message Text="**************Building SSAS project: %(SSASProject.identity) for configuration: $(Configuration)**************" />
<Exec Command="&quot;$(devEnvTool)&quot; &quot;%(SSASProject.identity)&quot; /build development /projectconfig &quot;$(Configuration)&quot;" />
</Target>
</Project>
Import-Module .\psake.psm1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
properties{
$tfsCollectionPath="http://win-ci:9090/tfs/testCollection"
$WorkingDirectory=$env:WORKSPACE
$EnvironmentName=$env:Environment
}
FormatTaskName ">>>-- Executing {0} Task -->"
Task Default -depends Build-SSASProject -description "Default task"
Task Build-SSASProject `
-description "Build SSAS Projects" `
-depends Check-Environment `
{
Write-Output "$TargetObjectFullName"
& $devEnvTool "$TargetObjectFullName" /build $buildConfiguration /projectconfig $buildConfiguration|Out-Null
if($LASTEXITCODE -ne 0) {
throw "Failed to build $TargetObjectFullName"
exit 1
}
}
Task Check-Environment `
-description "Verify parameters and build tools" `
-requiredVariables $CMServer, $CMDBName, $WorkingDirectory, $EnvironmentName `
{
Assert (Test-Path $nunitConsole) `
"NUnit console test runner could not be found"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment