可以.gitlab-ci.yml添加在所有定义的作业before_script之前运行的默认值。script
before_script我的问题是为什么在工作中定义而不是仅script在工作中使用?before_script在作业中使用只是为了覆盖默认值before_script,还是还有其他情况或原因?
我在他们的服务器上使用gitlab.我想通过像这样的API下载我最新的构建工件(通过gitlab-ci构建)
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.com/api/v3/projects/1/builds/8/artifacts"
我在哪里可以找到这个项目ID?或者这种使用API的方式不适用于托管的gitlab项目?
BW休伯特
我terraform plan在管道中发生了以下错误:
Error: Error locking state: Error acquiring the state lock: ConditionalCheckFailedException: The conditional request failed
Lock Info:
ID: 9db590f1-b6fe-c5f2-2678-8804f089deba
Path: ...
Operation: OperationTypePlan
Who: ...
Version: 0.12.25
Created: 2020-05-29 12:52:25.690864752 +0000 UTC
Info:
Terraform acquires a state lock to protect the state from being written
by multiple users at the same time. Please resolve the issue above and try
again. For most commands, you can disable locking with the "-lock=false"
flag, but this is not recommended.
Run Code Online (Sandbox Code Playgroud)
这很奇怪,因为我确定没有其他并发计划。有没有办法处理这个问题?我应该如何解除这个锁?
我有一个.gitlab-ci.yml文件,其中包含以下内容:
image: docker:latest
services:
- docker:dind
before_script:
- docker info
- docker-compose --version
buildJob:
stage: build
tags:
- docker
script:
- docker-compose build
Run Code Online (Sandbox Code Playgroud)
但在ci-log我收到消息:
$ docker-compose --version
/bin/sh: eval: line 46: docker-compose: not found
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
我们使用gitlab ci和共享运行器来进行持续集成.对于每个构建,运动员下载大量的maven工件.
有没有办法配置gitlab ci来缓存这些工件,这样我们可以通过阻止一遍又一遍地下载相同的工件来加快构建过程?
如何仅在标记的Master分支上运行.gitlab-ci.yml作业?
job:
script:
- echo "Do something"
only:
- master
- tags
Run Code Online (Sandbox Code Playgroud)
如果存在任何条件,则上述代码将运行:主分支或标记的提交.
我的目标是让这个生产部署运行,但它需要它在Master分支上并且它被标记(带有版本).否则,我将有另一个工作,如果它缺少一个标签将推送到暂存.
几个月前我注册了一个个人 GitLab 运行器,但我不再使用它。如何完全删除它,使其不会显示在我的 GitLab CI/CD 设置页面上?
由于此错误,我无法运行 gitlab 管道
Invalid CI config YAML file
jobs:run tests:artifacts:reports config contains unknown keys: cobertura
Run Code Online (Sandbox Code Playgroud) 我一直在研究C#应用程序,并想尝试GitLab CI.我只能看到Ruby,无法找到有关如何使用它构建C#应用程序的任何信息.
当我运行测试设置时,我进行提交,但我没有构建.
我该如何进行简单的构建?我可以使用哪个命令?如果我得到一个失败的构建(但是构建),我不介意.
我设置了GitLab和GitLab CI来托管和测试我的一些私人回购.对于我在这个系统下的作曲家模块,我设置了Satis来解析我的私人包.
显然这些私有包需要一个ssh密钥来克隆它们,我在终端中工作 - 我可以运行composer install并获取这些包,只要我ssh-add在shell中添加了密钥.
但是,当在GitLab CI中运行我的测试时,如果项目具有任何这些依赖项,则测试将无法完成,因为我的GitLab实例需要身份验证才能获得deps(显然),并且测试失败了Host key verification failed.
我的问题是如何设置它以便当跑步者运行测试时它可以在没有密码的情况下对gitlab进行身份验证?我已经尝试在我的runners ~/.ssh文件夹中放置一个无密码的ssh-key ,但是构建甚至不会添加密钥,"eval ssh-agent -s"后面跟ssh-add似乎没有说代理没有运行...
ssh continuous-integration gitlab gitlab-ci gitlab-ci-runner