Skip to content
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
5d127de
Target net8.0 framework
rhysparry Aug 8, 2024
57c04f7
Update build configuration
rhysparry Aug 8, 2024
4f2c955
Properly restore Product.wxs file
rhysparry Aug 9, 2024
16d41b7
Avoid multiple disposal of modifiable file
rhysparry Aug 9, 2024
69d42ee
Allow restoring files without Dispose()
rhysparry Aug 9, 2024
3589fbc
Ignore duplicated files on publish
rhysparry Aug 9, 2024
3ce389d
Specify runtime identifier even for libraries
rhysparry Aug 9, 2024
cd48031
Add missing TargetFramework
rhysparry Aug 9, 2024
637bbbf
Package .NET 8 into windows installers
rhysparry Aug 9, 2024
37df7a7
Fix framework installer file naming
rhysparry Aug 9, 2024
954201c
Add mechanism to override runtime for linux tests
rhysparry Aug 13, 2024
76c2e92
Rename TARGET_RUNTIME to TARGET_FRAMEWORK
rhysparry Aug 14, 2024
2915465
Fix .NET 8 SDK installation in Linux tests
rhysparry Aug 14, 2024
57fdb86
Integration tests and runtime detection support .NET8
acodrington Aug 15, 2024
fdcf303
Update TentacleExeFinder for .NET8
acodrington Aug 19, 2024
938c64a
Disable TentacleExeFinder using .NET8 location in TeamCity (for now)
acodrington Aug 19, 2024
dfda963
TentacleBinaryCache handles .NET8 runtime
acodrington Aug 19, 2024
e6b3942
Add log debugging for OSDescription
acodrington Aug 19, 2024
079d3c2
Use .NET8 artifacts in TeamCity
acodrington Aug 20, 2024
0a1e15a
Use .NET8 builds when creating Linux packages
acodrington Aug 26, 2024
b6aa441
Update linux distros to test against
acodrington Aug 27, 2024
dcc9221
Remove .NET6 from builds
acodrington Aug 27, 2024
d2cfc09
Update Kubernetes tests to use .NET8 build
acodrington Aug 27, 2024
b6a2268
Remove .NET6 builds from CrossPlatformBundle
acodrington Aug 27, 2024
7d07082
Merge branch 'main' into sast/sc-85314/dotnet-8-targeting
michaelongso Aug 28, 2024
0f4cd3d
Can we avoid failing test from timeout for windows 2012?
michaelongso Aug 28, 2024
f85eb7f
Revert "Can we avoid failing test from timeout for windows 2012?"
michaelongso Aug 28, 2024
490d332
add configurable integration tests timeout to be used with windows2012.
michaelongso Aug 28, 2024
0fce5ae
Allowing more time before cancelling tests due to slowness from runni…
michaelongso Aug 29, 2024
e23f900
just need to trigger full rebuild
michaelongso Aug 29, 2024
fc93748
logging to trace slowness in windows 2012
michaelongso Aug 30, 2024
46caea8
set test to run serially
michaelongso Aug 30, 2024
a22283b
run a single integration test
michaelongso Aug 31, 2024
2a58ee9
use silent process runner
michaelongso Aug 31, 2024
c5d4762
Revert "use silent process runner"
michaelongso Sep 1, 2024
9f69dfd
Revert "run a single integration test"
michaelongso Sep 1, 2024
2a4a21d
Revert "set test to run serially"
michaelongso Sep 1, 2024
194f98c
Revert "just need to trigger full rebuild"
michaelongso Sep 1, 2024
c67c553
Revert "Allowing more time before cancelling tests due to slowness fr…
michaelongso Sep 2, 2024
dcbb06f
Revert "add configurable integration tests timeout to be used with wi…
michaelongso Sep 2, 2024
0f6cde4
Revert "logging to trace slowness in windows 2012"
michaelongso Sep 2, 2024
a0c7f45
Clean up after PR review
michaelongso Sep 2, 2024
940a564
Remove dotnet 6 installation
michaelongso Sep 2, 2024
e7bfa4d
Revert "Remove dotnet 6 installation"
michaelongso Sep 2, 2024
776af45
.
michaelongso Sep 2, 2024
6fcf34e
revert
michaelongso Sep 2, 2024
66617fe
Revert "revert"
michaelongso Sep 2, 2024
42fd80a
more cleanup
michaelongso Sep 2, 2024
93bde67
Revert - The change is causing massive tests failure
michaelongso Sep 2, 2024
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
69 changes: 36 additions & 33 deletions build/Build.Pack.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ partial class Build
.DependsOn(BuildOsx)
.Executes(() =>
{
RuntimeIds.Where(x => x.StartsWith("osx-")).ForEach(PackTarballs);
foreach (var runtimeId in RuntimeIds.Where(x => x.StartsWith("osx-")))
{
PackTarballs(NetCore, runtimeId);
}
});

