Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a41175e
pulled over a lot of it
rain-on Aug 25, 2025
a41c820
getting closer
rain-on Aug 26, 2025
fadfca9
getting there
rain-on Aug 26, 2025
e5843be
need to do output variables
rain-on Aug 26, 2025
92a5483
Merge remote-tracking branch 'origin/main' into tmm/update_app_images
rain-on Sep 4, 2025
2685029
more green
rain-on Sep 4, 2025
385e8b2
its sort of working
rain-on Sep 4, 2025
c60d978
bring over the commit message generator
rain-on Sep 4, 2025
5282dd8
pulled in some new tests
rain-on Sep 4, 2025
e39716a
fixing textual tests - sad
rain-on Sep 4, 2025
87fff08
sorted out the imageReplaceTests
rain-on Sep 5, 2025
c5a5cb7
Merge remote-tracking branch 'origin/main' into tmm/update_app_images
rain-on Sep 5, 2025
94f0ecf
after review
rain-on Sep 5, 2025
a4623fb
building with tests:
rain-on Sep 5, 2025
bd1b6e0
porting over more tests
rain-on Sep 6, 2025
070cef3
not sure
rain-on Sep 6, 2025
cb205a6
slowly slowly catch a monkey
rain-on Sep 7, 2025
fdffccf
pulling in more tests
rain-on Sep 7, 2025
0f07db1
oh my tests work
rain-on Sep 8, 2025
cee2b87
some cleanup
rain-on Sep 8, 2025
61bc989
And she works for golden path
rain-on Sep 9, 2025
6ef9526
Merge remote-tracking branch 'origin/main' into tmm/update_app_images
rain-on Sep 9, 2025
41fb317
post basic review
rain-on Sep 9, 2025
542e6db
coping with the new custom properties files
rain-on Sep 9, 2025
5e7b2d0
updated to use the properties file
rain-on Sep 9, 2025
b08c871
oh wow - it works with the file
rain-on Sep 9, 2025
3e3574c
slowly pulling over the helm changes
rain-on Sep 9, 2025
dd1d391
not compiling but getting there
rain-on Sep 9, 2025
f458c5b
This is pretty ugly but compiles
rain-on Sep 9, 2025
33161a6
prove that the directory stuff works
rain-on Sep 10, 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
18 changes: 18 additions & 0 deletions source/Calamari.Shared/Deployment/SpecialVariables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,24 @@ public static string PackageFilePath(string key)
{
return $"Octopus.Action.Package[{key}].PackageFilePath";
}

public static readonly string PackageCollection = "Octopus.Action.Package";

public static string Prefix(string name) => $"Octopus.Action.Package[{name}]";

public static string PackageId(string name) => $"Octopus.Action.Package[{name}].PackageId";

public static string FeedId(string name) => $"Octopus.Action.Package[{name}].FeedId";

public static string PackageVersion(string name) => $"Octopus.Action.Package[{name}].PackageVersion";

public static string ShouldDownloadOnTentacle(string name) => $"Octopus.Action.Package[{name}].DownloadOnTentacle";

public static string OriginalPath(string name) => $"Octopus.Action.Package[{name}].OriginalPath";

public static string Image(string name) => $"Octopus.Action.Package[{name}].Image";

public static string Purpose(string name) => $"Octopus.Action.Package[{name}].Purpose";
}

public static class Vhd
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
using System;
using System.Collections.Generic;
using Calamari.ArgoCD.Conventions.UpdateArgoCDAppImages;
using Calamari.Tests.Helpers;
using FluentAssertions;
using NUnit.Framework;

namespace Calamari.Tests.ArgoCD.Commands.Conventions.UpdateArgoCdAppImages
{
[TestFixture]
public class CommitMessageGeneratorTests
{
readonly CommitMessageGenerator commitMessageGenerator = new CommitMessageGenerator();

[Test]
public void SummaryWithNoImages_SummaryAndNoImage()
{
var result = commitMessageGenerator.GenerateForImageUpdates(new GitCommitSummary("Foo"), null, new HashSet<string>());

var expected = @"Foo

---
No images updated".ReplaceLineEndings("\n");
result.Should().Be(expected);
}

[Test]
public void SummaryWithOneImage_SummaryAndImage()
{
var result = commitMessageGenerator.GenerateForImageUpdates(new GitCommitSummary("Foo"), null, new HashSet<string>() { "nginx" });

var expected = @"Foo

---
Images updated:
- nginx".ReplaceLineEndings("\n");
result.Should().Be(expected);
}

[Test]
public void SummaryWithThreeImages_SummaryAndImagesSorted()
{
var result = commitMessageGenerator.GenerateForImageUpdates(new GitCommitSummary("Foo"), null, new HashSet<string>() {"nginx", "alpine", "ubuntu"});

var expected = @"Foo

---
Images updated:
- alpine
- nginx
- ubuntu".ReplaceLineEndings("\n");
result.Should().Be(expected);
}

[Test]
public void SummaryAndDescriptionWithOneImage_SummaryAndDescriptionAndImage()
{
var description = @"Dolores animi quia quae enim hic.

Quibusdam qui maxime eos et magnam quod minus rerum perferendis eum iusto neque et tenetur. Porro illum praesentium sit dolorem rerum accusantium enim repellendus qui iste.".ReplaceLineEndings("\n");
var result = commitMessageGenerator.GenerateForImageUpdates(new GitCommitSummary("Foo"), description, new HashSet<string>() {"nginx"});

var expected = @"Foo

Dolores animi quia quae enim hic.

Quibusdam qui maxime eos et magnam quod minus rerum perferendis eum iusto neque et tenetur. Porro illum praesentium sit dolorem rerum accusantium enim repellendus qui iste.

---
Images updated:
- nginx".ReplaceLineEndings("\n");
result.Should().Be(expected);
}
}
}
Loading