-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ab418e
commit 1807df0
Showing
10 changed files
with
636 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
tests/Backend.Fx.Tests/Environment/VisualStudioOnline/Agent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
namespace Backend.Fx.Tests.Environment.VisualStudioOnline | ||
{ | ||
|
||
public static class Agent | ||
{ | ||
/// <summary> | ||
/// The local path on the agent where all folders for a given build definition are created. | ||
/// </summary> | ||
public static string BuildDirectory | ||
{ | ||
get { return global::System.Environment.GetEnvironmentVariable("AGENT_BUILDDIRECTORY"); } | ||
} | ||
|
||
/// <summary> | ||
/// The directory the agent is installed into. This contains the agent software. | ||
/// </summary> | ||
public static string HomeDirectory | ||
{ | ||
get { return global::System.Environment.GetEnvironmentVariable("AGENT_HOMEDIRECTORY"); } | ||
} | ||
|
||
/// <summary> | ||
/// The ID of the agent. | ||
/// </summary> | ||
public static string Id | ||
{ | ||
get { return global::System.Environment.GetEnvironmentVariable("AGENT_ID"); } | ||
} | ||
|
||
/// <summary> | ||
/// The status of the build. | ||
/// </summary> | ||
public static AgentJobStatus JobStatus | ||
{ | ||
get { return global::System.Enum.Parse<AgentJobStatus>(global::System.Environment.GetEnvironmentVariable("AGENT_JOBSTATUS") ?? "None"); } | ||
} | ||
|
||
/// <summary> | ||
/// The name of the machine on which the agent is installed. | ||
/// </summary> | ||
public static string MachineName | ||
{ | ||
get { return global::System.Environment.GetEnvironmentVariable("AGENT_MACHINENAME"); } | ||
} | ||
|
||
/// <summary> | ||
/// The name of the agent that is registered with the pool. | ||
/// If you are using an on-premises agent, this directory is specified by you. | ||
/// </summary> | ||
public static string Name | ||
{ | ||
get { return global::System.Environment.GetEnvironmentVariable("AGENT_NAME"); } | ||
} | ||
|
||
/// <summary> | ||
/// The working directory for this agent. For example: c:\agent\_work. | ||
/// </summary> | ||
public static string WorkFolder | ||
{ | ||
get { return global::System.Environment.GetEnvironmentVariable("AGENT_WORKFOLDER"); } | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
tests/Backend.Fx.Tests/Environment/VisualStudioOnline/AgentJobStatus.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace Backend.Fx.Tests.Environment | ||
{ | ||
public enum AgentJobStatus | ||
{ | ||
None, | ||
Canceled, | ||
Failed, | ||
Succeeded, | ||
|
||
/// <summary> | ||
/// partially successful | ||
/// </summary> | ||
SucceededWithIssues | ||
} | ||
} |
Oops, something went wrong.