Skip to content

Commit

Permalink
Add CI builds for ServiceStack.Contrib
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Sep 14, 2013
1 parent 5f6e5eb commit cebbc48
Show file tree
Hide file tree
Showing 22 changed files with 316 additions and 24 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed NuGet/ServiceStack.Caching.AwsDynamoDb.3.9.55.nupkg
Binary file not shown.
Binary file not shown.
Binary file removed NuGet/ServiceStack.Caching.Azure.3.9.55.nupkg
Binary file not shown.
Binary file not shown.
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- Append below entry to configSections. Do not overwrite the full section. -->
<section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" />
</configSections>
<dataCacheClients>
<dataCacheClient name="default">
<hosts>
<host name="[Insert Cache EndPoint]" cachePort="22233" />
</hosts>
<securityProperties mode="Message">
<messageSecurity authorizationInfo="[Encrypted ACS token goes here]"></messageSecurity>
</securityProperties>
</dataCacheClient>
<dataCacheClient name="SslEndpoint">
<hosts>
<host name="[Insert Cache EndPoint]" cachePort="22243" />
</hosts>
<securityProperties mode="Message" sslEnabled="true">
<messageSecurity authorizationInfo="[Encrypted ACS token goes here]"></messageSecurity>
</securityProperties>
</dataCacheClient>
</dataCacheClients>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- Append below entry to configSections. Do not overwrite the full section. -->
<section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" />
</configSections>
<dataCacheClients>
<dataCacheClient name="default">
<hosts>
<host name="[Insert Cache EndPoint]" cachePort="22233" />
</hosts>
<securityProperties mode="Message">
<messageSecurity authorizationInfo="[Encrypted ACS token goes here]"></messageSecurity>
</securityProperties>
</dataCacheClient>
<dataCacheClient name="SslEndpoint">
<hosts>
<host name="[Insert Cache EndPoint]" cachePort="22243" />
</hosts>
<securityProperties mode="Message" sslEnabled="true">
<messageSecurity authorizationInfo="[Encrypted ACS token goes here]"></messageSecurity>
</securityProperties>
</dataCacheClient>
</dataCacheClients>
</configuration>
Binary file removed NuGet/ServiceStack.Caching.Memcached.3.9.55.nupkg
Binary file not shown.
Binary file not shown.
Binary file not shown.
169 changes: 169 additions & 0 deletions build/Build.proj
@@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Default"
xmlns='http://schemas.microsoft.com/developer/msbuild/2003' ToolsVersion="4.0">
<Import Project="$(MSBuildProjectDirectory)/Build.tasks" />

<PropertyGroup>
<MajorVersion Condition="$(MajorVersion) == ''">3</MajorVersion>
<MinorVersion Condition="$(MinorVersion) == ''">9</MinorVersion>
<PatchVersion Condition="$(PatchVersion) == ''">$(BUILD_NUMBER)</PatchVersion>
</PropertyGroup>

<PropertyGroup>
<BuildSolutionDir>$(MSBuildProjectDirectory)/..</BuildSolutionDir>
<SrcDir>$(BuildSolutionDir)/src</SrcDir>
<Configuration Condition="$(Configuration) == ''">Release</Configuration>
<NuGetPath>$(BuildSolutionDir)/src/.nuget/nuget.exe</NuGetPath>
<NuGetPackageDir>$(BuildSolutionDir)/NuGet/</NuGetPackageDir>
<Version>$(MajorVersion).$(MinorVersion).$(PatchVersion).0</Version>
<UnstableTag Condition="$(RELEASE) == ''">-unstable</UnstableTag>
<PackageVersion>$(MajorVersion).$(MinorVersion).$(PatchVersion)$(UnstableTag)</PackageVersion>
</PropertyGroup>


<ItemGroup>
<NugetPackageFilesToDelete Include="$(NuGetPackageDir)/*.nupkg"/>
</ItemGroup>


<PropertyGroup>
<DoBuildSolutionsDependsOn>
BeforeBuildSolutions;
BuildSolutions
</DoBuildSolutionsDependsOn>
</PropertyGroup>

<ItemGroup>
<NugetPackageFilesToDelete Include="$(NuGetPackageDir)/*.nupkg"/>
</ItemGroup>

