Skip to content

Commit 9e572ab

Browse files
committed
Remove IAuthContext
1 parent 46b0e4d commit 9e572ab

File tree

4 files changed

+7
-11
lines changed

4 files changed

+7
-11
lines changed

source/Octopus.Tentacle.Client/Scripts/Models/Builders/ExecuteKubernetesScriptCommandBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class ExecuteKubernetesScriptCommandBuilder : ExecuteScriptCommandBuilder
88
KubernetesImageConfiguration? configuration;
99
string? scriptPodServiceAccountName;
1010
bool isRawScript;
11-
IAuthContext? authContext;
11+
KubernetesAgentAuthContext? authContext;
1212

1313
public ExecuteKubernetesScriptCommandBuilder(string taskId)
1414
: base(taskId, ScriptIsolationLevel.NoIsolation) //Kubernetes Agents don't need isolation since the scripts won't clash with each other (it won't clash more than Workers anyway)
@@ -33,7 +33,7 @@ public ExecuteKubernetesScriptCommandBuilder IsRawScript()
3333
return this;
3434
}
3535

36-
public ExecuteKubernetesScriptCommandBuilder WithAuthContext(IAuthContext context)
36+
public ExecuteKubernetesScriptCommandBuilder WithAuthContext(KubernetesAgentAuthContext context)
3737
{
3838
authContext = context;
3939
return this;

source/Octopus.Tentacle.Client/Scripts/Models/ExecuteKubernetesScriptCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class ExecuteKubernetesScriptCommand : ExecuteScriptCommand
1212

1313
public bool IsRawScript { get; }
1414

15-
public IAuthContext? AuthContext { get; }
15+
public KubernetesAgentAuthContext? AuthContext { get; }
1616

1717
public ExecuteKubernetesScriptCommand(
1818
ScriptTicket scriptTicket,
@@ -25,7 +25,7 @@ public ExecuteKubernetesScriptCommand(
2525
KubernetesImageConfiguration? imageConfiguration,
2626
string? scriptPodServiceAccountName,
2727
bool isRawScript,
28-
IAuthContext? authContext)
28+
KubernetesAgentAuthContext? authContext)
2929
: base(scriptTicket, taskId, scriptBody, arguments, isolationConfiguration, additionalScripts, additionalFiles)
3030
{
3131
ImageConfiguration = imageConfiguration;

source/Octopus.Tentacle.Contracts/IAuthContext.cs renamed to source/Octopus.Tentacle.Contracts/KubernetesAgentAuthContext.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22

33
namespace Octopus.Tentacle.Contracts
44
{
5-
public interface IAuthContext
6-
{
7-
}
8-
9-
public class KubernetesAgentAuthContext : IAuthContext
5+
public class KubernetesAgentAuthContext
106
{
117
public KubernetesAgentAuthContext(string? projectSlug, string? environmentSlug, string? tenantSlug, string? stepSlug)
128
{

source/Octopus.Tentacle.Contracts/KubernetesScriptServiceV1/StartKubernetesScriptCommandV1.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public StartKubernetesScriptCommandV1(
1919
Dictionary<ScriptType, string>? additionalScripts,
2020
ScriptFile[]? additionalFiles,
2121
bool isRawScript,
22-
IAuthContext? authContext)
22+
KubernetesAgentAuthContext? authContext)
2323
{
2424
Arguments = arguments;
2525
TaskId = taskId;
@@ -61,6 +61,6 @@ public StartKubernetesScriptCommandV1(
6161

6262
public string? ScriptPodServiceAccountName { get; }
6363

64-
public IAuthContext? AuthContext { get; }
64+
public KubernetesAgentAuthContext? AuthContext { get; }
6565
}
6666
}

0 commit comments

Comments
 (0)