[PublicAPI]
Expand All @@ -55,7 +58,10 @@ partial class Build
.DependsOn(BuildLinux)
.Executes(() =>
{
RuntimeIds.Where(x => x.StartsWith("linux-")).ForEach(PackTarballs);
foreach (var runtimeId in RuntimeIds.Where(x => x.StartsWith("linux-")))
{
PackTarballs(NetCore, runtimeId);
}
});

[PublicAPI]
Expand Down Expand Up @@ -106,7 +112,7 @@ void CreateLinuxPackages(string runtimeId)
"SIGN_PASSPHRASE")
.SetVolume(
$"{debBuildDir / "scripts"}:/scripts",
$"{BuildDirectory / "zip" / "net6.0" / runtimeId / "tentacle"}:/input",
$"{BuildDirectory / "zip" / NetCore / runtimeId / "tentacle"}:/input",
$"{debBuildDir / "output"}:/output"
)
.SetImage(dockerToolsContainerImage)
Expand Down Expand Up @@ -264,7 +270,7 @@ void PackWindowsInstallers(MSBuildTargetPlatform platform, AbsolutePath wixNuget
(BuildDirectory / "Octopus.Manager.Tentacle" / framework / "win").GlobFiles("*")
.ForEach(x => FileSystemTasks.CopyFileToDirectory(x, installerDirectory, FileExistsPolicy.Overwrite));
}
else if (framework == NetCoreWindows)
else if (framework is NetCoreWindows)
{
(BuildDirectory / "Tentacle" / framework / $"win-{platform}").GlobFiles("*")
.ForEach(x => FileSystemTasks.CopyFileToDirectory(x, installerDirectory, FileExistsPolicy.Overwrite));
Expand Down Expand Up @@ -333,19 +339,12 @@ void BuildMsiInstallerForPlatform(MSBuildTargetPlatform platform, AbsolutePath w
var builtMsi = RootDirectory / "installer" / "Octopus.Tentacle.Installer" / "bin" / platform / "Octopus.Tentacle.msi";
Signing.Sign(builtMsi);

string platformString;
if (framework == NetFramework)
{
platformString = platform == MSBuildTargetPlatform.x64 ? "-x64" : "";
}
else if (framework == NetCoreWindows)
var platformString = framework switch
{
platformString = $"-{NetCoreWindows}-win" + (platform == MSBuildTargetPlatform.x64 ? "-x64" : "-x86");
}
else
{
platformString = $"-{NetCore}-win" + (platform == MSBuildTargetPlatform.x64 ? "-x64" : "-x86");
}
NetFramework => platform == MSBuildTargetPlatform.x64 ? "-x64" : "",
NetCoreWindows => $"-{framework}-win" + (platform == MSBuildTargetPlatform.x64 ? "-x64" : "-x86"),
_ => $"-{framework}-win" + (platform == MSBuildTargetPlatform.x64 ? "-x64" : "-x86")
};

FileSystemTasks.MoveFile(
builtMsi,
Expand Down Expand Up @@ -467,13 +466,14 @@ string ConstructRedHatPackageFilename(string packageName, string architecture)

FileSystemTasks.CopyFile(ArtifactsDirectory / "msi" / $"Octopus.Tentacle.{FullSemVer}.msi", workingDirectory / "Octopus.Tentacle.msi");
FileSystemTasks.CopyFile(ArtifactsDirectory / "msi" / $"Octopus.Tentacle.{FullSemVer}-x64.msi", workingDirectory / "Octopus.Tentacle-x64.msi");
FileSystemTasks.CopyFile(ArtifactsDirectory / "msi" / $"Octopus.Tentacle.{FullSemVer}-net6.0-win-x86.msi", workingDirectory / "Octopus.Tentacle-net6.0-win-x86.msi");
FileSystemTasks.CopyFile(ArtifactsDirectory / "msi" / $"Octopus.Tentacle.{FullSemVer}-net6.0-win-x64.msi", workingDirectory / "Octopus.Tentacle-net6.0-win-x64.msi");
FileSystemTasks.CopyFile(ArtifactsDirectory / "msi" / $"Octopus.Tentacle.{FullSemVer}-net6.0-windows-win-x86.msi", workingDirectory / "Octopus.Tentacle-net6.0-windows-win-x86.msi");
FileSystemTasks.CopyFile(ArtifactsDirectory / "msi" / $"Octopus.Tentacle.{FullSemVer}-net6.0-windows-win-x64.msi", workingDirectory / "Octopus.Tentacle-net6.0-windows-win-x64.msi");

FileSystemTasks.CopyFile(BuildDirectory / "Octopus.Tentacle.Upgrader" / NetCore / "win-x86" / "Octopus.Tentacle.Upgrader.exe", workingDirectory / "Octopus.Tentacle.Upgrader-net6.0-win-x86.exe");
FileSystemTasks.CopyFile(BuildDirectory / "Octopus.Tentacle.Upgrader" / NetCore / "win-x64" / "Octopus.Tentacle.Upgrader.exe", workingDirectory / "Octopus.Tentacle.Upgrader-net6.0-win-x64.exe");
FileSystemTasks.CopyFile(ArtifactsDirectory / "msi" / $"Octopus.Tentacle.{FullSemVer}-net8.0-win-x86.msi", workingDirectory / "Octopus.Tentacle-net8.0-win-x86.msi");
FileSystemTasks.CopyFile(ArtifactsDirectory / "msi" / $"Octopus.Tentacle.{FullSemVer}-net8.0-win-x64.msi", workingDirectory / "Octopus.Tentacle-net8.0-win-x64.msi");
FileSystemTasks.CopyFile(ArtifactsDirectory / "msi" / $"Octopus.Tentacle.{FullSemVer}-net8.0-windows-win-x86.msi", workingDirectory / "Octopus.Tentacle-net8.0-windows-win-x86.msi");
FileSystemTasks.CopyFile(ArtifactsDirectory / "msi" / $"Octopus.Tentacle.{FullSemVer}-net8.0-windows-win-x64.msi", workingDirectory / "Octopus.Tentacle-net8.0-windows-win-x64.msi");

FileSystemTasks.CopyFile(BuildDirectory / "Octopus.Tentacle.Upgrader" / NetCore / "win-x86" / "Octopus.Tentacle.Upgrader.exe", workingDirectory / "Octopus.Tentacle.Upgrader-net8.0-win-x86.exe");
FileSystemTasks.CopyFile(BuildDirectory / "Octopus.Tentacle.Upgrader" / NetCore / "win-x64" / "Octopus.Tentacle.Upgrader.exe", workingDirectory / "Octopus.Tentacle.Upgrader-net8.0-win-x64.exe");

var octopusTentacleUpgraderDirectory = BuildDirectory / "Octopus.Tentacle.Upgrader" / NetFramework / "win";
octopusTentacleUpgraderDirectory.GlobFiles("*").ForEach(x => FileSystemTasks.CopyFileToDirectory(x, workingDirectory));
Expand Down Expand Up @@ -504,13 +504,16 @@ string ConstructRedHatPackageFilename(string packageName, string architecture)

Assert.True((workingDirectory / "Octopus.Tentacle.msi").FileExists(), "Missing Octopus.Tentacle.msi");
Assert.True((workingDirectory / "Octopus.Tentacle-x64.msi").FileExists(), "Missing Octopus.Tentacle-x64.msi");
Assert.True((workingDirectory / "Octopus.Tentacle-net6.0-win-x86.msi").FileExists(), "Missing Octopus.Tentacle-net6.0-win-x86.msi");
Assert.True((workingDirectory / "Octopus.Tentacle-net6.0-win-x64.msi").FileExists(), "Missing Octopus.Tentacle-net6.0-win-x64.msi");
Assert.True((workingDirectory / "Octopus.Tentacle-net6.0-windows-win-x86.msi").FileExists(), "Missing Octopus.Tentacle-net6.0-windows-win-x86.msi");
Assert.True((workingDirectory / "Octopus.Tentacle-net6.0-windows-win-x64.msi").FileExists(), "Missing Octopus.Tentacle-net6.0-windows-win-x64.msi");
Assert.True((workingDirectory / "Octopus.Tentacle.Upgrader.exe").FileExists(), "Missing Octopus.Tentacle.Upgrader.exe");
Assert.True((workingDirectory / "Octopus.Tentacle.Upgrader-net6.0-win-x86.exe").FileExists(), "Missing Octopus.Tentacle.Upgrader-net6.0-win-x86.exe");
Assert.True((workingDirectory / "Octopus.Tentacle.Upgrader-net6.0-win-x64.exe").FileExists(), "Missing Octopus.Tentacle.Upgrader-net6.0-win-x64.exe");
foreach (var framework in new[] {NetCore})
{
Assert.True((workingDirectory / $"Octopus.Tentacle-{framework}-win-x86.msi").FileExists(), $"Missing Octopus.Tentacle-{framework}-win-x86.msi");
Assert.True((workingDirectory / $"Octopus.Tentacle-{framework}-win-x64.msi").FileExists(), $"Missing Octopus.Tentacle-{framework}-win-x64.msi");
Assert.True((workingDirectory / $"Octopus.Tentacle-{framework}-windows-win-x86.msi").FileExists(), $"Missing Octopus.Tentacle-{framework}-windows-win-x86.msi");
Assert.True((workingDirectory / $"Octopus.Tentacle-{framework}-windows-win-x64.msi").FileExists(), $"Missing Octopus.Tentacle-{framework}-windows-win-x64.msi");
Assert.True((workingDirectory / $"Octopus.Tentacle.Upgrader-{framework}-win-x86.exe").FileExists(), $"Missing Octopus.Tentacle.Upgrader-{framework}-win-x86.exe");
Assert.True((workingDirectory / $"Octopus.Tentacle.Upgrader-{framework}-win-x64.exe").FileExists(), $"Missing Octopus.Tentacle.Upgrader-{framework}-win-x64.exe");
}
Assert.True((workingDirectory / debAmd64PackageFilename).FileExists(), $"Missing {debAmd64PackageFilename}");
Assert.True((workingDirectory / debArm64PackageFilename).FileExists(), $"Missing {debArm64PackageFilename}");
Assert.True((workingDirectory / debArm32PackageFilename).FileExists(), $"Missing {debArm32PackageFilename}");
Expand Down Expand Up @@ -540,15 +543,15 @@ string ConstructRedHatPackageFilename(string packageName, string architecture)
.DependsOn(PackContracts)
.DependsOn(PackClient);

void PackTarballs(string runtimeId)
void PackTarballs(string framework, string runtimeId)
{
(ArtifactsDirectory / "zip").CreateDirectory();

var workingDir = BuildDirectory / "zip" / NetCore / runtimeId;
var workingDir = BuildDirectory / "zip" / framework / runtimeId;
(workingDir / "tentacle").CreateDirectory();

var linuxPackagesContent = RootDirectory / "linux-packages" / "content";
var tentacleDirectory = BuildDirectory / "Tentacle" / NetCore / runtimeId;
var tentacleDirectory = BuildDirectory / "Tentacle" / framework / runtimeId;

linuxPackagesContent.GlobFiles("*")
.ForEach(x => FileSystemTasks.CopyFileToDirectory(x, workingDir / "tentacle"));
Expand All @@ -559,7 +562,7 @@ void PackTarballs(string runtimeId)
workingDir,
"tentacle",
ArtifactsDirectory / "zip",
$"tentacle-{FullSemVer}-{NetCore}-{runtimeId}.tar.gz");
$"tentacle-{FullSemVer}-{framework}-{runtimeId}.tar.gz");
}

