有时,当构建一个大厅管道时,它会尝试使用以前版本的资源,而不是最新版本。我可以确认这一点,因为资源哈希不匹配。 请让我知道刷新资源哈希的解决方案。
Concourse v7.4.0(2021 年 8 月发布)添加了命令
fly clear-resource-cache -r <pipeline>/<resource>
这将满足您的需求。
参见:
fly clear-resource-cache -r <pipeline>/<resource>
命令不适用于旧版本。要获得类似的结果,您可以使用
fly -t ci clear-task-cache -j <pipeline>/<resource> -s <step-name>
查看帮助命令以获取更多信息:
Usage:
fly [OPTIONS] clear-task-cache [clear-task-cache-OPTIONS]
Application Options:
-t, --target= Concourse target name
-v, --version Print the version of Fly and exit
--verbose Print API requests and responses
--print-table-headers Print table headers even for redirected output
Help Options:
-h, --help Show this help message
[clear-task-cache command options]
-j, --job= Job to clear cache from
-s, --step= Step name to clear cache from
-c, --cache-path= Cache directory to clear out
-n, --non-interactive Destroy the task cache(s) without confirmation
fly -t <target> clear-resource-cache -r <pipeline>/<resource>
样品:
fly -t demo destroy-pipeline -p java-api-pipeline