diff --git a/rickshaw-run b/rickshaw-run index b3cabe85..c4d541ce 100755 --- a/rickshaw-run +++ b/rickshaw-run @@ -118,6 +118,7 @@ my $roadblock_exit_abort_waiting = 6; my $abort_via_roadblock = 0; my $workshop_base_cmd; my $workshop_force_builds; +my $quay_image_expiration; my $cs_conf_file; my %cs_conf; @@ -1723,6 +1724,13 @@ sub load_settings_info() { print "load_settings_info(): failed to load workshop force\n"; exit 1; } + + ($rc, $quay_image_expiration) = get_json_setting("quay.image-expiration", $jsonsettings); + if ($rc != 0) { + print "load_settings_info(): failed to load quay image-expiration\n"; + exit 1; + } + printf "Finished loading json settings\n"; } @@ -2835,7 +2843,7 @@ $cs_conf_file = $config_dir . "/cs-conf.json"; }, 'config' => { 'entrypoint' => [ "/bin/sh", "-c", "/usr/local/bin/bootstrap" ], - 'labels' => [ 'quay.expires-after=2w' ], + 'labels' => [ 'quay.expires-after=' . $quay_image_expiration ], 'envs' => [ 'TOOLBOX_HOME=/opt/toolbox' ] } ); diff --git a/rickshaw-settings.json b/rickshaw-settings.json index e7d9c8a5..311883e3 100644 --- a/rickshaw-settings.json +++ b/rickshaw-settings.json @@ -21,5 +21,8 @@ }, "workshop": { "force-builds": "false" + }, + "quay": { + "image-expiration": "2w" } }