<Target Name="Default" DependsOnTargets="$(DoBuildSolutionsDependsOn)" />

<Target Name="TeamCityBuild">
<!--<Copy SourceFiles="$(BuildSolutionDir)/tests/ServiceStack.Common.Tests/ci.app.config" DestinationFiles="$(BuildSolutionDir)/tests/ServiceStack.Common.Tests/app.config" />-->
<CallTarget Targets="Default" />
</Target>

<Target Name="Default" DependsOnTargets="$(DoBuildSolutionsDependsOn)" />

<Target Name="BeforeBuildSolutions">
<Message Text="*****Before building solution*****" Importance="high"/>
<!--<Copy SourceFiles="Test/ci.app.config" DestinationFiles="Test/app.config" />-->
</Target>

<Target Name="UnitTestsWithoutIntegration" DependsOnTargets="$(DoBuildSolutionsDependsOn)">
<!--<Exec Command="$(BuildSolutionDir)/lib/tests/nunit-console-x86.exe /exclude:Integration $(BuildSolutionDir)/tests/ServiceStack.Redis.Tests/bin/Debug/ServiceStack.Redis.Tests.dll"/>-->
</Target>

<Target Name="UnitTests" DependsOnTargets="$(DoBuildSolutionsDependsOn)">
<!--<Exec Command="$(BuildSolutionDir)/lib/tests/nunit-console-x86.exe $(BuildSolutionDir)/tests/ServiceStack.Redis.Tests/bin/Debug/ServiceStack.Redis.Tests.dll"/>-->
</Target>

<Target Name="BuildSolutions">
<MSBuild Projects="$(BuildSolutionDir)/src/ServiceStack.Contrib.sln" Targets="Build"
Properties="Configuration=$(Configuration)" />
</Target>

<Target Name="NuGetPack">

<!-- Update Version -->
<ItemGroup>
<RegexTransform Include="$(SrcDir)/**/AssemblyInfo.cs">
<Find>\d+\.\d+\.\d+\.\d+</Find>
<ReplaceWith>$(Version)</ReplaceWith>
</RegexTransform>
</ItemGroup>

<RegexTransform Items="@(RegexTransform)" />

<Delete Files="@(NugetPackageFilesToDelete)" />

<ItemGroup>
<AuthenticationMongoDBFiles Include="$(SrcDir)/ServiceStack.Authentication.MongoDB/bin/$(Configuration)/ServiceStack.Authentication.MongoDB.*"></AuthenticationMongoDBFiles>

<AuthenticationNHibernateFiles Include="$(SrcDir)/ServiceStack.Authentication.NHibernate/bin/$(Configuration)/ServiceStack.Authentication.NHibernate.*"></AuthenticationNHibernateFiles>

<AuthenticationRavenDbFiles Include="$(SrcDir)/ServiceStack.Authentication.RavenDb/bin/$(Configuration)/ServiceStack.Authentication.RavenDb.*"></AuthenticationRavenDbFiles>

<CachingAwsDynamoDbFiles Include="$(SrcDir)/ServiceStack.CacheAccess.AwsDynamoDb/bin/$(Configuration)/ServiceStack.CacheAccess.AwsDynamoDb.*"></CachingAwsDynamoDbFiles>

<CachingAzureFiles Include="$(SrcDir)/ServiceStack.CacheAccess.Azure/bin/$(Configuration)/ServiceStack.CacheAccess.Azure.*"></CachingAzureFiles>

<CachingMemcachedFiles Include="$(SrcDir)/ServiceStack.CacheAccess.Memcached/bin/$(Configuration)/ServiceStack.CacheAccess.Memcached.*"></CachingMemcachedFiles>
</ItemGroup>

<!-- ServiceStack.Authentication.MongoDB -->

<MSBuild Projects="$(SrcDir)/ServiceStack.Authentication.MongoDB/ServiceStack.Authentication.MongoDB.csproj"
Targets="Build"
Properties="Version=$(PackageVersion);Configuration=$(Configuration)" />

<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Authentication.MongoDB/lib/net35" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Authentication.MongoDB/lib/net35')" />
<Copy SourceFiles="%(AuthenticationMongoDBFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Authentication.MongoDB/lib/net35" />

<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Authentication.MongoDB/servicestack.authentication.mongodb.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />

