Concourse 资源缓存刷新

问题描述 投票:0回答:6

有时,当构建一个大厅管道时,它会尝试使用以前版本的资源,而不是最新版本。我可以确认这一点,因为资源哈希不匹配。 请让我知道刷新资源哈希的解决方案。

concourse
6个回答
4
投票

Concourse v7.4.0(2021 年 8 月发布)添加了命令

fly clear-resource-cache -r <pipeline>/<resource>

这将满足您的需求。

参见:


1
投票
刷新资源缓存的唯一方法是重新启动所有工作线程,因为这将清除您的临时磁盘。


0
投票

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
    

0
投票

资源:

fly -t example clear-resource-cache -r my-pipeline/my-resource

相应文档链接.

对于任务: 我已经在 7.9.1 上对此进行了测试(距离本文最近 - 大约 3 周前)。

fly -t demo clear-task-cache --job java-api-pipeline/compile-app-task --step task1
要查看实际效果,请参阅在线课程“
Pluralsight 上的 Concourse CI 入门”,模块 4:编写和管理管道,剪辑 4:演示:运行和管理管道。

相应文档链接.


0
投票
如果管道中存在应该在您正在执行的作业之前执行的作业,那么无论资源的 check_every 设置如何,它都可能是缓存。


-1
投票
截至撰写本文时 2023-06-21,清除缓存的命令需要目标,因此:

fly -t <target> clear-resource-cache -r <pipeline>/<resource>
样品:

fly -t demo destroy-pipeline -p java-api-pipeline
    
© www.soinside.com 2019 - 2024. All rights reserved.