Skip to content

Commit

Permalink
Merge pull request #75 from OctopusDeploy/feature-autochannel
Browse files Browse the repository at this point in the history
Autochannel feature
  • Loading branch information
michaelnoonan committed May 9, 2016
2 parents 31899cd + 774b28b commit 249c287
Show file tree
Hide file tree
Showing 20 changed files with 1,016 additions and 651 deletions.
51 changes: 51 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Confused? https://help.github.com/articles/dealing-with-line-endings/
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain

*.bmp binary
*.gif binary
*.jpg binary
*.png binary

*.ascx text
*.cmd text
*.coffee text
*.config text
*.cs text diff=csharp
*.css text
*.less text
*.cshtml text
*.htm text
*.html text
*.htm text
*.js text
*.json text
*.msbuild text
*.resx text
*.ruleset text
*.Stylecop text
*.targets text
*.tt text
*.txt text
*.vb text
*.vbhtml text
*.xml text
*.xunit text

*.csproj text merge=union
*.vbproj text merge=union

*.sln text eol=crlf merge=union

*.approved.* binary
3 changes: 3 additions & 0 deletions source/Octo.exe.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String></wpf:ResourceDictionary>
71 changes: 36 additions & 35 deletions source/Octopus.Cli.Tests/Commands/CreateReleaseCommandFixture.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
using System;
using NSubstitute;
using NUnit.Framework;
using Octopus.Cli.Commands;
using Octopus.Cli.Infrastructure;
using Octopus.Cli.Tests.Helpers;
using Octopus.Cli.Util;

