代码之家  ›  专栏  ›  技术社区  ›  samanime

GitLab CI-生成未运行配置的作业

  •  0
  • samanime  · 技术社区  · 11 年前

    我使用的是与GitLab集成的GitLab CI,以及推荐的跑步者辅助服务器。一切似乎都配置正确。它检测我的提交并运行构建步骤,我可以看到输出。

    至少对于以下默认作业:

    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>
    

    有什么想法吗?当我更改构建脚本以使其生效时,是否有一些缓存需要清除或按钮需要点击(除了保存对设置的更改之外)?

    谢谢

    2 回复  |  直到 11 年前
        1
  •  0
  •   samanime    11 年前

    这似乎有点用户错误,有点糟糕的UI。

    我试图通过进入构建并按“重试”来测试新的构建设置。显然,这重新运行了使用的相同构建步骤。它不使用当前的项目构建步骤。

    当我对项目本身做出新的承诺时,它被新的构建步骤所使用。

    就我所见,没有一个按钮可以用当前的构建步骤运行新的构建。似乎唯一的方法是将新的提交推送到代码库本身=S

    看起来唯一的方法是从服务中点击测试设置>通过GitLab的GitLab CI。。。然而,现在运行显然有一个bug: https://gitlab.com/gitlab-org/gitlab-ci/issues/65

        2
  •  0
  •   Amias    11 年前

    目前,从7.8.1开始,唯一的方法是提交