- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我的 Gitlab 管道设置有以下问题。
我发现在 bash 中显示了“shell runner”,但在 .yml 文件中我使用了“tags: -docker”。如果我重新运行该工作,有时它会工作并使用正确的运行者,但大多数时候不会。
这是 bash 输出:
使用 gitlab-runner 10.8.0 (079cad9e) 运行
在 aws-xyz c444133a 上
使用 Shell 执行器...
在 ip-xyz 上运行...
正在获取更改...
HEAD 现在位于 eb4ea13 xyz:删除了数据重试队列
正在检查 e0461c05 作为后端测试...
跳过 Git 子模块设置
正在检查默认 1 的缓存...
成功提取缓存
$ echo "这是在每一步之前完成的"
这是在每一步之前完成的
$ echo "更新容器内的服务器软件"
更新容器内的服务器软件
$ apt-get 更新-y
阅读包裹 list ...
W: 目录/var/lib/apt/lists/partial 的 chmod 0700 失败 - SetupAPTPartialDirectory(1:不允许操作)
E: 无法打开锁文件/var/lib/apt/lists/lock - 打开(13:权限被拒绝)
E: 无法锁定目录/var/lib/apt/lists/
W:取消链接文件/var/cache/apt/pkgcache.bin 时出现问题 - RemoveCaches(13:权限被拒绝)
W:取消链接文件/var/cache/apt/srcpkgcache.bin 时出现问题 - RemoveCaches(13:权限被拒绝)
在脚本之后运行...
$ echo "这是在每一步之后完成的"
这是在每一步之后完成的
错误:作业失败:退出状态 1
这是gitlab-ci.yml文件中的作业:
后端测试:
图片:节点:6
服务:
- 名称:mysql:5.7
阶段:测试
变量:
MYSQL_ROOT_PASSWORD: xyz
MYSQL_DATABASE: xyz
MYSQL_USER: xyz
MYSQL_PASSWORD: xyz
数据库方言:mysql
数据库数据库:xyz
DBUSER: xyz
数据库密码:xyz
数据库主机:mysql
数据库端口:“3306”
脚本:
- echo “更新容器内的服务器软件”
- 易于获取更新-y
-apt-get升级-y
- echo “安装依赖项”
- cd api/后端/
- ls -lah
- npm 安装
- echo "开始测试"
- NODE_ENV=test npm run test-code-coverage
标签:
- docker
有什么想法吗?
最佳答案
@编辑:来自here :
tags is used to select specific Runners from the list of all Runners that are allowed to run this project.
如评论中所述,您执行的 shell 必须使用 docker
标记,这导致他被选为该作业的执行者。
这是我的旧答案:
您正在使用 shell 执行器,并且来自 here :
Shell executor is a simple executor that allows you to execute builds locally to the machine that the Runner is installed
...
If GitLab Runner is installed on Linux from the official .deb or .rpm packages, the installer will try to use the gitlab_ci_multi_runner user if found. If it is not found, it will create a gitlab-runner user and use this instead. ....
In some testing scenarios, your builds may need to access some privileged resources
...
Generally it's unsafe to run tests with shell executors. The jobs are run with the user's permissions (gitlab-runner) and can "steal" code from other projects that are run on this server. Use it only for running builds on a server you trust and own.
您正在运行的命令是作为 gitlab-runner
用户执行的,没有运行 apt-get
命令的权限。您可以:
gitlab-runner ALL=(ALL) NOPASSWD: ALL
(或类似的)添加到安装了 gitlab-runner 的机器上的/etc/sudoers 并更改行 apt-get update
到 sudo apt-get update
,这将以特权用户 (root) 身份执行它们。关于linux - 在 gitlab CI 中,gitlab runner 选择了错误的执行者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50678061/
所以我有一个排行榜,我每天使用以下查询有效地获取每个用户的分数: SELECT DATE(a.time) as time, a.userid, SUM(activity_weight) as weig
假设我有一个 ExecutorService(它可以是一个线程池,因此涉及到并发性),它在不同的时间执行一个任务,或者周期性地或者响应一些其他条件。要执行的任务如下: 如果此任务已在进行中,则什么也不
我正在运行的服务器应用程序收到多个任务请求,我想使用任务系统处理这些请求。 每个任务都表示为一个 Runnable,它将从线程池中请求 n 个线程,其中 n 小于或等于线程池大小。为了不线程过多导致
我有一个 long_task 函数,它运行大量 cpu 绑定(bind)计算,我想通过使用新的 asyncio 框架使其异步。生成的 long_task_async 函数使用 ProcessPoolE
Java 文档说 CompletableFuture:supplyAsync(Supplier supplier)在 ForkJoinPool#commonPool() 中运行任务而 Completa
我想了解 Spark Streaming 中的一个基本知识。我有 50 个 Kafka 主题分区和 5 个执行程序,我使用的是 DirectAPI,所以没有。 RDD 分区的数量将为 50。如何在 5
我的问题与 this one here 密切相关.正如在那里发布的那样,我希望主线程等到工作队列为空并且所有任务都已完成。然而,我的情况的问题是,每个任务都可能递归地导致提交新任务进行处理。这使得收集
我是一名优秀的程序员,十分优秀!