我正在使用 GitLab CI,它与 GitLab 以及为跑步者推荐的辅助服务器集成。一切似乎都配置正确。它检测我的提交并运行构建步骤,我可以看到输出。
至少对于以下默认工作:
git submodule update --init
ls -la
我尝试通过两个步骤添加第二份工作:
npm install
gulp ci
我正在使用git clone
,所以我想每次都运行安装。
我运行了构建,但是,它只是重复了第一个工作。然后我删除了我的第二份工作,并将所有步骤放在一起:
npm install
gulp ci
git submodule update --init
ls -la
但是,构建的输出仍然与它只是默认作业时完全相同。像这样的东西:
cd /home/gitlab_ci_runner/gitlab-ci-runner/tmp/builds && git clone https://gitlab-ci-token:<my-git-project-in-gitlab> project-3 && cd project-3 && git checkout aded9a5a66d754ef41504669e09fbd7393490a24
Cloning into 'project-3'...
Note: checking out 'aded9a5a66d754ef41504669e09fbd7393490a24'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at aded9a5... Merge branch 'master' of <my-repo>
cd /home/gitlab_ci_runner/gitlab-ci-runner/tmp/builds/project-3 && git reset --hard && git checkout aded9a5a66d754ef41504669e09fbd7393490a24
HEAD is now at aded9a5 Merge branch 'master' of <my-repo>
HEAD is now at aded9a5... Merge branch 'master' of <my-repo>
git submodule update --init
ls -la
<ls file list>
有任何想法吗?当我更改构建脚本以使其生效时,是否需要清除一些缓存或需要点击按钮(除了我所做的保存更改设置)?
谢谢。