Gitlab CI runner无法在docker执行程序上共享生成源
我尝试在Docker上共享构build源代码(并使用git fetch),但他总是在每次运行时运行一个git clone(是的,我已经configuration它在CI / CDpipe道设置上使用git fetch)。
我只是想用一个composer php更新脚本和一个phing(phpunit,…)testing阶段来运行一个构build阶段。 在构build阶段,一切工作(除了git克隆),并在testing阶段,他不使用以前的同一个来源,再次克隆源…
我知道我需要与docker容器共享我的音量,但我不知道如何使用gitlab CI!
我的conf:.gitlab-ci.yml
image: webdevops/php:centos-7-php7 stages: - build - test build: script: - composer --working-dir=/builds/MyGroup/MyProject update test: script: - php /builds/MyGroup/MyProject/vendor/bin/phing
编辑:经过一天的search,我终于find了这个文档: https : //docs.gitlab.com/runner/executors/docker.html#the-persistent-storage现在它工作正常。
谢谢大家,
除了您find的解决scheme之外,我还在这个场景中使用了Artifacts(在Gitlab.com中使用共享的跑步者)。 构buildsrc,将其推送到Gitlab并在下一个构build步骤中下载该文件。
build: environment: production stage: build image: image_used_for_builds script: - # steps to build artifacts: name: "myapplication-${CI_BUILD_REF_NAME}-${CI_BUILD_ID}-production" paths: - vendor/src - run.whatever when: on_success # this step will download the preivous created files to deploy them deploy: stage: deploy environment: production script: - run-deploy.sh dependencies: - build # this will download the artifacts
也许有人认为这有用的例子!
- Gitlab CI Runner | 自定义mysql conf
- 在GitlabCI中使用Docker,MongoDB
- Gitlab CI中使用Docker runner的代理问题
- Docker-in-Docker与Gitlab共享运行器,用于构buildDocker映像并将其推送到registry
- 自动设置docker工与ci亚军的图像
- OpenJDK9(Docker),分级4.2.1,GitLab
- 无法使用Gitlab-CI在Docker容器中运行Android应用程序
- 如何使用GitLab CI设置Selenium E2Etesting?
- GitlabCI编译失败,docker.sock:write:破pipe道