Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions OctopusProjectBuilder.Console/OctopusProjectBuilder.Console.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OctopusProjectBuilder.Console</RootNamespace>
<AssemblyName>OctopusProjectBuilder.Console</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -52,14 +53,24 @@
<HintPath>..\packages\NuGet.Versioning.3.4.3\lib\net45\NuGet.Versioning.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Octopus.Client, Version=4.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Client.4.0.1\lib\net45\Octopus.Client.dll</HintPath>
<Private>True</Private>
<Reference Include="Octopus.Client, Version=4.27.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Client.4.27.2\lib\net451\Octopus.Client.dll</HintPath>
</Reference>
<Reference Include="Octopus.Client.Extensibility, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Octopus.Client.Extensibility.3.0.1\lib\netstandard1.2\Octopus.Client.Extensibility.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.ComponentModel.Primitives, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.ComponentModel.Primitives.4.3.0\lib\net45\System.ComponentModel.Primitives.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.3.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
</Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
Expand All @@ -76,6 +87,7 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
Expand Down
14 changes: 14 additions & 0 deletions OctopusProjectBuilder.Console/app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.ComponentModel.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
38 changes: 36 additions & 2 deletions OctopusProjectBuilder.Console/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,42 @@
<package id="Common.Logging" version="3.3.1" targetFramework="net45" />
<package id="Common.Logging.Core" version="3.3.1" targetFramework="net45" />
<package id="FluentCommandLineParser" version="1.4.3" targetFramework="net45" />
<package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net452" />
<package id="NETStandard.Library" version="1.6.1" targetFramework="net452" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
<package id="NuGet.Versioning" version="3.4.3" targetFramework="net45" />
<package id="Octopus.Client" version="4.0.1" targetFramework="net45" />
<package id="System.Net.Http" version="4.1.0" targetFramework="net45" />
<package id="Octopus.Client" version="4.27.2" targetFramework="net452" />
<package id="Octopus.Client.Extensibility" version="3.0.1" targetFramework="net452" />
<package id="System.Collections" version="4.3.0" targetFramework="net452" />
<package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net452" />
<package id="System.ComponentModel.Annotations" version="4.3.0" targetFramework="net452" />
<package id="System.ComponentModel.Primitives" version="4.3.0" targetFramework="net452" />
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net452" />
<package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net452" />
<package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net452" />
<package id="System.Globalization" version="4.3.0" targetFramework="net452" />
<package id="System.IO" version="4.3.0" targetFramework="net452" />
<package id="System.IO.Compression" version="4.3.0" targetFramework="net452" />
<package id="System.Linq" version="4.3.0" targetFramework="net452" />
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net452" />
<package id="System.Net.Http" version="4.3.0" targetFramework="net452" />
<package id="System.Net.Primitives" version="4.3.0" targetFramework="net452" />
<package id="System.ObjectModel" version="4.3.0" targetFramework="net452" />
<package id="System.Reflection" version="4.3.0" targetFramework="net452" />
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net452" />
<package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net452" />
<package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net452" />
<package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net452" />
<package id="System.Text.Encoding" version="4.3.0" targetFramework="net452" />
<package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net452" />
<package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net452" />
<package id="System.Threading" version="4.3.0" targetFramework="net452" />
<package id="System.Threading.Tasks" version="4.3.0" targetFramework="net452" />
<package id="System.Threading.Timer" version="4.3.0" targetFramework="net452" />
<package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net452" />
<package id="System.Xml.XDocument" version="4.3.0" targetFramework="net452" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OctopusProjectBuilder.DocGen</RootNamespace>
<AssemblyName>OctopusProjectBuilder.DocGen</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
Expand Down
5 changes: 4 additions & 1 deletion OctopusProjectBuilder.DocGen/app.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OctopusProjectBuilder.Model</RootNamespace>
<AssemblyName>OctopusProjectBuilder.Model</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand Down Expand Up @@ -62,7 +63,8 @@
<Compile Include="Phase.cs" />
<Compile Include="Project.cs" />
<Compile Include="ProjectTrigger.cs" />
<Compile Include="ProjectTriggerProperties.cs" />
<Compile Include="ProjectTriggerAutoDeployAction.cs" />
<Compile Include="ProjectTriggerMachineFilter.cs" />
<Compile Include="PropertyValue.cs" />
<Compile Include="RetentionPolicy.cs" />
<Compile Include="SystemModel.cs" />
Expand All @@ -73,6 +75,7 @@
<Compile Include="TagSet.cs" />
<Compile Include="Team.cs" />
<Compile Include="Tenant.cs" />
<Compile Include="TenantedDeploymentMode.cs" />
<Compile Include="UserRole.cs" />
<Compile Include="Variable.cs" />
<Compile Include="VariablePrompt.cs" />
Expand Down
7 changes: 0 additions & 7 deletions OctopusProjectBuilder.Model/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@

