Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Octopus.Server.Client and remove PushMetadata command #261

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion build/_build.csproj.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/PLACE_SIMPLE_ANONYMOUSMETHOD_ON_SINGLE_LINE/@EntryValue">False</s:Boolean>
<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>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=4a98fdf6_002D7d98_002D4f5a_002Dafeb_002Dea44ad98c70c/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;Kind Name="READONLY_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f9fce829_002De6f4_002D4cb2_002D80f1_002D5497c44f51df/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -24,4 +26,5 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
4 changes: 2 additions & 2 deletions source/Octo.Tests/Commands/ListReleasesCommandFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public async Task ShouldGetListOfReleases()
Version = "1.2.3",
Assembled = DateTimeOffset.MaxValue,
ReleaseNotes = "Version controlled release notes",
VersionControlReference = new GitReferenceResource
GitReference = new SnapshotGitReferenceResource
{
GitCommit = "87a072ad2b4a2e9bf2d7ff84d8636a032786394d",
GitRef = "main"
Expand Down Expand Up @@ -124,7 +124,7 @@ public async Task JsonFormat_ShouldBeWellFormed()
Version = "1.2.3",
Assembled = DateTimeOffset.MaxValue,
ReleaseNotes = "Version controlled release notes",
VersionControlReference = new GitReferenceResource
GitReference = new SnapshotGitReferenceResource
{
GitCommit = "87a072ad2b4a2e9bf2d7ff84d8636a032786394d",
GitRef = "main"
Expand Down
11 changes: 9 additions & 2 deletions source/Octo.Tests/Octo.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@
<ProjectReference Include="..\Octo\Octo.csproj" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<NoWarn>CS0618</NoWarn>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost all the repository methods have the Obsolete warning for not using the overload with the CancellationToken

</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<NoWarn>CS0618</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Assent" Version="1.6.1" />
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Octopus.Server.Client" Version="11.6.3644" />
<PackageReference Include="Octopus.Server.MessageContracts.Base" Version="3.0.400" />
<PackageReference Include="Octopus.Server.Client" Version="14.3.1579" />
<PackageReference Include="Serilog.Sinks.TextWriter" Version="2.0.0" />
<PackageReference Include="NSubstitute" Version="4.2.1" />
<PackageReference Include="FluentAssertions" Version="4.19.4" />
Expand Down
8 changes: 4 additions & 4 deletions source/Octopus.Cli/Commands/ApiCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,10 @@ protected static IEnumerable<string> FormatReleasePropertiesAsStrings(ReleaseRes
"Package Versions: " + GetPackageVersionsAsString(release.SelectedPackages),
"Release Notes: " + GetReleaseNotes(release)
};
if (!string.IsNullOrEmpty(release.VersionControlReference?.GitRef))
releaseProperties.Add("Git Reference: " + release.VersionControlReference.GitRef);
if (!string.IsNullOrEmpty(release.VersionControlReference?.GitCommit))
releaseProperties.Add("Git Commit: " + release.VersionControlReference.GitCommit);
if (!string.IsNullOrEmpty(release.GitReference?.GitRef))
releaseProperties.Add("Git Reference: " + release.GitReference.GitRef);
if (!string.IsNullOrEmpty(release.GitReference?.GitCommit))
releaseProperties.Add("Git Commit: " + release.GitReference.GitCommit);

return releaseProperties;
}
Expand Down
71 changes: 0 additions & 71 deletions source/Octopus.Cli/Commands/Package/PushMetadataCommand.cs

This file was deleted.

6 changes: 3 additions & 3 deletions source/Octopus.Cli/Commands/Releases/CreateReleaseCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public async Task Request()
{
ReleaseNotes = ReleaseNotes,
SelectedPackages = plan.GetSelections(),
VersionControlReference = new GitReferenceResource
GitReference = new SnapshotGitReferenceResource
{
GitRef = GitReference,
GitCommit = GitCommit
Expand All @@ -195,8 +195,8 @@ public async Task Request()
.ConfigureAwait(false);

commandOutputProvider.Information("Release {Version:l} created successfully!", release.Version);
if (!string.IsNullOrEmpty(release.VersionControlReference?.GitCommit))
commandOutputProvider.Information("Release created from commit {Commit:l} of git reference {GitRef:l}.", release.VersionControlReference.GitCommit, release.VersionControlReference.GitRef);
if (!string.IsNullOrEmpty(release.GitReference?.GitCommit))
commandOutputProvider.Information("Release created from commit {Commit:l} of git reference {GitRef:l}.", release.GitReference.GitCommit, release.GitReference.GitRef);
commandOutputProvider.ServiceMessage("setParameter", new { name = "octo.releaseNumber", value = release.Version });
commandOutputProvider.TfsServiceMessage(ServerBaseUrl, project, release);

Expand Down
4 changes: 2 additions & 2 deletions source/Octopus.Cli/Commands/Releases/ListReleasesCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public void PrintJsonOutput()
r.Assembled,
PackageVersions = GetPackageVersionsAsString(r.SelectedPackages),
ReleaseNotes = GetReleaseNotes(r),
GitReference = r.VersionControlReference?.GitRef,
r.VersionControlReference?.GitCommit
GitReference = r.GitReference?.GitRef,
r.GitReference?.GitCommit
})
}));
}
Expand Down
10 changes: 9 additions & 1 deletion source/Octopus.Cli/Octopus.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@
<NoWarn>NU5104</NoWarn>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<NoWarn>NU5104;CS0618</NoWarn>
</PropertyGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<NoWarn>NU5104;CS0618</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Analyzers.Compatibility" Version="0.2.12-alpha">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -31,7 +39,7 @@
<PackageReference Include="NuGet.Packaging.Core.Types" Version="3.6.0-octopus-58692" />
<PackageReference Include="NuGet.Versioning" Version="3.6.0-octopus-58692" />
<PackageReference Include="Octopus.CommandLine" Version="0.0.112" />
<PackageReference Include="Octopus.Server.Client" Version="11.6.3644" />
<PackageReference Include="Octopus.Server.Client" Version="14.3.1579" />
<PackageReference Include="Octopus.Versioning" Version="5.1.155" />
<PackageReference Include="Octostache" Version="2.3.0" />
<PackageReference Include="Serilog.Sinks.ColoredConsole" Version="2.0.0" />
Expand Down
4 changes: 4 additions & 0 deletions source/OctopusCli.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=MethodPropertyEvent/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb"&gt;&lt;ExtraRule Prefix="" Suffix="" Style="AaBb_AaBb" /&gt;&lt;/Policy&gt;</s:String>
<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>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=4a98fdf6_002D7d98_002D4f5a_002Dafeb_002Dea44ad98c70c/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Instance" AccessRightKinds="Private" Description="Instance fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;Kind Name="READONLY_FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=f9fce829_002De6f4_002D4cb2_002D80f1_002D5497c44f51df/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static" AccessRightKinds="Private" Description="Static fields (private)"&gt;&lt;ElementKinds&gt;&lt;Kind Name="FIELD" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FFUNCTION/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb"&gt;&lt;ExtraRule Prefix="" Suffix="" Style="AaBb" /&gt;&lt;/Policy&gt;</s:String>
<s:Boolean x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=51E37CF4DE77F64A830378E926DCF3FE/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/Environment/InjectedLayers/FileInjectedLayer/=51E37CF4DE77F64A830378E926DCF3FE/AbsolutePath/@EntryValue">F:\OctopusGit\OctopusDeploy\source\Octopus.sln.DotSettings</s:String>
Expand All @@ -211,11 +213,13 @@
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpRenamePlacementToArrangementMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002EMemberReordering_002EMigrations_002ECSharpFileLayoutPatternRemoveIsAttributeUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002ECSharpPlaceAttributeOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EPredefinedNamingRulesToUserRulesUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EXml_002ECodeStyle_002EFormatSettingsUpgrade_002EXmlMoveToCommonFormatterSettingsUpgrade/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Environment/UnitTesting/SaveSessionState/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/Environment/UnitTesting/ShadowCopy/@EntryValue">False</s:Boolean>
Expand Down