namespace Octopus.Cli.Tests.Commands
{
public class CreateReleaseCommandFixture : ApiCommandFixtureBase
{
CreateReleaseCommand createReleaseCommand;
IPackageVersionResolver versionResolver;

[SetUp]
public void SetUp()
{
versionResolver = Substitute.For<IPackageVersionResolver>();
}

[Test]
public void ShouldLoadOptionsFromFile()
{
createReleaseCommand = new CreateReleaseCommand(RepositoryFactory, Log, new OctopusPhysicalFileSystem(Log), versionResolver);

Assert.Throws<CouldNotFindException>(delegate {
createReleaseCommand.Execute("--configfile=Commands/Resources/CreateRelease.config.txt");
});

Assert.AreEqual("Test Project", createReleaseCommand.ProjectName);
Assert.AreEqual("1.0.0", createReleaseCommand.VersionNumber);
Assert.AreEqual("Test config file.", createReleaseCommand.ReleaseNotes);
}
}
using NSubstitute;
using NUnit.Framework;
using Octopus.Cli.Commands;
using Octopus.Cli.Infrastructure;
using Octopus.Cli.Tests.Helpers;
using Octopus.Cli.Util;

namespace Octopus.Cli.Tests.Commands
{
public class CreateReleaseCommandFixture : ApiCommandFixtureBase
{
CreateReleaseCommand createReleaseCommand;
IPackageVersionResolver versionResolver;
IReleasePlanBuilder releasePlanBuilder;

[SetUp]
public void SetUp()
{
versionResolver = Substitute.For<IPackageVersionResolver>();
releasePlanBuilder = Substitute.For<IReleasePlanBuilder>();
}

[Test]
public void ShouldLoadOptionsFromFile()
{
createReleaseCommand = new CreateReleaseCommand(RepositoryFactory, Log, new OctopusPhysicalFileSystem(Log), versionResolver, releasePlanBuilder);

Assert.Throws<CouldNotFindException>(delegate {
createReleaseCommand.Execute("--configfile=Commands/Resources/CreateRelease.config.txt");
});

Assert.AreEqual("Test Project", createReleaseCommand.ProjectName);
Assert.AreEqual("1.0.0", createReleaseCommand.VersionNumber);
Assert.AreEqual("Test config file.", createReleaseCommand.ReleaseNotes);
}
}
}
250 changes: 125 additions & 125 deletions source/Octopus.Cli.Tests/Octopus.Cli.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,126 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B05E3858-5607-46DB-876C-4E1F5728A4BB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Octopus.Cli.Tests</RootNamespace>
<AssemblyName>Octopus.Cli.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Octopus.Client, Version=3.3.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Client.3.3.9\lib\net40\Octopus.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="NSubstitute">
<HintPath>..\packages\NSubstitute.1.7.2.0\lib\NET40\NSubstitute.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Solution Items\SolutionInfo.cs">
<Link>Properties\SolutionInfo.cs</Link>
</Compile>
<Compile Include="..\Solution Items\VersionInfo.cs">
<Link>Properties\VersionInfo.cs</Link>
</Compile>
<Compile Include="Client\OctopusSessionFactoryFixture.cs" />
<Compile Include="Commands\ApiCommandFixture.cs" />
<Compile Include="Commands\ApiCommandFixtureBase.cs" />
<Compile Include="Commands\CleanEnvironmentCommandFixture.cs" />
<Compile Include="Commands\CreateChannelCommandFixture.cs" />
<Compile Include="Commands\DeployReleaseCommandTestFixture.cs" />
<Compile Include="Commands\DummyApiCommand.cs" />
<Compile Include="Commands\ListMachinesCommandFixture.cs" />
<Compile Include="Commands\ListEnvironmentsCommandFixture.cs" />
<Compile Include="Commands\ListProjectsCommandFixture.cs" />
<Compile Include="Commands\ListReleasesCommandFixture.cs" />
<Compile Include="Commands\PackageVersionResolverFixture.cs" />
<Compile Include="Commands\HelpCommandFixture.cs" />
<Compile Include="Commands\OptionsFixture.cs" />
<Compile Include="Commands\CreateReleaseCommandFixture.cs" />
<Compile Include="Commands\SpeakCommand.cs" />
<Compile Include="Extensions\TimeSpanExtensionsFixture.cs" />
<Compile Include="Helpers\TestCommandExtensions.cs" />
<Compile Include="Util\UriExtensionsFixture.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Octopus.Cli\Octopus.Cli.csproj">
<Project>{D1BFD88F-FB8E-49EC-968F-F4D9A8A52519}</Project>
<Name>OctopusTools</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<Content Include="Commands\Resources\CreateRelease.config.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\GitVersionTask.3.3.0\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.3.0\build\dotnet\GitVersionTask.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\GitVersionTask.3.3.0\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.3.0\build\dotnet\GitVersionTask.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{B05E3858-5607-46DB-876C-4E1F5728A4BB}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Octopus.Cli.Tests</RootNamespace>
<AssemblyName>Octopus.Cli.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net">
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nunit.framework">
<HintPath>..\packages\NUnit.2.6.3\lib\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Octopus.Client, Version=3.3.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Client.3.3.9\lib\net40\Octopus.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Net" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="NSubstitute">
<HintPath>..\packages\NSubstitute.1.7.2.0\lib\NET40\NSubstitute.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Solution Items\SolutionInfo.cs">
<Link>Properties\SolutionInfo.cs</Link>
</Compile>
<Compile Include="..\Solution Items\VersionInfo.cs">
<Link>Properties\VersionInfo.cs</Link>
</Compile>
<Compile Include="Client\OctopusSessionFactoryFixture.cs" />
<Compile Include="Commands\ApiCommandFixture.cs" />
<Compile Include="Commands\ApiCommandFixtureBase.cs" />
<Compile Include="Commands\CleanEnvironmentCommandFixture.cs" />
<Compile Include="Commands\CreateChannelCommandFixture.cs" />
<Compile Include="Commands\DeployReleaseCommandTestFixture.cs" />
<Compile Include="Commands\DummyApiCommand.cs" />
<Compile Include="Commands\ListMachinesCommandFixture.cs" />
<Compile Include="Commands\ListEnvironmentsCommandFixture.cs" />
<Compile Include="Commands\ListProjectsCommandFixture.cs" />
<Compile Include="Commands\ListReleasesCommandFixture.cs" />
<Compile Include="Commands\PackageVersionResolverFixture.cs" />
<Compile Include="Commands\HelpCommandFixture.cs" />
<Compile Include="Commands\OptionsFixture.cs" />
<Compile Include="Commands\CreateReleaseCommandFixture.cs" />
<Compile Include="Commands\SpeakCommand.cs" />
<Compile Include="Extensions\TimeSpanExtensionsFixture.cs" />
<Compile Include="Helpers\TestCommandExtensions.cs" />
<Compile Include="Util\UriExtensionsFixture.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Octopus.Cli\Octopus.Cli.csproj">
<Project>{D1BFD88F-FB8E-49EC-968F-F4D9A8A52519}</Project>
<Name>OctopusTools</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<Content Include="Commands\Resources\CreateRelease.config.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\GitVersionTask.3.3.0\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.3.0\build\dotnet\GitVersionTask.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\GitVersionTask.3.3.0\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.3.0\build\dotnet\GitVersionTask.targets'))" />
</Target>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
Loading

0 comments on commit 249c287

Please sign in to comment.