我在我的 bitbucket 管道中得到了这个:
pipelines:
branches:
develop:
- step:
caches:
- composer
name: unit tests - Delivery
image: totersapp/laravel-docker:phpredis
script:
- echo "memory_limit=512M" > /usr/local/etc/php/conf.d/memory-limit-php.ini
- ln -f -s .env.pipelines .env
- composer install
services:
- postgres
- redis
每次运行它都会下载相同的文件(即使是第二次运行)..任何想法为什么?
这是作曲家安装的日志:
+ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 199 installs, 0 updates, 0 removals
- Installing kylekatarnls/update-helper (1.2.0): Downloading (connecting...)Downloading (0%) Downloading (100%)
- Installing ocramius/package-versions (1.4.2): Downloading (connecting...)Downloading (0%) Downloading (30%)Downloading (35%)Downloading (65%)Downloading (95%)Downloading (100%)
- Installing symfony/polyfill-ctype (v1.13.1): Downloading (connecting...)Downloading (0%) Downloading (100%)
更新:无法覆盖默认值
基于这个答案,我尝试了这个:
- step:
caches:
- composer
image: totersapp/laravel-docker:phpredis
script:
- composer install
..
definitions:
caches:
composer: /composer/cache
我的问题是我正在尝试使用自定义缓存目录(在本例中/composer/cache为在这个例子中,bitbucket 教程是用 bundle 做的:
- bundle install --path vendor/bundle
换句话说,我不能运行这样的东西:
- composer install --cache-directory /composer/cache
手掌心
繁华开满天机