【发布时间】:2021-02-22 12:34:35
【问题描述】:
在 12.6.0 版本的 gitlab-runner 上,我需要的 .Build 文件夹总是被删除。我在这里使用与此相同的设置:
https://github.com/TYPO3-Documentation/tea/blob/main/.gitlab/pipeline/.gitlab-ci.yml
对他们来说,这些文件没有被删除,但对我来说总是如此。我需要用于 linting 的工件。
Checking out ffc908d4 as ci-cd...
Removing .Build/
Removing .composer/
Removing composer.lock
这就是正在发生的事情。我假设它与Reinitialized existing Git repository in ... 有关,因为提到的项目的所有者总是以某种方式拥有一个新的存储库。
我尝试使用dependencies 和needs。他们都没有工作。
我当前的 CI 配置:
stages:
- build
- lint
.default:
image: php:7.4
before_script:
- bash .gitlab/build/docker_install.sh > /dev/null
build-composer-dependencies:
extends: .default
stage: build
needs: [ ]
variables:
COMPOSER_CACHE_DIR: '.composer'
script:
- composer --version
- COMPOSER_CACHE_DIR=.composer
composer install --prefer-dist --no-progress --optimize-autoloader
artifacts:
when: on_success
expire_in: 2 weeks
paths:
- .Build
cache:
paths:
- .composer
- .Build
json-lint:
extends: .default
stage: lint
dependencies:
- build-composer-dependencies
script:
- composer ci:json:lint
【问题讨论】:
标签: continuous-integration gitlab