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

Include version in log output #930

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Octopus.Tentacle.Contracts.KubernetesScriptServiceV1;
using Octopus.Tentacle.Contracts.KubernetesScriptServiceV1Alpha;
using Octopus.Tentacle.Contracts.ScriptServiceV2;
using Octopus.Tentacle.Properties;
using Octopus.Tentacle.Util;

namespace Octopus.Tentacle.Services.Capabilities
Expand All @@ -17,14 +18,16 @@ public async Task<CapabilitiesResponseV2> GetCapabilitiesAsync(CancellationToken
{
await Task.CompletedTask;

var versionInformation = $"Tentacle_Version_{OctopusTentacle.InformationalVersion}";

//the kubernetes agent only supports the kubernetes script services
if (PlatformDetection.Kubernetes.IsRunningAsKubernetesAgent)
{
return new CapabilitiesResponseV2(new List<string> { nameof(IFileTransferService), nameof(IKubernetesScriptServiceV1Alpha), nameof(IKubernetesScriptServiceV1) });
return new CapabilitiesResponseV2(new List<string> { nameof(IFileTransferService), nameof(IKubernetesScriptServiceV1Alpha), nameof(IKubernetesScriptServiceV1), versionInformation });
}

//non-kubernetes agent tentacles only support the standard script services
return new CapabilitiesResponseV2(new List<string> { nameof(IScriptService), nameof(IFileTransferService), nameof(IScriptServiceV2) });
return new CapabilitiesResponseV2(new List<string> { nameof(IScriptService), nameof(IFileTransferService), nameof(IScriptServiceV2), versionInformation });
}
}
}