void BuildAndPushOrLoadKubernetesTentacleContainerImage(bool push, bool load, string? host = null, bool includeDebugger = false)
Expand Down Expand Up @@ -627,4 +630,4 @@ string GetMicrok8sIpAddress()
{ "linux-arm64", ("arm64", "arm64") },
{ "linux-arm", ("armhf", "armv7") }
};
}
}
6 changes: 1 addition & 5 deletions build/Build.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,7 @@ void RunLinuxPackageTestsFor(TestConfigurationOnLinuxDistribution testConfigurat
new TestConfigurationOnLinuxDistribution(NetCore, "linux-x64", "ubuntu:focal", "deb"), // 20.04
new TestConfigurationOnLinuxDistribution(NetCore, "linux-x64", "ubuntu:bionic", "deb"), // 18.04
new TestConfigurationOnLinuxDistribution(NetCore, "linux-x64", "ubuntu:xenial", "deb"), // 16.04
new TestConfigurationOnLinuxDistribution(NetCore, "linux-x64", "ubuntu:trusty", "deb"), // 14.04
new TestConfigurationOnLinuxDistribution(NetCore, "linux-x64", "centos:7", "rpm"),
// new TestConfigurationOnLinuxDistribution(NetCore, "linux-x64", "fedora:latest", "rpm"), // Fedora 36 doesn't support netcore, related https://github.com/dotnet/core/issues/7467 (there is no issue for Fedora 36)
new TestConfigurationOnLinuxDistribution(NetCore, "linux-x64", "fedora:35", "rpm"),
new TestConfigurationOnLinuxDistribution(NetCore, "linux-x64", "roboxes/rhel7", "rpm"),
new TestConfigurationOnLinuxDistribution(NetCore, "linux-x64", "fedora:39", "rpm"),
Copy link
Contributor

@michaelongso michaelongso Sep 2, 2024

Choose a reason for hiding this comment

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

ℹ️ The removal here is validated against the public doc on the supported Linux distro.

new TestConfigurationOnLinuxDistribution(NetCore, "linux-x64", "roboxes/rhel8", "rpm"),
};

