Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4678563
+semver: major (#1664)
APErebus Nov 21, 2025
8718b2e
Merge remote-tracking branch 'origin/release/2025.4' into tmm/fwd_merge
rain-on Nov 24, 2025
b481c84
Merge pull request #1665 from OctopusDeploy/tmm/fwd_merge
rain-on Nov 25, 2025
97f59b9
Set XDG_CACHE_HOME per Powershell invocation to avoid corrupt Startup…
grace-rehn Nov 26, 2025
08831e5
Merge remote-tracking branch 'origin/release/2025.4' into frank/merge
flin-8 Nov 27, 2025
31a4a85
Argo CD: Fix missing output variables on manifest step (#1666) (#1671)
flin-8 Nov 27, 2025
83eaeed
Add error logging for resource status check kubectl commands (#1670)
sathvikkumar-octo Nov 28, 2025
0def0d4
Merge remote-tracking branch 'origin/release/2025.4' into frank/merge
flin-8 Dec 1, 2025
bb9a383
Merge pull request #1674 Merge 2025.4 to main
flin-8 Dec 1, 2025
01f1ff2
Merge branch 'release/2025.4' into mergebot/from-release-2025.4-to-ma…
Octobob Dec 1, 2025
895c181
Merge pull request #1677 from OctopusDeploy/mergebot/from-release-202…
Octobob Dec 1, 2025
4b8ef8d
Merge branch 'release/2025.4' into mergebot/from-release-2025.4-to-ma…
Octobob Dec 1, 2025
f5d0709
Merge pull request #1679 from OctopusDeploy/mergebot/from-release-202…
Octobob Dec 1, 2025
d13d35c
Upgrade to .NET 8.0 (#1528)
APErebus Dec 4, 2025
3c7afe4
Exclude the dotnet install folder when scanning for *.deps.json (#1680)
matt-richardson Dec 4, 2025
eff2301
Rework how .NET 8 SDK is installed and also fix a number of other tes…
APErebus Dec 7, 2025
1c12b86
Add lsof command if we detect a potential file handle open (#1683)
LukeButters Dec 8, 2025
9bcf165
Merge branch 'release/2025.4' into mergebot/from-release-2025.4-to-ma…
Octobob Dec 9, 2025
eb0a7be
Merge pull request #1688 from OctopusDeploy/mergebot/from-release-202…
Octobob Dec 9, 2025
16092b4
Add support for TeamCity parallel tests (#1687)
APErebus Dec 10, 2025
c8515e5
Consolidate test settings into single builder (#1689)
APErebus Dec 10, 2025
bf3587d
Merge pull request #1696 from OctopusDeploy/frank/e2e
flin-8 Dec 17, 2025
ef8788a
Prevent Plugin source type from crashing manifest parsing
flin-8 Dec 24, 2025
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Option 1 is recommended if you can use the default worker.

#### Drawbacks:
- It takes ~10 minutes to build and pack Calamari, however you can reduce this significantly by targeting a specific runtime/framework if you don't need the rest
- eg `./build-local.sh -y --framework "net6.0" --runtime "linux-x64"` (note that consolidation tests will not run when targeting a specific runtime)
- eg `./build-local.sh -y --framework "net8.0" --runtime "linux-x64"` (note that consolidation tests will not run when targeting a specific runtime)
- You need to restart Server for Calamari changes to take effect

### Bonus Variables!
Expand Down
4 changes: 2 additions & 2 deletions build-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ StartMessage="${Green}\
║ This script is intended to only be run locally and not in CI. ║
║ ║
║ If something unexpected is happening in your build or Calamari changes you may want to run ║
║ the full build by running ./build.ps1 and check again as something in the optimizations here ║
║ the full build by running ./build.sh and check again as something in the optimizations here ║
║ ║
║ might have caused an issue. ║
╬════════════════════════════════════════════════════════════════════════════════════════════════╬\
Expand All @@ -51,7 +51,7 @@ WarningMessage="${Yellow}\
║ WARNING: ║
║ Building Calamari on a non-windows machine will result ║
║ in Calmari and Calamari.Cloud nuget packages being ║
║ built against net6.0. This means that some ║
║ built against net8.0. This means that some ║
║ steps may not work as expected because they require a ║
║ .Net Framework compatible Calamari Nuget Package. ║
╬════════════════════════════════════════════════════════╬\
Expand Down
36 changes: 34 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,49 @@ else {
}
}

# ----- Octopus Deploy Modification -----
#
# The default behaviour of the Nuke Bootstrapper (when .NET is not already preinstalled) is
# to read from the global.json, then install that exact version. It doesn't roll forward.
# This means that if our global.json says 8.0.100, and the latest version is 8.0.200, it will
# always install 8.0.100 and we will not pick up any security or bug fixes that 8.0.200 carries.
#
# This means we would need to manually update our global.json file every time there is a new
# .NET SDK available, and then all developers would need to immediately install this on their machines.
#
# In our builds, we want the same "automatic roll-forward" behaviour that we get when we use the dotnet/sdk:8.0 docker
# images -- where we always get the latest patch version of the SDK without manual intervention.
#
# We achieve this with a small tweak to the Nuke bootstrapper to tell it to install the latest version from
# the 8.0 channel, regardless of what's in the global.json.

Remove-Variable DotNetVersion
$DotNetChannel = "8.0"
# ----- End Octopus Deploy Modification -----

# Install by channel or version
$DotNetDirectory = "$TempDirectory\dotnet-win"
if (!(Test-Path variable:DotNetVersion)) {
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel }
} else {
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion }
}
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"

# ----- Octopus Deploy Modification -----
# Update the path with the temporary dotnet exe so it can be found by anything be run out of this shell
$env:PATH = "$($env:Path);$DotNetDirectory"
# We update the global path
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
Write-Output "Updating Path variable to $($env:PATH)"
# ----- End Octopus Deploy Modification -----
}

Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"

ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }




29 changes: 27 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,40 @@ else
unset DOTNET_VERSION
fi
fi

# ----- Octopus Deploy Modification -----
#
# The default behaviour of the Nuke Bootstrapper (when .NET is not already preinstalled) is
# to read from the global.json, then install that exact version. It doesn't roll forward.
# This means that if our global.json says 8.0.100, and the latest version is 8.0.200, it will
# always install 8.0.100 and we will not pick up any security or bug fixes that 8.0.200 carries.
#
# This means we would need to manually update our global.json file every time there is a new
# .NET SDK available, and then all developers would need to immediately install this on their machines.
#
# In our builds, we want the same "automatic roll-forward" behaviour that we get when we use the dotnet/sdk:8.0 docker
# images -- where we always get the latest patch version of the SDK without manual intervention.
#
# We achieve this with a small tweak to the Nuke bootstrapper to tell it to install the latest version from
# the 8.0 channel, regardless of what's in the global.json.

unset DOTNET_VERSION
DOTNET_CHANNEL="8.0"
# ----- End Octopus Deploy Modification -----

# Install by channel or version
DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix"
if [[ -z ${DOTNET_VERSION+x} ]]; then
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL"
else
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path
"$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION"
fi
export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet"

# ----- Octopus Deploy Modification -----
# Update the path with the temporary dotnet exe so it can be found by anything be run out of this shell
export PATH="$PATH:$DOTNET_DIRECTORY"
# ----- End Octopus Deploy Modification -----
fi

echo "Microsoft (R) .NET Core SDK version $("$DOTNET_EXE" --version)"
Expand Down
80 changes: 80 additions & 0 deletions build/Build.CalamariTesting.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using JetBrains.Annotations;
using Nuke.Common;
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.CI.TeamCity;

namespace Calamari.Build;

partial class Build
{
[PublicAPI]
Target PlatformAgnosticTesting =>
target => target
.Executes(async () =>
{
var dotnetPath = await LocateOrInstallDotNetSdk();

CreateTestRun("Binaries/Calamari.Tests.dll")
.WithDotNetPath(dotnetPath)
.WithFilter("TestCategory = PlatformAgnostic")
.Execute();
});

[PublicAPI]
Target LinuxSpecificTesting =>
target => target
.Executes(async () =>
{
var dotnetPath = await LocateOrInstallDotNetSdk();

CreateTestRun("Binaries/Calamari.Tests.dll")
.WithDotNetPath(dotnetPath)
.WithFilter("TestCategory != Windows & TestCategory != PlatformAgnostic & TestCategory != RunOnceOnWindowsAndLinux")
.Execute();
});

[PublicAPI]
Target OncePerWindowsOrLinuxTesting =>
target => target
.Executes(async () =>
{
var dotnetPath = await LocateOrInstallDotNetSdk();

CreateTestRun("Binaries/Calamari.Tests.dll")
.WithDotNetPath(dotnetPath)
.WithFilter("(TestCategory != Windows & TestCategory != PlatformAgnostic) | TestCategory = RunOnceOnWindowsAndLinux")
.Execute();
});

[PublicAPI]
Target OncePerWindowsTesting =>
target => target
.Executes(async () =>
{
var dotnetPath = await LocateOrInstallDotNetSdk();

CreateTestRun("Binaries/Calamari.Tests.dll")
.WithDotNetPath(dotnetPath)
.WithFilter("TestCategory != macOs & TestCategory != Nix & TestCategory != PlatformAgnostic & TestCategory != nixMacOS & TestCategory != RunOnceOnWindowsAndLinux & TestCategory != ModifiesSystemProxy")
.Execute();
});

[PublicAPI]
Target WindowsSystemProxyTesting =>
target => target
.Executes(async () =>
{
var dotnetPath = await LocateOrInstallDotNetSdk();

CreateTestRun("Binaries/Calamari.Tests.dll")
.WithDotNetPath(dotnetPath)
.WithFilter("TestCategory = Windows & TestCategory = ModifiesSystemProxy")
.Execute();
});
}
13 changes: 13 additions & 0 deletions build/Build.CreateTestRun.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Threading.Tasks;

namespace Calamari.Build;

partial class Build
{

CalamariTestRunBuilder CreateTestRun(string projectFileOrDll)
{
var outputDir = RootDirectory / "outputs";
return new CalamariTestRunBuilder(projectFileOrDll, outputDir);
}
}
Loading