Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Serilog" Version="2.10.0" />
<PackageReference Include="SharpCompress" Version="0.37.2">
<NoWarn>NU1902</NoWarn>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Calamari.ConsolidateCalamariPackages.Api\Calamari.ConsolidateCalamariPackages.Api.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ public void UnstructuredValue_AlreadyAtTarget_TracksWithFriendlyName()

using var scope = new AssertionScope();
result.UpdatedImageReferences.Should().BeEmpty();
<<<<<<< HEAD
result.AlreadyUpToDateImages.Should().BeEquivalentTo(["nginx:1.27.1"]);
=======
>>>>>>> release/2026.1
}

[Test]
Expand Down Expand Up @@ -92,7 +95,10 @@ public void StructuredValue_AlreadyAtTarget_TracksWithFriendlyName()

using var scope = new AssertionScope();
result.UpdatedImageReferences.Should().BeEmpty();
<<<<<<< HEAD
result.AlreadyUpToDateImages.Should().BeEquivalentTo(["nginx:1.27.1"]);
=======
>>>>>>> release/2026.1
}

[Test]
Expand Down Expand Up @@ -136,7 +142,10 @@ public void NoHelmReference_SkipsImage()

using var scope = new AssertionScope();
result.UpdatedImageReferences.Should().BeEmpty();
<<<<<<< HEAD
result.AlreadyUpToDateImages.Should().BeEmpty();
=======
>>>>>>> release/2026.1
}

[Test]
Expand Down
24 changes: 24 additions & 0 deletions source/Calamari/ArgoCD/ArgoCDModule.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
using Autofac;
using Calamari.ArgoCD.Conventions;
using Calamari.ArgoCD.Git;
<<<<<<< HEAD
using Calamari.ArgoCD.Git.PullRequests;
using Calamari.ArgoCD.Git.PullRequests.Vendors.GitLab;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Options;
=======
using Calamari.ArgoCD.Git.GitVendorApiAdapters;
using Calamari.ArgoCD.GitHub;
using LibGit2Sharp;
>>>>>>> release/2026.1

namespace Calamari.ArgoCD
{
public class ArgoCDModule : Module
{
static ArgoCDModule()
{
// Note this cannot be set in the RepositoryFactory as it causes tests to fail, due to the following issue.

// LibGit2Sharp custom sub-transports are registered by calling a static registration
// method on GlobalSettings. Additionally, if you try and register a multiple transports
// with the same scheme, it throws an exception. It's not ideal, but it's what we've got
// to work with.
//
// Using the type constructor to make sure that these methods are only called once.
GlobalSettings.RegisterSmartSubtransport<GitHttpSmartSubTransport>("http");
GlobalSettings.RegisterSmartSubtransport<GitHttpSmartSubTransport>("https");
}

protected override void Load(ContainerBuilder builder)
{
builder.RegisterType<DeploymentConfigFactory>().AsSelf().InstancePerLifetimeScope();
Expand Down Expand Up @@ -47,6 +67,10 @@ void RegisterMemoryCache(ContainerBuilder builder)
.InstancePerLifetimeScope();
builder.RegisterType<MemoryCache>().As<IMemoryCache>().InstancePerLifetimeScope();
}
}
}
<<<<<<< HEAD
}

=======
>>>>>>> release/2026.1
4 changes: 4 additions & 0 deletions source/Calamari/ArgoCD/HelmValuesImageReplaceStepVariables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,15 @@ public ImageReplacementResult UpdateImages(IReadOnlyCollection<ContainerImageRef

if (IsUnstructuredText(valueToUpdate))
{
<<<<<<< HEAD
if (valueToUpdate == newImageTag.ContainerReference.Tag)
{
alreadyUpToDate.Add(newImageTag.ContainerReference.FriendlyName());
}
else
=======
if (valueToUpdate != newImageTag.ContainerReference.Tag)
>>>>>>> release/2026.1
{
updatedYaml = HelmValuesEditor.UpdateNodeValue(updatedYaml, helmReference, newImageTag.ContainerReference.Tag);
imagesUpdated.Add(newImageTag.ContainerReference.FriendlyName());
Expand Down
1 change: 1 addition & 0 deletions source/Calamari/Calamari.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<NoWarn>NU1902</NoWarn>
</PackageReference>
<PackageReference Include="System.Text.Json" Version="9.0.16" />
<PackageReference Include="System.Text.Json" Version="8.0.6" />
<PackageReference Include="YamlDotNet" Version="16.3.0" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="Autofac" Version="4.8.0" />
Expand Down