namespace OctopusProjectBuilder.Model
{
public enum TenantedDeploymentMode
{
Untenanted,
TenantedOrUntenanted,
Tenanted
}

public class Project : IVariableSet
{
public Project(ElementIdentifier identifier, string description, bool isDisabled, bool autoCreateRelease, bool defaultToSkipIfAlreadyInstalled, DeploymentProcess deploymentProcess, IEnumerable<Variable> variables, IEnumerable<ElementReference> libraryVariableSetRefs, ElementReference lifecycleRef, ElementReference projectGroupRef, VersioningStrategy versioningStrategy, IEnumerable<ProjectTrigger> triggers, TenantedDeploymentMode tenantedDeploymentMode)
Expand Down
24 changes: 14 additions & 10 deletions OctopusProjectBuilder.Model/ProjectTrigger.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
using System;

namespace OctopusProjectBuilder.Model
{
public class ProjectTrigger
{
public enum ProjectTriggerType
public ElementIdentifier Identifier { get; }
public ProjectTriggerMachineFilter Filter { get; }
public ProjectTriggerAutoDeployAction Action { get; }

public ProjectTrigger(ElementIdentifier identifier, ProjectTriggerMachineFilter filter, ProjectTriggerAutoDeployAction action)
{
DeploymentTarget
if (identifier == null)
throw new ArgumentNullException(nameof(identifier));
Identifier = identifier;
Filter = filter;
Action = action;
}

public string Name { get; }
public ProjectTriggerType Type { get; }
public ProjectTriggerProperties Properties { get; }

public ProjectTrigger(string name, ProjectTriggerType type, ProjectTriggerProperties properties)
public override string ToString()
{
Name = name;
Type = type;
Properties = properties;
return Identifier.ToString();
}
}
}
12 changes: 12 additions & 0 deletions OctopusProjectBuilder.Model/ProjectTriggerAutoDeployAction.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace OctopusProjectBuilder.Model
{
public class ProjectTriggerAutoDeployAction
{
public ProjectTriggerAutoDeployAction(bool shouldRedeployWhenMachineHasBeenDeployedTo)
{
ShouldRedeployWhenMachineHasBeenDeployedTo = shouldRedeployWhenMachineHasBeenDeployedTo;
}

public bool ShouldRedeployWhenMachineHasBeenDeployedTo { get; }
}
}
31 changes: 31 additions & 0 deletions OctopusProjectBuilder.Model/ProjectTriggerMachineFilter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Linq;

namespace OctopusProjectBuilder.Model
{
public class ProjectTriggerMachineFilter
{
public IEnumerable<ElementReference> Environments { get; }
public IEnumerable<ElementReference> Roles { get; }
public IEnumerable<ElementReference> EventGroups { get; }
public IEnumerable<ElementReference> EventCategories { get; }

public ProjectTriggerMachineFilter(IEnumerable<ElementReference> environments, IEnumerable<ElementReference> roles, IEnumerable<ElementReference> eventGroups, IEnumerable<ElementReference> eventCategories)
{
if (environments == null)
throw new ArgumentNullException(nameof(environments));
if (roles == null)
throw new ArgumentNullException(nameof(roles));
if (eventGroups == null)
throw new ArgumentNullException(nameof(eventGroups));
if (eventCategories == null)
throw new ArgumentNullException(nameof(eventCategories));

Environments = environments.ToArray();
Roles = roles.ToArray();
EventGroups = eventGroups.ToArray();
EventCategories = eventCategories.ToArray();
}
}
}
33 changes: 0 additions & 33 deletions OctopusProjectBuilder.Model/ProjectTriggerProperties.cs

This file was deleted.

9 changes: 9 additions & 0 deletions OctopusProjectBuilder.Model/TenantedDeploymentMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace OctopusProjectBuilder.Model
{
public enum TenantedDeploymentMode
{
Untenanted,
TenantedOrUntenanted,
Tenanted
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,37 @@ namespace OctopusProjectBuilder.Uploader.Tests.Helpers
{
internal class FakeEnvironmentRepository : FakeNamedRepository<EnvironmentResource>, IEnvironmentRepository
{
public List<MachineResource> GetMachines(EnvironmentResource environment)
public List<EnvironmentResource> GetAll()
{
throw new System.NotImplementedException();
return null;
}

public void Sort(string[] environmentIdsInOrder)
public List<MachineResource> GetMachines(EnvironmentResource environment, int? skip, int? take = null, string partialName = null,
string roles = null, bool? isDisabled = false, string healthStatuses = null, string commStyles = null,
string tenantIds = null, string tenantTags = null)
{
throw new System.NotImplementedException();
return null;
}

public EnvironmentEditor CreateOrModify(string name)
public EnvironmentsSummaryResource Summary(string ids = null, string partialName = null, string machinePartialName = null,
string roles = null, bool? isDisabled = false, string healthStatuses = null, string commStyles = null,
string tenantIds = null, string tenantTags = null, bool? hideEmptyEnvironments = false)
{
throw new System.NotImplementedException();
return null;
}

public EnvironmentEditor CreateOrModify(string name, string description)
public void Sort(string[] environmentIdsInOrder)
{
throw new System.NotImplementedException();
}

public List<EnvironmentResource> GetAll()
public EnvironmentEditor CreateOrModify(string name)
{
return null;
}

public EnvironmentEditor CreateOrModify(string name, string description)
{
throw new System.NotImplementedException();
return null;
}
}
}
Loading