嗯,非常基本的问题,但我没找到(好)文件; 开始了:
/opt/gitlab-runner/bin/runner?/opt/gitlab-runner/bin/runner:开始几个这样的过程是否有意义?(它们不会在gitlab-ci webview中的"Runners"选项卡下单独显示)谢谢.
现在,任何在我的项目中创建分支并向其添加.gitlab-ci.yml文件的人都可以使用运行程序在我的服务器上执行命令.如何才能使主持人或所有者可以上传CI配置文件并对其进行更改?
我正在使用https://gitlab.com/gitlab-org/gitlab-ci-multi-runner在bash上运行.
我试图在Windows上使用bash作为GitLab CI Runner的shell.
concurrent = 1
check_interval = 0
[[runners]]
name = "DESKTOP-RQTQ13S"
url = "https://example.org/ci"
token = "fooooooooooooooooooobaaaaaaaar"
executor = "shell"
shell = "bash"
[runners.cache]
Run Code Online (Sandbox Code Playgroud)
不幸的是,我找不到一个选项来指定CI Runner应该使用的实际shell程序.默认情况下,它只是尝试运行bash它找不到的.我不知道为什么,因为当我打开Windows命令行并输入bash它时.
Running with gitlab-ci-multi-runner 1.9.4 (8ce22bd)
Using Shell executor...
ERROR: Build failed (system failure): Failed to start process: exec: "bash": executable file not found in %PATH%
Run Code Online (Sandbox Code Playgroud)
我尝试将文件添加bash.cmd到包含的用户目录中
@"C:\Program Files\Git\usr\bin\bash.exe" -l
Run Code Online (Sandbox Code Playgroud)
这给了我这个奇怪的错误:
Running with gitlab-ci-multi-runner 1.9.4 (8ce22bd)
Using Shell executor...
Running on DESKTOP-RQTQ13S...
/usr/bin/bash: line 43: /c/Users/niklas/C:/Users/niklas/builds/aeb38de4/0/niklas/ci-test.tmp/GIT_SSL_CAINFO: No …Run Code Online (Sandbox Code Playgroud) 我试图让我的设置与gitlab-ci一起工作.我有一个简单的gitlab-ci.yml文件
build_ubuntu:
image: ubuntu:14.04
services:
- rikorose/gcc-cmake:gcc-5
stage: build
script:
- apt-get update
- apt-get install -y python3 build-essential curl
- cmake --version
tags:
- linux
Run Code Online (Sandbox Code Playgroud)
我想安装一个带有gcc和cmake(apt-get版本是旧的)的ubuntu 14.04 LTS.如果我在本地使用它(通过docker --link命令)一切正常,但是当gitlab-ci-runner将处理它时,我得到以下waring(在我的情况下是一个错误)
Running with gitlab-ci-multi-runner 9.2.0 (adfc387)
on xubuntuci1 (19c6d3ce)
Using Docker executor with image ubuntu:14.04 ...
Starting service rikorose/gcc-cmake:gcc-5 ...
Pulling docker image rikorose/gcc-cmake:gcc-5 ...
Using docker image rikorose/gcc-cmake:gcc-5
ID=sha256:ef2ac00b36e638897a2046c954e89ea953cfd5c257bf60103e32880e88299608
for rikorose/gcc-cmake service...
Waiting for services to be up and running...
*** WARNING: Service runner-19c6d3ce-project-54-concurrent-0-rikorose__gcc-
cmake probably didn't start properly.
Error …Run Code Online (Sandbox Code Playgroud) 我是我公司 GitLab 服务器的(初学者)管理员,我有一个共享运行器由于未知原因被锁定。我找不到任何关于锁定意味着什么(以及与“暂停”的区别)或跑步者如何锁定的信息。我也试图找到一种解锁的方法,但我所能找到的只是“如何首先注册解锁的跑步者”。
gitlab-runner unregister the-runner-name。gitlab-runner register --locked=false。gitlab-runner verify --delete。使用类似 的内容编辑当前跑步者gitlab-runner edit the-runner-name --locked=false。
转到https://gitlab.my-company.com/admin/runners并单击Unlock runner。
有没有办法解锁跑步者,或者我是否必须在每次锁定跑步者时取消注册并注册一个新跑步者?
我想在管道中运行特定作业,我认为为作业分配一个标签,然后在 post 方法中再次指定此标签将满足我的需求。问题是当我使用 api(post) 触发时,所有作业在管道中触发事件虽然只有一个标记为 .
gitlab-ci.yml :
job1: 脚本: - echo "helloworld!" 标签: [我的标签]
job2: 脚本: - echo "hello gitlab!"
api 调用: curl -X POST -F token="xxx" -F ref="myTag" https://gitlab.com/api/v4/projects/12345678/trigger/pipeline
如何更改gitlab多跑者构建路径.
在我的服务器中它有/ home/gitlab-runner/builds.
我想将此路径更改为安装在同一服务器中的辅助HDD.
我试图设置Gitlab Pages,直到现在我完成了上传我的静态网站文件
Uploading artifacts...
coverage/lcov-report: found 77 matching files
Uploading artifacts to coordinator... ok id=1038 responseStatus=201 Created token=QXJjgkf2
Run Code Online (Sandbox Code Playgroud)
但我不知道我的页面托管在哪里.
我瞥了一眼这个文档,但它对我来说仍然含糊不清.
project1在我的团队之下team1.我假设我应该在http://team1.abc.def.com/project1上看到我的静态页面,但没有任何内容.我的网页到底在哪里托管?
我有以下gitlab-ci.yml文件,它读取package.json使用jq处理器动态设置工件文件夹的变量名称,类似于
image: node:latest
stages:
- build
before_script:
## steps ignored for purpose of question
- export NAME_OF_ARTIFACT_FOLDER=$(cat package.json | jq -r .name)"_"$(cat package.json | jq -r .version)".zip"
- echo $NAME_OF_ARTIFACT_FOLDER ##prints the expected name here eg. myApp_1.0.0.zip
prod_build:
stage: build
script:
- echo $NAME_OF_ARTIFACT_FOLDER ##prints the expected name here eg. myApp_1.0.0.zip
- yarn run build
artifacts:
paths:
- dist/$NAME_OF_ARTIFACT_FOLDER ## this does not work
expire_in: 2 hrs
Run Code Online (Sandbox Code Playgroud)
这里的问题是- dist/$NAME_OF_ARTIFACT_FOLDER不起作用,不确定这里是否遗漏了什么。
编辑
在对如下所示的预期路径进行硬编码后,它工作正常,这意味着文件夹名称是有效的,并且工件确实被正确识别,但在来自 $NAME_OF_ARTIFACT_FOLDER …
我们使用Gitlab CI作为CI/CD运行AWS ECS/ECR.由于负载增加,我们正在寻找在AWS上自动调整跑步者的最佳方法.我知道Gitlab为其ci-runner支持Autoscaling.https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/
但我想知道是否可以在AWS上利用ECS集群来实现此目的.有没有人在ECS上使用Loadbalancer和Autoscaling在ECS集群上设置运行器,并且可以提供有关此类设置的一些见解?
merci提前
一个
gitlab-ci-runner ×10
gitlab ×7
gitlab-ci ×7
amazon-ecs ×1
bash ×1
gitlab-ce ×1
linux ×1
post ×1
tags ×1
windows ×1