Skip to content

Commit

Permalink
Allow setting the updater image tag per project
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Sep 29, 2023
1 parent 34aea3b commit dd9cb1b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected override void Up(MigrationBuilder migrationBuilder)
AutoApprove_Enabled = table.Column<bool>(type: "bit", nullable: false),
Password = table.Column<string>(type: "nvarchar(450)", nullable: false),
Secrets = table.Column<string>(type: "nvarchar(max)", nullable: false),
UpdaterImageTag = table.Column<string>(type: "nvarchar(max)", nullable: true),
GithubToken = table.Column<string>(type: "nvarchar(max)", nullable: true),
Location = table.Column<string>(type: "nvarchar(max)", nullable: true),
Synchronized = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ protected override void BuildModel(ModelBuilder modelBuilder)
b.Property<DateTimeOffset>("Updated")
.HasColumnType("datetimeoffset");

b.Property<string>("UpdaterImageTag")
.HasColumnType("nvarchar(max)");

b.Property<string>("Url")
.IsRequired()
.HasColumnType("nvarchar(max)");
Expand Down
10 changes: 9 additions & 1 deletion server/Tingle.Dependabot/Models/Management/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,17 @@ public class Project
[JsonIgnore] // expose this once we know how to protect the values
public Dictionary<string, string> Secrets { get; set; } = new(StringComparer.OrdinalIgnoreCase);

/// <summary>
/// Version of the updater docker container images to use.
/// If no value is provided, the default version is used.
/// Providing a value allows to test new feature just for the project.
/// </summary>
/// <example>1.20</example>
public string? UpdaterImageTag { get; set; }

/// <summary>
/// Token for accessing GitHub APIs.
/// If no value is provided, the a default token is used.
/// If no value is provided, a default token is used.
/// Providing a value avoids being rate limited in case when there
/// are many calls at the same time from the same IP.
/// When provided, it must have <c>read</c> access to public repositories.
Expand Down

0 comments on commit dd9cb1b

Please sign in to comment.