Skip to content

Commit 3adeb5d

Browse files
committed
migrations: AddPrefixesMigration for image-verifier-plugins
Signed-off-by: Gavin Inglis <giinglis@amazon.com>
1 parent 08ca0e8 commit 3adeb5d

4 files changed

Lines changed: 38 additions & 0 deletions

File tree

sources/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sources/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ members = [
5858
"settings-migrations/v1.56.0/image-verifier-plugins-extensible",
5959
"settings-migrations/v1.60.0/kubernetes-topology-manager-policy-options",
6060
"settings-migrations/v1.60.0/container-runtime-max-concurrent-unpacks",
61+
"settings-migrations/v1.61.0/image-verifier-plugins-settings",
6162

6263
"settings-plugins/aws-dev",
6364
"settings-plugins/aws-ecs-2",
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "image-verifier-plugins-settings"
3+
version = "0.1.0"
4+
license = "Apache-2.0 OR MIT"
5+
edition = "2021"
6+
publish = false
7+
exclude = ["README.md"]
8+
9+
[dependencies]
10+
migration-helpers.workspace = true
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
use migration_helpers::common_migrations::AddPrefixesMigration;
2+
use migration_helpers::{migrate, Result};
3+
use std::process;
4+
5+
/// Added new image-verifier-plugins settings.
6+
fn run() -> Result<()> {
7+
migrate(AddPrefixesMigration(vec![
8+
"settings.image-verifier-plugins",
9+
]))
10+
}
11+
12+
// Returning a Result from main makes it print a Debug representation of the error, but with Snafu
13+
// we have nice Display representations of the error, so we wrap "main" (run) and print any error.
14+
// https://github.com/shepmaster/snafu/issues/110
15+
fn main() {
16+
if let Err(e) = run() {
17+
eprintln!("{e}");
18+
process::exit(1);
19+
}
20+
}

0 commit comments

Comments
 (0)