Expand Down
19 changes: 13 additions & 6 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public Build()
readonly AbsolutePath TestDirectory = RootDirectory / "_test";

const string NetFramework = "net48";
const string NetCore = "net6.0";
const string NetCoreWindows = "net6.0-windows";
const string NetCore = "net8.0";
const string NetCoreWindows = "net8.0-windows";

IEnumerable<string> RuntimeIds => SpecificRuntimeId != null
? new[] { SpecificRuntimeId }
Expand Down Expand Up @@ -206,7 +206,10 @@ public Build()
using var productWxsFile = UpdateMsiProductVersion();

RuntimeIds.Where(x => x.StartsWith("linux-"))
.ForEach(runtimeId => RunBuildFor(NetCore, runtimeId));
.ForEach(runtimeId =>
{
RunBuildFor(NetCore, runtimeId);
});

versionInfoFile.Dispose();
productWxsFile.Dispose();
Expand All @@ -222,7 +225,10 @@ public Build()
using var productWxsFile = UpdateMsiProductVersion();

RuntimeIds.Where(x => x.StartsWith("osx-"))
.ForEach(runtimeId => RunBuildFor(NetCore, runtimeId));
.ForEach(runtimeId =>
{
RunBuildFor(NetCore, runtimeId);
});

versionInfoFile.Dispose();
productWxsFile.Dispose();
Expand Down Expand Up @@ -288,6 +294,7 @@ ModifiableFileWithRestoreContentsOnDispose ModifyTemplatedVersionAndProductFiles
ModifiableFileWithRestoreContentsOnDispose UpdateMsiProductVersion()
{
var productWxsFilePath = RootDirectory / "installer" / "Octopus.Tentacle.Installer" / "Product.wxs";
var productWxsFile = new ModifiableFileWithRestoreContentsOnDispose(productWxsFilePath);
Copy link
Contributor

Choose a reason for hiding this comment

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

ℹ️ We made a modification to this file before its creation. Now, we made sure it is created so we can capture the modification.


var xmlDoc = new XmlDocument();
xmlDoc.Load(productWxsFilePath);
Expand All @@ -305,7 +312,7 @@ ModifiableFileWithRestoreContentsOnDispose UpdateMsiProductVersion()

xmlDoc.Save(productWxsFilePath);

return new ModifiableFileWithRestoreContentsOnDispose(productWxsFilePath);
return productWxsFile;
}

