{"id":20245097,"url":"https://github.com/bestburning/tencentcloud","last_synced_at":"2025-07-22T16:05:37.495Z","repository":{"id":107003185,"uuid":"250801884","full_name":"BestBurning/tencentcloud","owner":"BestBurning","description":"用于刷新腾讯cdn","archived":false,"fork":false,"pushed_at":"2020-05-23T04:02:06.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T15:32:43.813Z","etag":null,"topics":["cdn","coding","refresh","tencentcloud"],"latest_commit_sha":null,"homepage":"https://di1shuai.com/%E8%85%BE%E8%AE%AF%E4%BA%91cdn%E5%88%B7%E6%96%B0.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BestBurning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-28T13:27:53.000Z","updated_at":"2020-05-23T04:18:14.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2fd28e4-a2f6-4cbd-8e56-7c3c81c1a80b","html_url":"https://github.com/BestBurning/tencentcloud","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BestBurning/tencentcloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BestBurning%2Ftencentcloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BestBurning%2Ftencentcloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BestBurning%2Ftencentcloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BestBurning%2Ftencentcloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BestBurning","download_url":"https://codeload.github.com/BestBurning/tencentcloud/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BestBurning%2Ftencentcloud/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266524869,"owners_count":23942832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cdn","coding","refresh","tencentcloud"],"created_at":"2024-11-14T09:18:56.240Z","updated_at":"2025-07-22T16:05:37.463Z","avatar_url":"https://github.com/BestBurning.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tencentcloud\n\n在[e.coding.net](https://e.coding.net/)上用官方提供的[demo](https://codes-farm.coding.net/p/html-cos-demo/d/html-cos-demo/git)自动将`博客代码`推至**腾讯COS**\n不过最后涉及云函数刷新CDN的地方，计费方式过于恐怖，所以用自己的方式去刷新CDN\n\n\n## 前置步骤\n\n直到`刷新CDN`之前与[demo](https://codes-farm.coding.net/p/html-cos-demo/d/html-cos-demo/git)保持一致，\n之后在`coding`-\u003e`项目`中`构建`设置中添加一步`刷新CDN`:\n![cdn](https://github.com/BestBurning/tencentcloud/blob/master/imgs/cdn.png)\n\n```\npipeline {\n  agent any\n  stages {\n    stage('检出') {\n      steps {\n        checkout([\n          $class: 'GitSCM',\n          branches: [[name: env.GIT_BUILD_REF]],\n          userRemoteConfigs: [[url: env.GIT_REPO_URL, credentialsId: env.CREDENTIALS_ID]]\n        ])\n      }\n    }\n    stage('部署到腾讯云存储') {\n      steps {\n        echo '部署中...'\n        sh 'coscmd config -a $TENCENT_SECRET_ID -s $TENCENT_SECRET_KEY -b $TENCENT_BUCKET -r $TENCENT_REGION'\n        sh 'rm -rf .git'\n        sh 'coscmd upload -r ./ /'\n        echo '部署完成'\n      }\n    }\n    stage('刷新CDN') {\n      steps {\n        echo '准备刷新'\n        sh 'git clone https://github.com/BestBurning/tencentcloud.git'\n        dir(path: './tencentcloud') {\n          sh 'mvn clean package '\n          sh 'java -jar ./target/tencentcloud-1.0-SNAPSHOT.jar $TENCENT_SECRET_ID $TENCENT_SECRET_KEY $TENCENT_REGION https://di1shuai.com/'\n        }\n        echo '刷新完毕'\n      }\n    }\n  }\n}\n```\n### 参数说明\n```\njava -jar ./target/tencentcloud-1.0-SNAPSHOT.jar $TENCENT_SECRET_ID $TENCENT_SECRET_KEY $TENCENT_REGION https://di1shuai.com/\n```\n1. 腾讯云`SECRET_ID`\n2. 腾讯云`SECRET_KEY`\n3. 区域\n4. `\u003e=4`的参数均为要刷新的`目录`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestburning%2Ftencentcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbestburning%2Ftencentcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestburning%2Ftencentcloud/lists"}