相关疑难解决方法(0)

无法从gitlab-ci.yml推送

与我的同事一起,我们致力于开发一个每天变得越来越重要的C++库.我们已经通过gitlab-ci.yml文件构建了持续集成实用程序,让我们:

  • 在调试模式下构建和测试
  • 在发布模式下构建和测试
  • 使用Valgrind执行内存泄漏等安全检查,并检查我们的库中是否有任何我们不想要的清晰符号
  • 生成文档

各种让我们选择GitLab的东西!

我们希望对整个库进行概述,并将基准推送到一个单独的项目中.我们已经使用SSH密钥方法完成了类似的文档,但是这次我们想避免这种情况.

我们尝试了这样的脚本:

test_ci_push:
  tags:
    - linux
    - shell
    - light
  stage: profiling
  allow_failure: false
  only:
    - new-benchmark-stage
  script:
    - git clone http://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.mycompany.home/developers/benchmarks.git &> /dev/null
    - cd benchmarks
    - touch test.dat
    - echo "This is a test" > test.dat
    - git config --global user.name "${GITLAB_USER_NAME}"
    - git config --global user.email "${GITLAB_USER_EMAIL}"
    - git add --all
    - git commit -m "GitLab Runner Push"
    - git push http://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.mycompany.home/developers/benchmarks.git HEAD:master
    - cd ..
Run Code Online (Sandbox Code Playgroud)

我们还尝试了一个基本 …

shell gitlab-ci gitlab-ci-runner

17
推荐指数
3
解决办法
1万
查看次数

标签 统计

gitlab-ci ×1

gitlab-ci-runner ×1

shell ×1