<!-- ServiceStack.Authentication.NHibernate -->

<MSBuild Projects="$(SrcDir)/ServiceStack.Authentication.NHibernate/ServiceStack.Authentication.NHibernate.csproj"
Targets="Build"
Properties="Version=$(PackageVersion);Configuration=$(Configuration)" />

<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Authentication.NHibernate/lib/net35" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Authentication.NHibernate/lib/net35')" />
<Copy SourceFiles="%(AuthenticationNHibernateFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Authentication.NHibernate/lib/net35" />

<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Authentication.NHibernate/servicestack.authentication.nhibernate.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />

<!-- ServiceStack.Authentication.RavenDb -->

<MSBuild Projects="$(SrcDir)/ServiceStack.Authentication.RavenDb/ServiceStack.Authentication.RavenDb.csproj"
Targets="Build"
Properties="Version=$(PackageVersion);Configuration=$(Configuration)" />

<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Authentication.RavenDb/lib/net40" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Authentication.RavenDb/lib/net40')" />
<Copy SourceFiles="%(AuthenticationRavenDbFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Authentication.RavenDb/lib/net40" />

<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Authentication.RavenDb/servicestack.authentication.ravendb.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />

<!-- ServiceStack.CacheAccess.AwsDynamoDb -->

<MSBuild Projects="$(SrcDir)/ServiceStack.CacheAccess.AwsDynamoDb/ServiceStack.CacheAccess.AwsDynamoDb.csproj"
Targets="Build"
Properties="Version=$(PackageVersion);Configuration=$(Configuration)" />

<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Caching.AwsDynamoDb/lib/net40" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Caching.AwsDynamoDb/lib/net40')" />
<Copy SourceFiles="%(CachingAwsDynamoDbFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Caching.AwsDynamoDb/lib/net40" />

<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Caching.AwsDynamoDb/servicestack.caching.awsdynamodb.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />

<!-- ServiceStack.CacheAccess.Azure -->

<MSBuild Projects="$(SrcDir)/ServiceStack.CacheAccess.Azure/ServiceStack.CacheAccess.Azure.csproj"
Targets="Build"
Properties="Version=$(PackageVersion);Configuration=$(Configuration)" />

<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Caching.Azure/lib/net40" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Caching.Azure/lib/net40')" />
<Copy SourceFiles="%(CachingAzureFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Caching.Azure/lib/net40" />

<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Caching.Azure/servicestack.caching.azure.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />

<!-- ServiceStack.CacheAccess.Memcached -->

<MSBuild Projects="$(SrcDir)/ServiceStack.CacheAccess.Memcached/ServiceStack.CacheAccess.Memcached.csproj"
Targets="Build"
Properties="Version=$(PackageVersion);Configuration=$(Configuration)" />

<MakeDir Directories="$(NuGetPackageDir)/ServiceStack.Caching.Memcached/lib/net35" Condition="!Exists('$(NuGetPackageDir)/ServiceStack.Caching.Memcached/lib/net35')" />
<Copy SourceFiles="%(CachingMemcachedFiles.Identity)" DestinationFolder="$(NuGetPackageDir)/ServiceStack.Caching.Memcached/lib/net35" />

<Exec Command="&quot;$(NuGetPath)&quot; pack &quot;$(NuGetPackageDir)/ServiceStack.Caching.Memcached/servicestack.caching.memcached.nuspec&quot; -OutputDirectory &quot;$(NuGetPackageDir)&quot; -Version $(PackageVersion) -Symbols"
LogStandardErrorAsError="true" />

</Target>

</Project>
34 changes: 34 additions & 0 deletions build/Build.tasks
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Go" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="RegexTransform" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Items ParameterType="Microsoft.Build.Framework.ITaskItem[]" />
</ParameterGroup>
<Task>
<Using Namespace="System.IO" />
<Using Namespace="System.Text.RegularExpressions" />
<Using Namespace="Microsoft.Build.Framework" />
<Code Type="Fragment" Language="cs">
<![CDATA[
foreach(ITaskItem item in Items) {
string fileName = item.GetMetadata("FullPath");
string find = item.GetMetadata("Find");
string replaceWith = item.GetMetadata("ReplaceWith");
if(!File.Exists(fileName)) {
Log.LogError(null, null, null, null, 0, 0, 0, 0, String.Format("Could not find version file: {0}", fileName), new object[0]);
}
string content = File.ReadAllText(fileName);
File.WriteAllText(
fileName,
Regex.Replace(
content,
find,
replaceWith
)
);
}
]]></Code>
</Task>
</UsingTask>
</Project>
3 changes: 3 additions & 0 deletions build/build-local.bat
@@ -0,0 +1,3 @@
SET MSBUILD=C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe

