嘿,我的Bitbucket管道缓存有问题。
我在第一步中看到缓存正在这样工作:
Cache "cpphp71": Downloading
Cache "cpphp71": Downloaded 3 MB in 4 seconds
Cache "cpphp71": Extracting
Cache "cpphp71": Extracted in 0 seconds
但是当它再次上传缓存时,会显示以下消息:
Cache "cpphp71": Skipping upload for existing cache
我真的不知道要更改什么,所以它又能正常工作。
image: albertcolom/ci-pipeline-php:7.1-alpine
pipelines:
default:
- step:
name: testing
caches:
- cpphp71
script:
- php --version
- step:
name: Package build
caches:
- cpphp71
script:
- echo "test"
definitions:
caches:
cpphp71: /test/.rl/repo
答案 0 :(得分:1)
仅当没有缓存退出时,才上传缓存。缓存将在一周后自动清除。您也可以通过bitbucket UI清除。 如果您有两个不同的依赖项,则应创建两个这样的缓存。
image: albertcolom/ci-pipeline-php:7.1-alpine
pipelines:
default:
- step:
name: testing
caches:
- cpphp71_1
script:
- php --version
- step:
name: Package build
caches:
- cpphp71_2
script:
- echo "test"
definitions:
caches:
cpphp71_1: /test/.rl/repo
cpphp71_2: /test/.rl/repo
有关缓存的更多信息,请参见:https://confluence.atlassian.com/bitbucket/caching-dependencies-895552876.html