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

Add Red Hat based distros to supported list #4946

Merged
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
8 changes: 8 additions & 0 deletions src/Agent.Listener/net8.json
ismayilov-ismayil marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
}
]
},
{
"id": "ol",
"versions": [
{
"name": "8+"
}
]
},
{
"id": "macOS",
"versions": [
Expand Down
29 changes: 16 additions & 13 deletions src/Agent.Worker/JobExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,27 @@ public async Task<List<IStep>> InitializeJob(IExecutionContext jobContext, Pipel

PackageVersion agentVersion = new PackageVersion(BuildConstants.AgentPackage.Version);

// Check if a system supports .NET 8
try
if (!AgentKnobs.Net8UnsupportedOsWarning.GetValue(context).AsBoolean())
{
Trace.Verbose("Checking if your system supports .NET 8");
// Check if a system supports .NET 8
try
{
Trace.Verbose("Checking if your system supports .NET 8");

// Check version of the system
if (!await PlatformUtil.IsNetVersionSupported("net8"))
// Check version of the system
if (!await PlatformUtil.IsNetVersionSupported("net8"))
{
string systemId = PlatformUtil.GetSystemId();
SystemVersion systemVersion = PlatformUtil.GetSystemVersion();
context.Warning(StringUtil.Loc("UnsupportedOsVersionByNet8", $"{systemId} {systemVersion}"));
}
}
catch (Exception ex)
{
string systemId = PlatformUtil.GetSystemId();
SystemVersion systemVersion = PlatformUtil.GetSystemVersion();
context.Warning(StringUtil.Loc("UnsupportedOsVersionByNet8", $"{systemId} {systemVersion}"));
Trace.Error($"Error has occurred while checking if system supports .NET 8: {ex}");
context.Warning(ex.Message);
}
}
catch (Exception ex)
{
Trace.Error($"Error has occurred while checking if system supports .NET 8: {ex}");
context.Warning(ex.Message);
}

// Set agent version variable.
context.SetVariable(Constants.Variables.Agent.Version, BuildConstants.AgentPackage.Version);
Expand Down
Loading