我正在尝试安装gitlab-ci-multi-runner在ElementaryOS Freya上,但没有成功.
我正确地按照官方文档中的步骤操作:
答案总是:
luiz@kryptonita:~/node/my-nodejs-app$ sudo apt-get install gitlab-ci-multi-runner
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package gitlab-ci-multi-runner
Run Code Online (Sandbox Code Playgroud)
要理解:我正在尝试设置一个Runner来测试Node.js"Hello World".我正在研究这项技术.
编辑:结果cat /etc/apt/sources.list.d/runner_gitlab-ci-multi-runner.list
# this file was generated by packages.gitlab.com for
# the repository at https://packages.gitlab.com/runner/gitlab-ci-multi-runner
deb https://packages.gitlab.com/runner/gitlab-ci-multi-runner/elementaryos/ freya main
deb-src https://packages.gitlab.com/runner/gitlab-ci-multi-runner/elementaryos/ freya main
Run Code Online (Sandbox Code Playgroud) 我正在使用 gitlab-ci 为我的 CI/CD 发布一个 NPM 模块到注册表。以下是我的 gitlab-ci.yml 文件
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
services:
- docker:dind
cache:
untracked: true
key: "$CI_COMMIT_REF_NAME"
paths:
- node_modules/
stages:
- setup
job-setup:
stage: setup
tags:
- angular
image: node:alpine
except:
- tags
script:
- npm set registry https://registry.npmjs.org
- npm i
- cp .npmrc ~/.npmrc
- npm publish --registry https://registry.npmjs.org
Run Code Online (Sandbox Code Playgroud)
我在发布命令上收到以下警告消息。模块已发布,但模块中的 /dist 文件夹丢失。
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts are deprecated.
npm WARN prepublish-on-install Use `prepare` for build steps and `prepublishOnly` …Run Code Online (Sandbox Code Playgroud) 我的.gitlab-ci.yml中有这样的任务
deploy_all:
stage: deploy
script:
- cp project/target/jnlp/* html/jnlp/
tags:
- client:deploy-all
Run Code Online (Sandbox Code Playgroud)
一切正常,除非不必要的git仓库获取。以下是跑步者日志中的摘录
Running with gitlab-ci-multi-runner 9.1.0 (0118d89)
...
Fetching changes...
HEAD is now at 8dfc104 Update .gitlab-ci.yml
...
Job succeeded
Run Code Online (Sandbox Code Playgroud)
这里不需要存储库,因为我只需要其他任务的工件。是否可以禁用此行为?
我正在尝试在树莓派上的 kubernetes 集群上运行 gitlab-runner。
gitlab 管道生成以下输出:
Running with gitlab-runner 10.4.0 (857480b6) on hello-world-gitlab-runner-6548-tq4mr (123)
Using Kubernetes namespace: gitlab
Using Kubernetes executor with image arm32v7/node ...
Waiting for pod gitlab/runner-123-project-456-concurrent-789 to be running, status is Pending
Waiting for pod gitlab/runner-123-project-456-concurrent-789 to be running, status is Pending
Waiting for pod gitlab/runner-123-project-456-concurrent-789 to be running, status is Pending
ERROR: Job failed (system failure): unable to upgrade connection: container not found ("helper")
Run Code Online (Sandbox Code Playgroud)
gitlab-runner pod 记录以下输出:
+ cp /scripts/config.toml /etc/gitlab-runner/
+ /entrypoint register --non-interactive --executor …Run Code Online (Sandbox Code Playgroud) 目前我在多个工具中面临路径问题,因为 gitlab clone dir 的路径长度,使用 gitlab runner。 当前目录结构:C:\gitLab\builds\576aef34\0\root\TEST
有什么办法可以缩短这个路径,比如:C:\gitLab\builds\TEST
我有一个项目,它在遵循特定约定的文件夹中生成 go main 文件。问题是,当有代码推送时,我需要在 Gitlab CI 管道中并行构建这些项目,并且我无法对它们进行硬编码,.gitlab-ci.yml因为它们是动态生成的。我需要并行构建这些 go 项目,并且如果所有单个项目构建都成功,则需要通过构建阶段。有人可以告诉我在 Gitlab 中是否可行吗?
我正在数字海洋服务器上使用 gitlab runner 运行我的 Rails 测试。我将捆绑器缓存保存在数字海洋空间中
另外,当测试用例失败时,我还使用 capybara-screenshot 来制作页面的屏幕截图。当测试失败时,屏幕截图将被保存到./tmp/capybara/
然后,在测试运行结束后,构建服务器将被删除,屏幕截图也会丢失,这使得测试失败的调查变得更加困难。
有没有办法./tmp/capybara/使用 gitlab 运行程序用来检索/上传缓存的密钥和秘密将文件夹的内容上传到数字海洋空间?
我正在尝试配置一个跑步者并使用参考https://docs.gitlab.com/runner/commands/
但不清楚运行/启动/安装/注册的命令生命周期是什么
应该在我重新启动系统时调用一次或每次调用 register。安装和启动怎么样?
要重新启动跑步者,我应该怎么做stop,
uninstall然后install
start
run呢?
我应该这样run做还是start会产生相同的效果?
我想在我的 docker 镜像中运行sentry-cli,如下所示:
sentry-frontend:
stage: sentry
services:
- docker:18-dind
before_script:
- docker login -u gitlab-ci-token -p "$CI_JOB_TOKEN" registry.xxx.xx
script:
- export SENTRY_AUTH_TOKEN=xxxxxxxxxxxxxxxxxx
- export IMAGE=$CI_REGISTRY_IMAGE/frontend-builder:$CI_COMMIT_REF_NAME
- export RELEASE_VERSION=$CI_COMMIT_REF_NAME
- docker pull getsentry/sentry-cli
- docker run --rm -v $(pwd):/work getsentry/sentry-cli releases -o org -p frontend new $RELEASE_VERSION
tags:
- dindRun Code Online (Sandbox Code Playgroud)
然而工作失败了,因为
error: API request failed
caused by: sentry reported an error: Authentication credentials were not provided. (http status: 401)
我试过:
- docker run --rm -v $(pwd):/work getsentry/sentry-cli --auth-token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
但是之后我收到了与跑步时相同的消息
docker …
我试图找到解决这个问题的方法,但没有找到。
问题:
我们有图像文件/public/img/InfoNews/example.png,每次推送更新时 gitlab-runner 都会删除远程上的这些文件。
我们/public/img/InfoNews的.gitignore这可以防止 git 上传本地文件,但不能出于某种原因删除该文件夹中的远程文件。
我尝试将此路径添加到缓存和工件中,但.gitlab-ci.yml没有成功
朝着正确的方向推动是值得赞赏的。
我们的.gitlab-ci.yml:
cache:
paths:
- vendor/
- public/img/
deploy:
stage: deploy
script:
- php artisan cache:clear
- rm -rf vendor/
- composer install
- echo "$env" > "$(pwd)/.env"
- php artisan migrate
artifacts:
paths:
- .env
- public/img/
Run Code Online (Sandbox Code Playgroud)
编辑:
我也尝试过
cache:
untracked: true
paths:
- vendor/
- public/img/
Run Code Online (Sandbox Code Playgroud)
但它仍然删除文件。
gitlab-ci-runner ×10
gitlab ×8
gitlab-ci ×6
arm ×1
docker ×1
git ×1
kubernetes ×1
npm ×1
npm-publish ×1
raspberry-pi ×1
sentry ×1