据我所知,主要区别在于gitlab-ci是opensource(你可以在自己的服务器上安装)而travis-ci则不是.
那么后者总是基于云/服务.它对于开源项目是免费的.
但是GitLab.com(公司,而不是软件)也有一个你不需要安装的云版本:ci.gitlab.com.我猜这个版本只能用于你的Gitlab帐户中发布的公共存储库.
但是,那里几乎没有关于以这种方式运行GitLab CI的文档.我找到的大多数文档都是关于安装GitLab CI服务器或跑步者.但是如何配置ci.gitlab.com的跑步者?他们有什么操作系统?我可以拥有Windows/Mac跑步者吗?(该软件显然支持这些操作系统,但未指定ci.gitlab.com服务提供的跑步者.)
我正在使用GitLab将我的svn repsitories迁移到git.
现在我已经看到有一个与GitLab CI的持续集成实现,只是想尝试一下.
我已经安装并配置了Runner,但Gitlab抱怨我没有.gitlab-ci.yml文件.
我已经使用TeamCity进行持续集成,所以我不想花太多精力编写构建脚本.
任何人都可以告诉我在哪里可以找到一个基本的gitlab-ci.yml文件基本示例,基本上只是构建我的解决方案并运行所有测试(MSTests)?
我正在使用gitlab 8.1.4.并使用内置的gitlab-ci.默认情况下,gitlab-ci会触发每次推送的构建.如何在创建合并请求期间使其触发?
提前致谢
我想在我的Android应用程序gradle项目中使用GitLab CI系统.项目存储库托管在GitLab.com上,所以我想使用Gitlab Inc. 提供的一个共享运行器.
虽然官方教程提供了NodeJS 项目运行器配置的示例,并且还有用于Ruby项目的共享运行器,I找不到任何支持Android应用程序的示例甚至是跑步者.
image: android:4.2.2或类似的东西)?android gitlab android-gradle-plugin gitlab-ci gitlab-ci-runner
正如在他们的网站上声称的那样,Gitlab可以用于在将一些代码推入存储库之后自动部署项目,但我无法弄清楚如何.有很多ruby教程,但没有流星或节点.
基本上我只需要在代码被推入我的主分支后重建我的服务器上的Docker容器.有谁知道如何实现它?我是.gitlab-ci.yml的新手,非常感谢帮助.
在Gitlab CI中,只有在特定文件集上发生更改时,如何触发构建?
有没有办法在触发构建时包含或排除某些文件?例如:更新README.md, .gitignore文件不应导致构建触发.
只有在合并请求时才能从gitlab-ci运行一个工作?现在,我们有一个重型测试的大型单一项目,但我们只想在合并到分支主机之前运行测试.
与我的同事一起,我们致力于开发一个每天变得越来越重要的C++库.我们已经通过gitlab-ci.yml文件构建了持续集成实用程序,让我们:
各种让我们选择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)
我们还尝试了一个基本 …
我正在尝试配置gitlab ci以将app部署到谷歌计算引擎.我已成功将图像推送到gitlab存储库但在应用kubernetes部署配置后,我在kubectl describe pods中看到以下错误:
Failed to pull image "registry.gitlab.com/proj/subproj/api:v1": rpc error: code = 2
desc = Error response from daemon: {"message":"Get https://registry.gitlab.com/v2/proj/subproj/api/manifests/v1: unauthorized: HTTP Basic: Access denied"}
Run Code Online (Sandbox Code Playgroud)
这是我的部署gitlab-ci工作:
docker:
stage: docker_images
image: docker:latest
services:
- docker:dind
script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- docker build -t registry.gitlab.com/proj/subproj/api:v1 -f Dockerfile .
- docker push registry.gitlab.com/proj/subproj/api:v1
only:
- master
dependencies:
- build_java
k8s-deploy:
image: google/cloud-sdk
stage: deploy
script:
- echo "$GOOGLE_KEY" > key.json # Google Cloud service account key …Run Code Online (Sandbox Code Playgroud) 我正在开发一个 Laravel 包项目,并设置一个管道来测试它(针对 php 7.3、7.4 和 8.0)合并请求,并将其发布到主分支上的包注册表。
我正在尝试为代码覆盖率设置一个徽章,但我无法使其正常工作,因为它始终是显示unknown百分比。
stages:
- dependancies
- linting
- test
- publish
# Dependancies job
download dependancies:
stage: dependancies
# job stuff
# Linting jobs
phpcs:
stage: linting
# job stuff
# test jobs templates
.testing_template: &testing
stage: test
script:
- php -dxdebug.mode=coverage vendor/bin/phpunit --coverage-text --colors=never
only:
- merge_requests
# Testing jobs
php 8:
image: mileschou/xdebug:8.0
<<: *testing
php 7.4:
image: mileschou/xdebug:7.4
<<: *testing
php 7.3:
image: mileschou/xdebug:7.3
<<: *testing …Run Code Online (Sandbox Code Playgroud)