void RunBuildFor(string framework, string runtimeId)
Expand Down Expand Up @@ -342,4 +349,4 @@ void TarGZipCompress(AbsolutePath inputDirectory, string fileSpec, AbsolutePath
}

public static int Main() => Execute<Build>(x => x.Default);
}
}
11 changes: 11 additions & 0 deletions build/ModifiableFileWithRestoreContentsOnDispose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class ModifiableFileWithRestoreContentsOnDispose : IDisposable
public readonly AbsolutePath FilePath;
readonly string OriginalFileText;
string FileText;
bool disposed = false;

public ModifiableFileWithRestoreContentsOnDispose(AbsolutePath filePath)
{
Expand All @@ -20,6 +21,16 @@ public ModifiableFileWithRestoreContentsOnDispose(AbsolutePath filePath)
}

public void Dispose()
{
if (disposed)
{
return;
}
disposed = true;
RestoreContents();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ Make sure we only restore the file contents once.

}

public void RestoreContents()
{
Log.Information($"Restoring file {FilePath}");
File.WriteAllText(FilePath, OriginalFileText);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $SCRIPT_DIR/setup-vm-agent.sh

source $SCRIPT_DIR/set-dotnet-envvars.sh

itdll=`pwd`/build/outputs/integrationtests/net6.0/linux-x64/Octopus.Tentacle.Tests.Integration.dll
itdll=`pwd`/build/outputs/integrationtests/${TARGET_FRAMEWORK:-net8.0}/linux-x64/Octopus.Tentacle.Tests.Integration.dll
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ If $TARGET_FRAMEWORK is not set, it will default to net8.0



# We don't care about the exit code of dotnet test and instead depend on tests passing.
Expand Down
14 changes: 12 additions & 2 deletions build/test-scripts/integration/common/setup-vm-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,15 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

source $SCRIPT_DIR/dotnet-install.sh
# We install the 8.0 sdk and also the 6.0 runtime as the tests require it
install_dotnet --runtime 6.0 --sdk 8.0

if [ "${TARGET_FRAMEWORK:-net6.0}" == "net6.0" ]; then
# We install the 8.0 sdk and also the 6.0 runtime as the tests require it
install_dotnet --runtime 6.0 --sdk 8.0
elif [ "${TARGET_FRAMEWORK:-net6.0}" == "net8.0" ]; then
# Only the 8.0 sdk is required
install_dotnet --sdk 8.0
else
echo "WARNING: Unknown TARGET_FRAMEWORK: ${TARGET_FRAMEWORK:-net6.0}" 1>&2
# We install the 8.0 sdk and also the 6.0 runtime as the tests may require it
install_dotnet --runtime 6.0 --sdk 8.0
fi
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We probably want to look into this to only do a one line change as we only need the 8.0 sdk and not the 6.0 runtime.

I.e.

install_dotnet --sdk 8.0

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $SCRIPT_DIR/common/setup-vm-agent.sh

source $SCRIPT_DIR/common/set-dotnet-envvars.sh

itdll=`pwd`/build/outputs/integrationtests/net6.0/linux-x64/Octopus.Tentacle.Kubernetes.Tests.Integration.dll
itdll=`pwd`/build/outputs/integrationtests/net8.0/linux-x64/Octopus.Tentacle.Kubernetes.Tests.Integration.dll
Copy link
Contributor Author

Choose a reason for hiding this comment

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

❓ This might be worth changing to use an environment variable (like run-integration-tests-on-vm-agents.sh)



# We don't care about the exit code of dotnet test and instead depend on tests passing.
Expand All @@ -22,4 +22,4 @@ if [ "$TENTACLE_IT_WITH_SUDO" = "1" ]; then
sudo -E env PATH=$PATH dotnet vstest $itdll "/testcasefilter:TestCategory!=TentacleBackwardsCompatibility" /logger:logger://teamcity /TestAdapterPath:/opt/TeamCity/BuildAgent/plugins/dotnet/tools/vstest15 /logger:console;verbosity=detailed
else
dotnet vstest $itdll "/testcasefilter:TestCategory!=RequiresSudoOnLinux&TestCategory!=TentacleBackwardsCompatibility" /logger:logger://teamcity /TestAdapterPath:/opt/TeamCity/BuildAgent/plugins/dotnet/tools/vstest15 /logger:console;verbosity=detailed
fi
fi
4 changes: 4 additions & 0 deletions source/Octopus.Manager.Tentacle.Tests/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#if NET8_0_OR_GREATER
using System.Runtime.Versioning;
[assembly: SupportedOSPlatform("windows")]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Things complains about using Windows only APIs for this Windows only feature (Tentacle Manager).

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<EnableWindowsTargeting>true</EnableWindowsTargeting>
<LangVersion>9</LangVersion>
<Nullable>annotations</Nullable>
<TargetFrameworks>net48;net6.0-windows</TargetFrameworks>
<TargetFrameworks>net48;net6.0-windows;net8.0-windows</TargetFrameworks>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>

Expand All @@ -26,6 +26,11 @@
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
</PropertyGroup>
</When>
<When Condition="'$(TargetFramework)' == 'net8.0-windows'">
<PropertyGroup>
<RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers>
</PropertyGroup>
</When>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ℹ️ This was copied as it was clearer than adding a more complex condition

</Choose>

<ItemGroup>
Expand Down
Loading