logo
0
2
Login
编辑文件 README.md

CDN-Refresh

Auth cnb Eryajf HitCount Eryajf Blog Eryajf WeChat Eryajf Awesome Stars

🆕 支持多个云厂商CDN缓存刷新插件,应用于CNB的云原生构建场景


ℹ️ 项目简介

访问:插件市场

项目支持多个云厂商 CDN 缓存刷新,支持刷新目录和 URL 缓存,用于在 CNB 云原生构建中,刷新 CDN 缓存。

支持:

如果您需要支持其他云厂商,欢迎提交 PR,或者提交Issue,我会尽快支持。

🗣️ 用法介绍

刷新CDN 目录缓存:

main: push: - imports: - https://cnb.cool/xxx/env/-/blob/main/env.yaml stages: - name: test dcr path image: docker.cnb.cool/znb/cdn-refresh settings: kind: "tencenteo" ak: "${AK}" sk: "${SK}" rtype: "path" domain: "opsre.top" urls: - "https://jenkinsguide.opsre.top/"

需要引入对应CDN厂商的秘钥,具体引入的语法,详见文档:环境变量

刷新CDN URL缓存:

main: push: - imports: - https://cnb.cool/xxx/env/-/blob/main/env.yaml stages: - name: test dcr url image: docker.cnb.cool/znb/cdn-refresh settings: kind: "tencenteo" ak: "${AK" sk: "${SK}" rtype: "url" domain: "opsre.top" urls: - "https://jenkinsguide.opsre.top/pages/385f87.html" - "https://jenkinsguide.opsre.top/pages/ce3667.html"

如果你配置流水线之后,执行失败,可通过如下命令,调试相关参数:

docker run -it --rm -e PLUGIN_AK="xxxxxxx" -e PLUGIN_SK="xxxxxxx" -e PLUGIN_KIND="doge" -e PLUGIN_DOMAIN="opsre.top" -e PLUGIN_RTYPE="path" -e PLUGIN_URLS="https://jenkinsguide.opsre.top/" docker.cnb.cool/znb/cdn-refresh:latest

📑 参数说明

参数必须/可选类型说明
ak必须stringAccess Key
sk必须stringSecret Key
kind必须stringcdn类别,支持 doge tencenteo tencencdn alicdn alidcdn aliesa qiniucdn
domain必须string指定要操作的域名,当eo场景需要指定
rtype必须string刷新类型,接受 pathurl
urls必须array刷新URL,一个或多个

📇 项目地址

可选择你熟悉的平台浏览源码:

服务商地址
CNBhttps://cnb.cool/znb/cdn-refresh
GitHubhttps://github.com/eryajf/cdn-refresh

💰 捐赠打赏

如果你觉得这个项目对你有帮助,你可以请作者喝杯咖啡 ☕️

支付宝微信