├── .gitignore ├── ContinuousIntegrationDashboard.sln ├── LICENSE ├── README.md ├── deploy ├── Install.bat ├── config │ ├── local.properties │ └── remote.properties ├── default.build ├── scripts │ └── bootstrap.sql └── tools │ ├── MSBuild Extension Pack 4.0.4.0 Binaries │ ├── Interop.COMAdmin.dll │ ├── Interop.IWshRuntimeLibrary.dll │ ├── Ionic.Zip.dll │ ├── IronPython.Modules.dll │ ├── IronPython.dll │ ├── IronRuby.Libraries.dll │ ├── IronRuby.dll │ ├── MSBuild.ExtensionPack.BizTalk.dll │ ├── MSBuild.ExtensionPack.BizTalk.pdb │ ├── MSBuild.ExtensionPack.Iis7.dll │ ├── MSBuild.ExtensionPack.Iis7.pdb │ ├── MSBuild.ExtensionPack.Loggers.dll │ ├── MSBuild.ExtensionPack.Loggers.pdb │ ├── MSBuild.ExtensionPack.Sql2005.dll │ ├── MSBuild.ExtensionPack.Sql2005.pdb │ ├── MSBuild.ExtensionPack.Sql2008.dll │ ├── MSBuild.ExtensionPack.Sql2008.pdb │ ├── MSBuild.ExtensionPack.StyleCop.dll │ ├── MSBuild.ExtensionPack.StyleCop.pdb │ ├── MSBuild.ExtensionPack.Sync.dll │ ├── MSBuild.ExtensionPack.Sync.pdb │ ├── MSBuild.ExtensionPack.TaskFactory.Dlr.dll │ ├── MSBuild.ExtensionPack.TaskFactory.Dlr.pdb │ ├── MSBuild.ExtensionPack.TaskFactory.PowerShell.dll │ ├── MSBuild.ExtensionPack.TaskFactory.PowerShell.pdb │ ├── MSBuild.ExtensionPack.Tfs.dll │ ├── MSBuild.ExtensionPack.Tfs.pdb │ ├── MSBuild.ExtensionPack.Tfs2010.dll │ ├── MSBuild.ExtensionPack.Tfs2010.pdb │ ├── MSBuild.ExtensionPack.VersionNumber.targets │ ├── MSBuild.ExtensionPack.WindowsVirtualPC.dll │ ├── MSBuild.ExtensionPack.WindowsVirtualPC.pdb │ ├── MSBuild.ExtensionPack.dll │ ├── MSBuild.ExtensionPack.dll.config │ ├── MSBuild.ExtensionPack.pdb │ └── MSBuild.ExtensionPack.tasks │ ├── MSBuildCommunityTasks │ ├── MSBuild.Community.Tasks.Targets │ └── Sample.proj │ ├── MSBuildGlobalFiles │ ├── MSBuild.Utils.tasks │ └── ManageWebsite.targets │ ├── SqlCmd-Win32 │ ├── SQLCMD.EXE │ ├── SQLCMD.rll │ ├── batchparser.dll │ └── batchparser90.dll │ └── SqlCmd │ ├── SQLCMD.EXE │ ├── SQLCMD.rll │ └── batchparser.dll ├── packages └── repositories.config ├── screenshoots ├── dashboard.png └── editmode.png ├── src ├── CIDashboard.Data │ ├── App.config │ ├── CIDashboard.Data.csproj │ ├── CiDashboardContext.cs │ ├── CiDashboardContextBootstrap.cs │ ├── CiDashboardContextFactory.cs │ ├── CiDashboardService.cs │ ├── CompositionRoot │ │ └── DataModule.cs │ ├── Entities │ │ ├── BuildConfig.cs │ │ └── Project.cs │ ├── Interfaces │ │ ├── ICiDashboardContext.cs │ │ ├── ICiDashboardContextBootstrap.cs │ │ ├── ICiDashboardContextFactory.cs │ │ └── ICiDashboardService.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── packages.config ├── CIDashboard.Domain │ ├── CIDashboard.Domain.csproj │ ├── CompositionRoot │ │ └── CiServicesModule.cs │ ├── Entities │ │ ├── CiBuildConfig.cs │ │ ├── CiBuildResult.cs │ │ ├── CiProject.cs │ │ └── CiSource.cs │ ├── Extensions │ │ └── JsonSerialize.cs │ ├── MappingProfiles │ │ └── TeamCityProfiler.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── Services │ │ ├── ICiServerService.cs │ │ └── TeamCityService.cs │ ├── app.config │ └── packages.config └── CIDashboard.Web │ ├── App_Start │ ├── BundleConfig.cs │ ├── FilterConfig.cs │ ├── RouteConfig.cs │ └── WebApiConfig.cs │ ├── Application │ ├── CommandProcessor.cs │ ├── ConnectionsManager.cs │ ├── InformationQuery.cs │ ├── Interfaces │ │ ├── ICommandProcessor.cs │ │ ├── IConnectionsManager.cs │ │ ├── IInformationQuery.cs │ │ └── IRefreshInformation.cs │ └── RefreshInformation.cs │ ├── CIDashboard.Web.csproj │ ├── CompositionRoot │ └── WebModule.cs │ ├── Content │ ├── Site.css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.css.map │ ├── bootstrap.min.css │ ├── jasmine.css │ ├── select.css │ ├── select2.css │ ├── select2.png │ ├── select2x2.png │ ├── toastr.css │ ├── toastr.less │ ├── toastr.min.css │ ├── toastr.scss │ └── xeditable.css │ ├── Controllers │ └── HomeController.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Images │ └── loading.gif │ ├── MappingProfiles │ └── ViewModelProfilers.cs │ ├── Models │ ├── Build.cs │ ├── BuildConfig.cs │ ├── BuildConfigUpdated.cs │ ├── CiSource.cs │ ├── FeedbackMessage.cs │ ├── Project.cs │ ├── ProjectUpdated.cs │ └── RefreshStatus.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Scripts │ ├── _references.js │ ├── angular-mocks.js │ ├── angular-sanitize.js │ ├── angular.js │ ├── angular.min.js │ ├── angular.min.js.map │ ├── boot.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── jasmine-html.js │ ├── jasmine.js │ ├── jquery-2.1.3.min.js │ ├── jquery-2.1.3.min.js.map │ ├── jquery-2.1.4.intellisense.js │ ├── jquery-2.1.4.js │ ├── jquery-2.1.4.min.js │ ├── jquery-2.1.4.min.map │ ├── jquery.jrumble.1.3.js │ ├── jquery.signalR-2.2.0.js │ ├── jquery.signalR-2.2.0.min.js │ ├── jquery.unobtrusive-ajax.js │ ├── jquery.unobtrusive-ajax.min.js │ ├── jquery.validate-vsdoc.js │ ├── jquery.validate.js │ ├── jquery.validate.min.js │ ├── jquery.validate.unobtrusive.js │ ├── jquery.validate.unobtrusive.min.js │ ├── lodash.js │ ├── modernizr-2.8.3.js │ ├── ngDraggable.js │ ├── npm.js │ ├── select.js │ ├── toastr.js │ ├── toastr.min.js │ ├── ui-bootstrap-0.13.0.js │ ├── ui-bootstrap-tpls-0.13.0.js │ └── xeditable.js │ ├── Startup.cs │ ├── Views │ ├── Home │ │ └── Index.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── Footer.cshtml │ │ ├── Header.cshtml │ │ └── _Layout.cshtml │ ├── Web.config │ └── _ViewStart.cshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── app │ ├── app.js │ ├── controllers.js │ ├── controllers │ │ ├── EditController.js │ │ └── projectController.js │ ├── filters.js │ ├── services.js │ ├── services │ │ ├── editService.js │ │ ├── projectService.js │ │ └── signalrService.js │ ├── tests │ │ ├── filtersTests.js │ │ ├── projectControllerTests.js │ │ └── projectServiceTests.js │ └── views │ │ ├── build.html │ │ └── project.html │ ├── favicon.ico │ ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 │ ├── hubs │ ├── CiDashboardHub.cs │ └── ICiDashboardHub.cs │ └── packages.config └── tests ├── CIDashboard.Data.Tests ├── CIDashboard.Data.Tests.csproj ├── CiDashboardServiceTests.cs ├── LocalAddin.cs ├── Properties │ └── AssemblyInfo.cs ├── TestDbAsyncQueryProvider.cs ├── app.config └── packages.config ├── CIDashboard.Domain.Tests ├── CIDashboard.Domain.Tests.csproj ├── LocalAddin.cs ├── MappingProfiles │ └── TeamCityProfilerTests.cs ├── Properties │ └── AssemblyInfo.cs ├── Services │ └── TeamCityServiceTests.cs ├── app.config └── packages.config └── CIDashboard.Web.Tests ├── App.config ├── Application ├── CommandProcessorTests.cs ├── ConnectionsManagerTests.cs ├── InformationQueryTests.cs └── RefreshInformationTests.cs ├── CIDashboard.Web.Tests.csproj ├── LocalAddin.cs ├── Properties └── AssemblyInfo.cs ├── hubs └── CiDashboardHubTests.cs └── packages.config /.gitignore: -------------------------------------------------------------------------------- 1 | [Oo]bj/ 2 | [Bb]in/ 3 | .nuget/ 4 | _ReSharper.* 5 | packages/ 6 | artifacts/ 7 | *.user 8 | *.suo 9 | *.userprefs 10 | *DS_Store 11 | *.sln.ide 12 | *.mdf 13 | *.ldf -------------------------------------------------------------------------------- /ContinuousIntegrationDashboard.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2013 4 | VisualStudioVersion = 12.0.31101.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CIDashboard.Web.Tests", "tests\CIDashboard.Web.Tests\CIDashboard.Web.Tests.csproj", "{80C07431-9D1E-4FF2-A50D-AC7F9A55B906}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CIDashboard.Web", "src\CIDashboard.Web\CIDashboard.Web.csproj", "{98D7F5FE-BDFD-468F-BFC6-B8D457D52A60}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CIDashboard.Data", "src\CIDashboard.Data\CIDashboard.Data.csproj", "{0B2607BB-4D3E-40C9-A190-911B13B47C18}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CIDashboard.Domain", "src\CIDashboard.Domain\CIDashboard.Domain.csproj", "{22A52E3A-0775-4BE3-8A0D-51FF683221B3}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CIDashboard.Data.Tests", "tests\CIDashboard.Data.Tests\CIDashboard.Data.Tests.csproj", "{EB9957D4-E8DA-43FC-8DC9-35765E28751B}" 15 | EndProject 16 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{93DF878E-1F05-4088-BA99-6602CC96195E}" 17 | EndProject 18 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{75632300-B029-43EC-AF7D-83E437F49CE2}" 19 | EndProject 20 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CIDashboard.Domain.Tests", "tests\CIDashboard.Domain.Tests\CIDashboard.Domain.Tests.csproj", "{EEEAC6F8-1511-4716-9683-EF78A22E68D1}" 21 | EndProject 22 | Global 23 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 24 | Debug|Any CPU = Debug|Any CPU 25 | Release|Any CPU = Release|Any CPU 26 | EndGlobalSection 27 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 28 | {80C07431-9D1E-4FF2-A50D-AC7F9A55B906}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 29 | {80C07431-9D1E-4FF2-A50D-AC7F9A55B906}.Debug|Any CPU.Build.0 = Debug|Any CPU 30 | {80C07431-9D1E-4FF2-A50D-AC7F9A55B906}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {80C07431-9D1E-4FF2-A50D-AC7F9A55B906}.Release|Any CPU.Build.0 = Release|Any CPU 32 | {98D7F5FE-BDFD-468F-BFC6-B8D457D52A60}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 33 | {98D7F5FE-BDFD-468F-BFC6-B8D457D52A60}.Debug|Any CPU.Build.0 = Debug|Any CPU 34 | {98D7F5FE-BDFD-468F-BFC6-B8D457D52A60}.Release|Any CPU.ActiveCfg = Release|Any CPU 35 | {98D7F5FE-BDFD-468F-BFC6-B8D457D52A60}.Release|Any CPU.Build.0 = Release|Any CPU 36 | {0B2607BB-4D3E-40C9-A190-911B13B47C18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 37 | {0B2607BB-4D3E-40C9-A190-911B13B47C18}.Debug|Any CPU.Build.0 = Debug|Any CPU 38 | {0B2607BB-4D3E-40C9-A190-911B13B47C18}.Release|Any CPU.ActiveCfg = Release|Any CPU 39 | {0B2607BB-4D3E-40C9-A190-911B13B47C18}.Release|Any CPU.Build.0 = Release|Any CPU 40 | {22A52E3A-0775-4BE3-8A0D-51FF683221B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 41 | {22A52E3A-0775-4BE3-8A0D-51FF683221B3}.Debug|Any CPU.Build.0 = Debug|Any CPU 42 | {22A52E3A-0775-4BE3-8A0D-51FF683221B3}.Release|Any CPU.ActiveCfg = Release|Any CPU 43 | {22A52E3A-0775-4BE3-8A0D-51FF683221B3}.Release|Any CPU.Build.0 = Release|Any CPU 44 | {EB9957D4-E8DA-43FC-8DC9-35765E28751B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 45 | {EB9957D4-E8DA-43FC-8DC9-35765E28751B}.Debug|Any CPU.Build.0 = Debug|Any CPU 46 | {EB9957D4-E8DA-43FC-8DC9-35765E28751B}.Release|Any CPU.ActiveCfg = Release|Any CPU 47 | {EB9957D4-E8DA-43FC-8DC9-35765E28751B}.Release|Any CPU.Build.0 = Release|Any CPU 48 | {EEEAC6F8-1511-4716-9683-EF78A22E68D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 49 | {EEEAC6F8-1511-4716-9683-EF78A22E68D1}.Debug|Any CPU.Build.0 = Debug|Any CPU 50 | {EEEAC6F8-1511-4716-9683-EF78A22E68D1}.Release|Any CPU.ActiveCfg = Release|Any CPU 51 | {EEEAC6F8-1511-4716-9683-EF78A22E68D1}.Release|Any CPU.Build.0 = Release|Any CPU 52 | EndGlobalSection 53 | GlobalSection(SolutionProperties) = preSolution 54 | HideSolutionNode = FALSE 55 | EndGlobalSection 56 | GlobalSection(NestedProjects) = preSolution 57 | {80C07431-9D1E-4FF2-A50D-AC7F9A55B906} = {75632300-B029-43EC-AF7D-83E437F49CE2} 58 | {98D7F5FE-BDFD-468F-BFC6-B8D457D52A60} = {93DF878E-1F05-4088-BA99-6602CC96195E} 59 | {0B2607BB-4D3E-40C9-A190-911B13B47C18} = {93DF878E-1F05-4088-BA99-6602CC96195E} 60 | {22A52E3A-0775-4BE3-8A0D-51FF683221B3} = {93DF878E-1F05-4088-BA99-6602CC96195E} 61 | {EB9957D4-E8DA-43FC-8DC9-35765E28751B} = {75632300-B029-43EC-AF7D-83E437F49CE2} 62 | {EEEAC6F8-1511-4716-9683-EF78A22E68D1} = {75632300-B029-43EC-AF7D-83E437F49CE2} 63 | EndGlobalSection 64 | EndGlobal 65 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Carlos Camacho 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Continuous Integration Dashboard # 2 | 3 | [![Build status](https://ci.appveyor.com/api/projects/status/wv8g82g3xkhfa56d?svg=true)](https://ci.appveyor.com/project/cmvcamacho/continuous-integration-dashboard) 4 | 5 | A dashboard to display build information from TeamCity (and other CI's). Each authenticated user can create his own customized view, aggregating build results in project panels for easier visualization. 6 | 7 | ###### Dashboard 8 | ![dashboard](/screenshoots/dashboard.png) 9 | 10 | ###### Dashboard in edit mode 11 | ![dashboard in edit mode](/screenshoots/editmode.png) 12 | 13 | ## Installation 14 | 15 | The installation scripts allow you to install this in your local machine or on remote machines. 16 | * Local machine 17 | 1. Compile solution with VS2013 and run it (it will use LocalDB and IISExpress) 18 | 1. Install it locally 19 | * Compile solution with VS2013 20 | * Configure installation properties file ".\deploy\config\local.properties" 21 | * Open a Command Prompt with Administrator rights and run the command ".\deploy\Install.bat local" 22 | * The 'local' keyword maps to the file ".\deploy\config\local.properties" 23 | * This will use local IIS and SQL Server 24 | 25 | * Remote machine 26 | * Compile solution with VS2013 27 | * Configure installation properties file ".\deploy\config\remote.properties" 28 | * Open a Command Prompt with Administrator rights and run the command ".\deploy\Install.bat remote" 29 | * The 'local' keyword maps to the file ".\deploy\config\remote.properties" 30 | 31 | * Configuration: 32 | The properties file have meaningful names so it should be easy to configure it. 33 | 34 | ## Usage 35 | 36 | The dashboard contains the following features: 37 | * Integrated authentication with company Active Directory 38 | * Allow customized views per user 39 | * Aggregate view of builds in logical projects 40 | * Automatically refresh status (configured by default to update every 5 minutes) 41 | * Only allows selecting TeamCity build configurations that aren't archived 42 | 43 | ## Roadmap 44 | 45 | * Add support to other CI's like Jenkins, TFS, CruiseControl and so on... 46 | * Add support to sort projects and builds 47 | * Move to less css 48 | * Upgrade to VS2015 49 | * Improve deployment scripts 50 | 51 | ## Contributing 52 | 53 | 1. Fork it! 54 | 2. Create your feature branch: `git checkout -b my-new-feature` 55 | 3. Commit your changes: `git commit -am 'Add some feature'` 56 | 4. Push to the branch: `git push origin my-new-feature` 57 | 5. Submit a pull request :D 58 | 59 | ## Technology 60 | 61 | This project is built using the following stack: 62 | * AngularJS 63 | * BootStrap 64 | * Toastr 65 | * Microsoft MVC 66 | * Microsoft SignalR 67 | * Microsoft Entity Framework 68 | * Hangfire (to refresh build in the background every 5 minutes) 69 | * Autofac 70 | * AutoMapper 71 | * Serilog 72 | * Newtonsoft.Json 73 | * NUnit 74 | * AutoFixture 75 | * FakeItEasy 76 | * FluentAssertions 77 | * [TeamCitySharp-forked](https://github.com/y-gagar1n/TeamCitySharp) 78 | 79 | ## Credits 80 | 81 | Copyright (c) 2015 Carlos Camacho 82 | 83 | ## License 84 | 85 | See the [LICENSE](LICENSE) file for license rights and limitations (MIT). 86 | 87 | -------------------------------------------------------------------------------- /deploy/Install.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | :: Check command syntax 4 | IF '%1'=='' ( 5 | echo Usage: Install.bat [environment] 6 | echo 7 | exit 8 | ) 9 | 10 | 11 | :: Gets the current path 12 | set rootDir=%~dp0 13 | 14 | :: Determin what architecture EXEs should run on. 15 | if %PROCESSOR_ARCHITECTURE%==x86 ( 16 | set msbuild=C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe 17 | ) else ( 18 | set msbuild=C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe 19 | ) 20 | 21 | %msbuild% default.build /t:Install /p:Environment=%1 /p:VisualStudioVersion=12.0 22 | -------------------------------------------------------------------------------- /deploy/config/local.properties: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | localhost 6 | C:\Deploy\Webs 7 | CiDashboard.company.local 8 | $(SiteName) 9 | 80 10 | true 11 | 12 | 13 | 14 | 15 | true 16 | false 17 | false 18 | 19 | 20 | C:\Deploy\Logs\CIDashboard.Web\CIDashboard.Web-{Date}.log 21 | 22 | 23 | .\devsql2008 24 | CiDashboard 25 | Data Source=$(DbServer)%3BInitial Catalog=$(DatabaseName)%3BIntegrated Security=True%3BMultipleActiveResultSets=True%3B%3BAsynchronous Processing=True 26 | 27 | 28 | 10.21.195.14 29 | true 30 | dashboard 31 | d@shb0@rd 32 | 33 | 34 | */5 * * * * 35 | 36 | -------------------------------------------------------------------------------- /deploy/config/remote.properties: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | webserver.company.com 6 | H:\Deploy\Webs 7 | CiDashboard.ws01.dev6.company.com 8 | $(SiteName) 9 | 80 10 | true 11 | Domain\CiDashboard-User 12 | password123 13 | 14 | 15 | true 16 | false 17 | false 18 | 19 | 20 | C:\Deploy\Logs\CIDashboard.Web\CIDashboard.Web-{Date}.log 21 | 22 | 23 | dbserver.company.com 24 | CiDashboard 25 | Data Source=$(DbServer)%3BInitial Catalog=$(DatabaseName)%3BIntegrated Security=True%3BMultipleActiveResultSets=True%3B%3BAsynchronous Processing=True 26 | 27 | 28 | teamcity.company.com 29 | true 30 | tcUser 31 | tcPwd 32 | 33 | 34 | */5 * * * * 35 | 36 | -------------------------------------------------------------------------------- /deploy/scripts/bootstrap.sql: -------------------------------------------------------------------------------- 1 | IF not EXISTS(SELECT * FROM sys.databases WHERE name = '#{DatabaseName}') 2 | BEGIN CREATE DATABASE #{DatabaseName} 3 | END 4 | GO 5 | 6 | IF NOT EXISTS (SELECT loginname FROM master.dbo.syslogins WHERE name = '#{ServiceUser}') 7 | BEGIN 8 | CREATE LOGIN [#{ServiceUser}] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english] 9 | END 10 | 11 | USE [#{DatabaseName}] 12 | GO 13 | IF NOT EXISTS (SELECT name FROM sys.database_principals WHERE name = '#{ServiceUser}') 14 | BEGIN 15 | CREATE USER [#{ServiceUser}] FOR LOGIN [#{ServiceUser}] 16 | END 17 | GO 18 | 19 | EXEC sp_addrolemember N'db_datareader', N'#{ServiceUser}' 20 | GO 21 | EXEC sp_addrolemember N'db_datawriter', N'#{ServiceUser}' 22 | GO 23 | EXEC sp_addrolemember N'db_ddladmin', N'#{ServiceUser}' 24 | -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/Interop.COMAdmin.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/Interop.COMAdmin.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/Interop.IWshRuntimeLibrary.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/Interop.IWshRuntimeLibrary.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/Ionic.Zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/Ionic.Zip.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/IronPython.Modules.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/IronPython.Modules.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/IronPython.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/IronPython.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/IronRuby.Libraries.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/IronRuby.Libraries.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/IronRuby.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/IronRuby.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.BizTalk.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.BizTalk.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.BizTalk.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.BizTalk.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Iis7.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Iis7.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Iis7.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Iis7.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Loggers.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Loggers.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Loggers.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Loggers.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sql2005.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sql2005.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sql2005.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sql2005.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sql2008.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sql2008.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sql2008.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sql2008.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.StyleCop.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.StyleCop.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.StyleCop.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.StyleCop.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sync.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sync.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sync.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Sync.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.TaskFactory.Dlr.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.TaskFactory.Dlr.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.TaskFactory.Dlr.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.TaskFactory.Dlr.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.TaskFactory.PowerShell.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.TaskFactory.PowerShell.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.TaskFactory.PowerShell.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.TaskFactory.PowerShell.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Tfs.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Tfs.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Tfs.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Tfs.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Tfs2010.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Tfs2010.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Tfs2010.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.Tfs2010.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.WindowsVirtualPC.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.WindowsVirtualPC.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.WindowsVirtualPC.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.WindowsVirtualPC.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.dll -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.dll.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/deploy/tools/MSBuild Extension Pack 4.0.4.0 Binaries/MSBuild.ExtensionPack.pdb -------------------------------------------------------------------------------- /deploy/tools/MSBuildCommunityTasks/Sample.proj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 67 | 68 | 69 | 70 | 71 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 91 | 92 | 93 | 94 | 104 | 105 | 106 | 107 | list = new List(); 110 | list.Add("Happy"); 111 | list.Add("New"); 112 | list.Add("Year"); 113 | Console.WriteLine("Hello MSBuild Community Scripting World."); 114 | foreach(string s in list) 115 | { 116 | Console.WriteLine(s); 117 | } 118 | } 119 | ]]> 120 | 121 | 122 | 123 | 124 | 8 | 9 | 10 | 11 |

12 | {{ build.Name }} 13 | 14 | 15 | 16 | 17 | 22 | 23 |

24 | 25 |

Build: {{ build.Version }}

26 | 31 |

Passed: {{ build.NumberTestPassed }}  Failed: {{ build.NumberTestFailed }}

32 |

 

33 | 34 | -------------------------------------------------------------------------------- /src/CIDashboard.Web/app/views/project.html: -------------------------------------------------------------------------------- 1 | 
2 |
3 | 4 |

5 | {{ project.Name }} 6 | 7 | 8 | 9 |   {{ project.Builds.length }} 10 |    11 |

12 |
13 |
14 |
    15 |
  • 16 | 17 |
  • 18 |
19 |
20 |
-------------------------------------------------------------------------------- /src/CIDashboard.Web/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/src/CIDashboard.Web/favicon.ico -------------------------------------------------------------------------------- /src/CIDashboard.Web/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/src/CIDashboard.Web/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/CIDashboard.Web/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/src/CIDashboard.Web/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/CIDashboard.Web/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/src/CIDashboard.Web/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/CIDashboard.Web/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cmvcamacho/continuous-integration-dashboard/2ad94e6c0355b77c8c084a67be36b1cfeefb6b8d/src/CIDashboard.Web/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/CIDashboard.Web/hubs/ICiDashboardHub.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using CIDashboard.Web.Models; 3 | 4 | namespace CIDashboard.Web.Hubs 5 | { 6 | public interface ICiDashboardHub 7 | { 8 | void SendUpdatedProject(ProjectUpdated project); 9 | 10 | void SendUpdatedBuild(BuildConfigUpdated build); 11 | 12 | void SendMessage(FeedbackMessage message); 13 | 14 | void SendProjectsAndBuildConfigs(IEnumerable projects); 15 | 16 | void SendProjectBuilds(IEnumerable builds); 17 | 18 | void SendBuildResult(Build build); 19 | 20 | void StartRefresh(RefreshStatus status); 21 | 22 | void StopRefresh(RefreshStatus status); 23 | } 24 | } -------------------------------------------------------------------------------- /src/CIDashboard.Web/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /tests/CIDashboard.Data.Tests/LocalAddin.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Core.Extensibility; 2 | 3 | namespace CIDashboard.Data.Tests 4 | { 5 | [NUnitAddin] 6 | public class LocalAddin : Ploeh.AutoFixture.NUnit2.Addins.Addin 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /tests/CIDashboard.Data.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("CIDashboard.Data.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CIDashboard.Data.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("421730f9-4a8c-47f0-bb8c-3dc539b990ac")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /tests/CIDashboard.Data.Tests/TestDbAsyncQueryProvider.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Data.Entity.Infrastructure; 3 | using System.Linq; 4 | using System.Linq.Expressions; 5 | using System.Threading; 6 | using System.Threading.Tasks; 7 | 8 | namespace CIDashboard.Data.Tests 9 | { 10 | internal class TestDbAsyncQueryProvider : IDbAsyncQueryProvider 11 | { 12 | private readonly IQueryProvider _inner; 13 | 14 | internal TestDbAsyncQueryProvider(IQueryProvider inner) 15 | { 16 | _inner = inner; 17 | } 18 | 19 | public IQueryable CreateQuery(Expression expression) 20 | { 21 | return new TestDbAsyncEnumerable(expression); 22 | } 23 | 24 | public IQueryable CreateQuery(Expression expression) 25 | { 26 | return new TestDbAsyncEnumerable(expression); 27 | } 28 | 29 | public object Execute(Expression expression) 30 | { 31 | return _inner.Execute(expression); 32 | } 33 | 34 | public TResult Execute(Expression expression) 35 | { 36 | return _inner.Execute(expression); 37 | } 38 | 39 | public Task ExecuteAsync(Expression expression, CancellationToken cancellationToken) 40 | { 41 | return Task.FromResult(Execute(expression)); 42 | } 43 | 44 | public Task ExecuteAsync(Expression expression, CancellationToken cancellationToken) 45 | { 46 | return Task.FromResult(Execute(expression)); 47 | } 48 | } 49 | 50 | internal class TestDbAsyncEnumerable : EnumerableQuery, IDbAsyncEnumerable, IQueryable 51 | { 52 | public TestDbAsyncEnumerable(IEnumerable enumerable) 53 | : base(enumerable) 54 | { } 55 | 56 | public TestDbAsyncEnumerable(Expression expression) 57 | : base(expression) 58 | { } 59 | 60 | public IDbAsyncEnumerator GetAsyncEnumerator() 61 | { 62 | return new TestDbAsyncEnumerator(this.AsEnumerable().GetEnumerator()); 63 | } 64 | 65 | IDbAsyncEnumerator IDbAsyncEnumerable.GetAsyncEnumerator() 66 | { 67 | return GetAsyncEnumerator(); 68 | } 69 | 70 | IQueryProvider IQueryable.Provider 71 | { 72 | get { return new TestDbAsyncQueryProvider(this); } 73 | } 74 | } 75 | 76 | internal class TestDbAsyncEnumerator : IDbAsyncEnumerator 77 | { 78 | private readonly IEnumerator _inner; 79 | 80 | public TestDbAsyncEnumerator(IEnumerator inner) 81 | { 82 | _inner = inner; 83 | } 84 | 85 | public void Dispose() 86 | { 87 | _inner.Dispose(); 88 | } 89 | 90 | public Task MoveNextAsync(CancellationToken cancellationToken) 91 | { 92 | return Task.FromResult(_inner.MoveNext()); 93 | } 94 | 95 | public T Current 96 | { 97 | get { return _inner.Current; } 98 | } 99 | 100 | object IDbAsyncEnumerator.Current 101 | { 102 | get { return Current; } 103 | } 104 | } 105 | 106 | } 107 | -------------------------------------------------------------------------------- /tests/CIDashboard.Data.Tests/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /tests/CIDashboard.Data.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/CIDashboard.Domain.Tests/LocalAddin.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Core.Extensibility; 2 | 3 | namespace CIDashboard.Domain.Tests 4 | { 5 | [NUnitAddin] 6 | public class LocalAddin : Ploeh.AutoFixture.NUnit2.Addins.Addin 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /tests/CIDashboard.Domain.Tests/MappingProfiles/TeamCityProfilerTests.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using AutoMapper; 4 | using CIDashboard.Domain.Entities; 5 | using CIDashboard.Domain.MappingProfiles; 6 | using FluentAssertions; 7 | using NUnit.Framework; 8 | using Ploeh.AutoFixture; 9 | using Ploeh.AutoFixture.AutoFakeItEasy; 10 | using TeamCitySharp.DomainEntities; 11 | 12 | namespace CIDashboard.Domain.Tests.MappingProfiles 13 | { 14 | [TestFixture] 15 | public class TeamCityProfilerTests 16 | { 17 | private IFixture _fixture; 18 | 19 | [SetUp] 20 | public void Setup() 21 | { 22 | this._fixture = new Fixture() 23 | .Customize(new AutoFakeItEasyCustomization()); 24 | this._fixture.Behaviors.Remove(new ThrowingRecursionBehavior()); 25 | this._fixture.Behaviors.Add(new OmitOnRecursionBehavior()); 26 | 27 | Mapper.Initialize(cfg => cfg.AddProfile()); 28 | } 29 | 30 | [Test] 31 | public void MapsProjetsAndBuildTypesCorrectly() 32 | { 33 | var projects = _fixture 34 | .Build() 35 | .CreateMany(); 36 | 37 | var mappedResult = Mapper.Map, IEnumerable>(projects); 38 | 39 | var expectedResult = projects.Select( 40 | p => new CiProject 41 | { 42 | CiSource = CiSource.TeamCity, 43 | Id = p.Id, 44 | Name = p.Name, 45 | Url = p.WebUrl, 46 | BuildConfigs = p.BuildTypes.BuildType.Select( 47 | b => new CiBuildConfig 48 | { 49 | CiSource = CiSource.TeamCity, 50 | Id = b.Id, 51 | Name = b.Name, 52 | Url = b.WebUrl, 53 | ProjectName = b.ProjectName 54 | }) 55 | }); 56 | 57 | mappedResult.ShouldBeEquivalentTo(expectedResult); 58 | } 59 | 60 | [TestCase("SUCCESS", CiBuildResultStatus.Success)] 61 | [TestCase("FAILURE", CiBuildResultStatus.Failure)] 62 | public void MapsBuildsCorrectly(string status, CiBuildResultStatus resultStatus) 63 | { 64 | var build = _fixture 65 | .Build() 66 | .With(b => b.Status, status) 67 | .Create(); 68 | 69 | var mappedResult = Mapper.Map(build); 70 | 71 | var expectedResult = new CiBuildResult 72 | { 73 | CiSource = CiSource.TeamCity, 74 | Id = build.Id, 75 | BuildId = build.BuildType.Id, 76 | BuildName = build.BuildType.Name, 77 | Url = build.WebUrl, 78 | FinishDate = build.FinishDate, 79 | StartDate = build.StartDate, 80 | Version = build.Number, 81 | Status = resultStatus 82 | }; 83 | 84 | mappedResult.ShouldBeEquivalentTo(expectedResult); 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /tests/CIDashboard.Domain.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("CIDashboard.Domain.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("CIDashboard.Domain.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("81048bab-54c2-4cb1-81da-90da624bc3eb")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /tests/CIDashboard.Domain.Tests/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/CIDashboard.Domain.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/CIDashboard.Web.Tests/App.config: -------------------------------------------------------------------------------- 1 |  2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /tests/CIDashboard.Web.Tests/Application/InformationQueryTests.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Threading.Tasks; 4 | using AutoMapper; 5 | using CIDashboard.Data.Entities; 6 | using CIDashboard.Data.Interfaces; 7 | using CIDashboard.Domain.Entities; 8 | using CIDashboard.Domain.Services; 9 | using CIDashboard.Web.Application; 10 | using CIDashboard.Web.MappingProfiles; 11 | using FakeItEasy; 12 | using FluentAssertions; 13 | using NUnit.Framework; 14 | using Ploeh.AutoFixture; 15 | using Ploeh.AutoFixture.AutoFakeItEasy; 16 | 17 | namespace CIDashboard.Web.Tests.Application 18 | { 19 | [TestFixture] 20 | public class InformationQueryTests 21 | { 22 | private IFixture _fixture; 23 | private ICiDashboardService _ciDashboardService; 24 | private ICiServerService _ciServerService; 25 | 26 | [SetUp] 27 | public void Setup() 28 | { 29 | Mapper.Configuration.AddProfile(); 30 | 31 | _fixture = new Fixture() 32 | .Customize(new AutoFakeItEasyCustomization()); 33 | this._fixture.Behaviors.Remove(new ThrowingRecursionBehavior()); 34 | this._fixture.Behaviors.Add(new OmitOnRecursionBehavior()); 35 | 36 | _ciDashboardService = A.Fake(); 37 | _ciServerService = A.Fake(); 38 | } 39 | 40 | [Test] 41 | public async Task GetUserProjectsAndBuildConfigs_QueriesForUserProjects_AndReturnsMappedValues() 42 | { 43 | var username = _fixture.Create(); 44 | 45 | var infoQuery = new InformationQuery { CiDashboardService = this._ciDashboardService }; 46 | 47 | var projects = _fixture 48 | .CreateMany() 49 | .ToList(); 50 | 51 | A.CallTo(() => _ciDashboardService.GetProjects(username)) 52 | .Returns(projects); 53 | var mappedProjects = Mapper.Map, IEnumerable>(projects); 54 | 55 | var result = await infoQuery.GetUserProjectsAndBuildConfigs(username); 56 | 57 | A.CallTo(() => _ciDashboardService.GetProjects(username)).MustHaveHappened(); 58 | 59 | result.ShouldBeEquivalentTo(mappedProjects); 60 | } 61 | 62 | [Test] 63 | public async Task GetAllProjectBuildConfigs_QueriesForAllBuildConfigs_AndReturnsMappedValues() 64 | { 65 | var infoQuery = new InformationQuery { CiServerService = this._ciServerService }; 66 | 67 | var builds = _fixture 68 | .CreateMany() 69 | .ToList(); 70 | 71 | A.CallTo(() => _ciServerService 72 | .GetAllBuildConfigs()) 73 | .Returns(builds); 74 | var mappedBuilds = Mapper.Map, IEnumerable>(builds); 75 | 76 | var result = await infoQuery.GetAllProjectBuildConfigs(); 77 | 78 | A.CallTo(() => _ciServerService 79 | .GetAllBuildConfigs()) 80 | .MustHaveHappened(); 81 | 82 | result.ShouldBeEquivalentTo(mappedBuilds); 83 | } 84 | 85 | [Test] 86 | public async Task GetLastBuildResult_QueriesForLastBuildResult_AndReturnsMappedValues() 87 | { 88 | var infoQuery = new InformationQuery { CiServerService = this._ciServerService }; 89 | 90 | var build = _fixture 91 | .Build() 92 | .With(p => p.Id, _fixture.Create().ToString()) 93 | .Create(); 94 | 95 | A.CallTo(() => _ciServerService 96 | .LastBuildResult(build.BuildId)) 97 | .Returns(build); 98 | var mappedBuild = Mapper.Map(build); 99 | 100 | var result = await infoQuery.GetLastBuildResult(build.BuildId); 101 | 102 | A.CallTo(() => _ciServerService 103 | .LastBuildResult(build.BuildId)) 104 | .MustHaveHappened(); 105 | 106 | result.ShouldBeEquivalentTo(mappedBuild); 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /tests/CIDashboard.Web.Tests/Application/RefreshInformationTests.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Concurrent; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using AutoMapper; 6 | using CIDashboard.Data.Entities; 7 | using CIDashboard.Web.Application; 8 | using CIDashboard.Web.Application.Interfaces; 9 | using CIDashboard.Web.MappingProfiles; 10 | using FakeItEasy; 11 | using NUnit.Framework; 12 | using Ploeh.AutoFixture; 13 | using Ploeh.AutoFixture.AutoFakeItEasy; 14 | 15 | namespace CIDashboard.Web.Tests.Application 16 | { 17 | [TestFixture] 18 | public class RefreshInformationTests 19 | { 20 | private IFixture _fixture; 21 | private IConnectionsManager _connectionsManager; 22 | private IInformationQuery _infoQuery; 23 | 24 | [SetUp] 25 | public void Setup() 26 | { 27 | Mapper.Configuration.AddProfile(); 28 | 29 | _fixture = new Fixture() 30 | .Customize(new AutoFakeItEasyCustomization()); 31 | 32 | _connectionsManager = A.Fake(); 33 | _infoQuery = A.Fake(); 34 | } 35 | 36 | [Test] 37 | public async Task SendRefreshBuildResults_WithNullConnectionId_QueriesGetLastBuildResultForAllBuilds() 38 | { 39 | var buildsProj1 = _fixture 40 | .Build() 41 | .Without(p => p.Project) 42 | .CreateMany(); 43 | var buildsIds1 = buildsProj1.Select(b => b.CiExternalId) 44 | .ToList(); 45 | var buildsProj2 = _fixture 46 | .Build() 47 | .Without(p => p.Project) 48 | .CreateMany(); 49 | var buildsIds2 = buildsProj2.Select(b => b.CiExternalId) 50 | .ToList(); 51 | 52 | var buildsIds = new List(); 53 | buildsIds.AddRange(buildsIds1); 54 | buildsIds.AddRange(buildsIds2); 55 | 56 | var refreshInfo = new RefreshInformation 57 | { 58 | ConnectionsManager = _connectionsManager, 59 | InfoQuery = _infoQuery 60 | }; 61 | 62 | var buildsPerConnId = new ConcurrentDictionary>(); 63 | buildsPerConnId.AddOrUpdate(_fixture.Create(), buildsIds1, (oldkey, oldvalue) => buildsIds1); 64 | buildsPerConnId.AddOrUpdate(_fixture.Create(), buildsIds2, (oldkey, oldvalue) => buildsIds1); 65 | A.CallTo(() => _connectionsManager.BuildsPerConnId) 66 | .Returns(buildsPerConnId); 67 | 68 | var buildsToBeRefreshed = new ConcurrentDictionary(); 69 | Parallel.ForEach(buildsIds, build => buildsToBeRefreshed.TryAdd(build, build)); 70 | A.CallTo(() => _connectionsManager.BuildsToBeRefreshed) 71 | .Returns(buildsToBeRefreshed); 72 | 73 | await refreshInfo.SendRefreshBuildResults(null); 74 | 75 | foreach (var buildsId in buildsIds) 76 | { 77 | A.CallTo(() => _infoQuery.GetLastBuildResult(buildsId)) 78 | .MustHaveHappened(); 79 | } 80 | } 81 | 82 | [Test] 83 | public async Task SendRefreshBuildResults_WithConnectionId_QueriesGetLastBuildResult_OnlyForSpecificConnectionIdBuilds() 84 | { 85 | var buildsProj1 = _fixture 86 | .Build() 87 | .Without(p => p.Project) 88 | .CreateMany(); 89 | var buildsIds1 = buildsProj1.Select(b => b.CiExternalId) 90 | .ToList(); 91 | var buildsProj2 = _fixture 92 | .Build() 93 | .Without(p => p.Project) 94 | .CreateMany(); 95 | var buildsIds2 = buildsProj2.Select(b => b.CiExternalId) 96 | .ToList(); 97 | 98 | var buildsIds = new List(); 99 | buildsIds.AddRange(buildsIds1); 100 | buildsIds.AddRange(buildsIds2); 101 | 102 | var connectionId = _fixture.Create(); 103 | 104 | var refreshInfo = new RefreshInformation 105 | { 106 | ConnectionsManager = _connectionsManager, 107 | InfoQuery = _infoQuery 108 | }; 109 | 110 | var buildsPerConnId = new ConcurrentDictionary>(); 111 | buildsPerConnId.AddOrUpdate(connectionId, buildsIds1, (oldkey, oldvalue) => buildsIds1); 112 | buildsPerConnId.AddOrUpdate(_fixture.Create(), buildsIds2, (oldkey, oldvalue) => buildsIds1); 113 | A.CallTo(() => _connectionsManager.BuildsPerConnId) 114 | .Returns(buildsPerConnId); 115 | 116 | var buildsToBeRefreshed = new ConcurrentDictionary(); 117 | Parallel.ForEach(buildsIds, build => buildsToBeRefreshed.TryAdd(build, build)); 118 | A.CallTo(() => _connectionsManager.BuildsToBeRefreshed) 119 | .Returns(buildsToBeRefreshed); 120 | 121 | await refreshInfo.SendRefreshBuildResults(connectionId); 122 | 123 | foreach (var buildsId in buildsIds1) 124 | { 125 | A.CallTo(() => _infoQuery.GetLastBuildResult(buildsId)) 126 | .MustHaveHappened(); 127 | } 128 | 129 | foreach (var buildsId in buildsIds2) 130 | { 131 | A.CallTo(() => _infoQuery.GetLastBuildResult(buildsId)) 132 | .MustNotHaveHappened(); 133 | } 134 | } 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /tests/CIDashboard.Web.Tests/LocalAddin.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Core.Extensibility; 2 | 3 | namespace CIDashboard.Web.Tests 4 | { 5 | [NUnitAddin] 6 | public class LocalAddin : Ploeh.AutoFixture.NUnit2.Addins.Addin 7 | { 8 | } 9 | } -------------------------------------------------------------------------------- /tests/CIDashboard.Web.Tests/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("TeamCityDashboard.Tests")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("TeamCityDashboard.Tests")] 13 | [assembly: AssemblyCopyright("Copyright © 2015")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("f242bee9-35db-4e66-a522-a33f62d2db27")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /tests/CIDashboard.Web.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | --------------------------------------------------------------------------------