diff --git a/rickshaw-run b/rickshaw-run index 14e81c5b..bf62eb60 100755 --- a/rickshaw-run +++ b/rickshaw-run @@ -1831,25 +1831,29 @@ sub load_settings_info() { ($rc, $workshop_refresh_timestamps_token_file) = get_json_setting("workshop.refresh-timestamps.token-file", $jsonsettings); if ($rc != 0) { - debug_log("load_settings_info(): failed to load workshop refresh-timestamps token-file\n"); + print "load_settings_info(): failed to load workshop refresh-timestamps token-file\n"; + exit 1; } else { - if (open(TOKEN, "<", $workshop_refresh_timestamps_token_file)) { - $workshop_refresh_timestamps_token = ; - chomp($workshop_refresh_timestamps_token); - close TOKEN; - } else { - printf "load_settings_file(): failed to load token from workshop refresh-timestamps token-file\n"; - exit 1; - } - - printf "load_settings_info(): loaded workshop refresh-timestamps token-file: %s\n", $workshop_refresh_timestamps_token_file; + if (defined $workshop_refresh_timestamps_token_file) { + if (open(TOKEN, "<", $workshop_refresh_timestamps_token_file)) { + $workshop_refresh_timestamps_token = ; + chomp($workshop_refresh_timestamps_token); + close TOKEN; + } else { + printf "load_settings_file(): failed to load token from workshop refresh-timestamps token-file\n"; + exit 1; + } - ($rc, $workshop_refresh_timestamps_api_url) = get_json_setting("workshop.refresh-timestamps.api-url", $jsonsettings); + printf "load_settings_info(): loaded workshop refresh-timestamps token-file: %s\n", $workshop_refresh_timestamps_token_file; + } + } - if ($rc != 0) { - print "load_settings_info(): failed to load workshop refresh-timestamps api-url\n"; - exit 1; - } else { + ($rc, $workshop_refresh_timestamps_api_url) = get_json_setting("workshop.refresh-timestamps.api-url", $jsonsettings); + if ($rc != 0) { + print "load_settings_info(): failed to load workshop refresh-timestamps api-url\n"; + exit 1; + } else { + if (defined $workshop_refresh_timestamps_api_url) { printf "load_settings_info(): loaded workshop refresh-timestamps api-url: %s\n", $workshop_refresh_timestamps_api_url; } } diff --git a/rickshaw-settings.json b/rickshaw-settings.json index 311883e3..ae073262 100644 --- a/rickshaw-settings.json +++ b/rickshaw-settings.json @@ -20,7 +20,11 @@ } }, "workshop": { - "force-builds": "false" + "force-builds": "false", + "refresh-timestamps": { + "token-file": null, + "api-url": null + } }, "quay": { "image-expiration": "2w"