%MSBUILD% Build.proj /target:NuGetPack /property:Configuration=Release;RELEASE=true;PatchVersion=60
6 changes: 6 additions & 0 deletions src/.nuget/NuGet.config
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
</configuration>
Binary file added src/.nuget/NuGet.exe
Binary file not shown.
77 changes: 77 additions & 0 deletions src/.nuget/NuGet.targets
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
</PropertyGroup>

<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
<!-- Windows specific commands -->
<NuGetToolsPath>$([System.IO.Path]::Combine($(SolutionDir), ".nuget"))</NuGetToolsPath>
<PackagesConfig>$([System.IO.Path]::Combine($(ProjectDir), "packages.config"))</PackagesConfig>
<PackagesDir>$([System.IO.Path]::Combine($(SolutionDir), "packages"))</PackagesDir>
</PropertyGroup>

<PropertyGroup Condition=" '$(OS)' != 'Windows_NT'">
<!-- We need to launch nuget.exe with the mono command if we're not on windows -->
<NuGetToolsPath>$(SolutionDir).nuget</NuGetToolsPath>
<PackagesConfig>packages.config</PackagesConfig>
<PackagesDir>$(SolutionDir)packages</PackagesDir>
</PropertyGroup>

<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath>$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
<NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>

<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>

<!-- Package sources used to restore packages. By default will used the registered sources under %APPDATA%\NuGet\NuGet.Config -->
<PackageSources>""</PackageSources>

<!-- Enable the restore command to run before builds -->
<RestorePackages Condition="$(RestorePackages) == ''">false</RestorePackages>

<!-- Property that enables building a package from a project -->
<BuildPackage Condition="$(BuildPackage) == ''">false</BuildPackage>

<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source $(PackageSources) -o "$(PackagesDir)"</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>

<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(BuildDependsOn);
</BuildDependsOn>

<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
$(BuildDependsOn);
BuildPackage;
</BuildDependsOn>
</PropertyGroup>

<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="!Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
</Target>

<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)"
Condition="'$(OS)' != 'Windows_NT' And Exists('$(PackagesConfig)')" />

<Exec Command="$(RestoreCommand)"
LogStandardErrorAsError="true"
Condition="'$(OS)' == 'Windows_NT' And Exists('$(PackagesConfig)')" />
</Target>

<Target Name="BuildPackage" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(BuildCommand)"
Condition=" '$(OS)' != 'Windows_NT' " />

<Exec Command="$(BuildCommand)"
LogStandardErrorAsError="true"
Condition=" '$(OS)' == 'Windows_NT' " />
</Target>
</Project>
3 changes: 3 additions & 0 deletions src/ServiceStack.Contrib.sln
Expand Up @@ -8,7 +8,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.CacheAccess.Me
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{21E2FAC5-8CCD-4E23-962C-A44B07C1D5A1}"
ProjectSection(SolutionItems) = preProject
..\build\build-local.bat = ..\build\build-local.bat
..\build\build.bat = ..\build\build.bat
..\build\Build.proj = ..\build\Build.proj
..\build\Build.tasks = ..\build\Build.tasks
..\NuGet\NuGetPack.cmd = ..\NuGet\NuGetPack.cmd
..\NuGet\ServiceStack.Authentication.MongoDB\servicestack.authentication.mongodb.nuspec = ..\NuGet\ServiceStack.Authentication.MongoDB\servicestack.authentication.mongodb.nuspec
..\NuGet\ServiceStack.Authentication.NHibernate\servicestack.authentication.nhibernate.nuspec = ..\NuGet\ServiceStack.Authentication.NHibernate\servicestack.authentication.nhibernate.nuspec
Expand Down

0 comments on commit cebbc48

Please sign in to comment.