惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CERT Recently Published Vulnerability Notes
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
WordPress大学
WordPress大学
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
C
Check Point Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
Tor Project blog
P
Proofpoint News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Latest news
Latest news
L
LINUX DO - 热门话题
罗磊的独立博客
T
Tenable Blog
The Hacker News
The Hacker News
美团技术团队
N
Netflix TechBlog - Medium
V
Vulnerabilities – Threatpost
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
博客园 - 司徒正美
Jina AI
Jina AI
Cyberwarzone
Cyberwarzone
云风的 BLOG
云风的 BLOG
S
Secure Thoughts
Cloudbric
Cloudbric
S
Security @ Cisco Blogs
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
Spread Privacy
Spread Privacy
U
Unit 42
雷峰网
雷峰网
C
CXSECURITY Database RSS Feed - CXSecurity.com
Webroot Blog
Webroot Blog
爱范儿
爱范儿
博客园 - 【当耐特】
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
P
Palo Alto Networks Blog
Google Online Security Blog
Google Online Security Blog
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
Help Net Security
Help Net Security
Hacker News: Ask HN
Hacker News: Ask HN
F
Full Disclosure
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Security Affairs
Project Zero
Project Zero

运维开发绿皮书

OBS虚拟摄像头重命名 Ubuntu备份为LiveOS 使用Powershell卸载windows默认程序 Cisco路由器OSPF配置 汽车的分类和特点 Windows11跳过TPM2.0 HTTPS 双向认证与 USB 加密锁配置实战 SSL 证书工具 字数统计 BMI 计算 颜色转换 Hash 生成器 JSON 格式化 JWT 解码 房贷计算 时间戳转换 URL 编码 UUID 生成 牛马时钟 二维码批量生成器 CKS Simulator Kubernetes 1.25 FRP TOTP验证码生成器 direct-ssh-passthrough-nat 脚本使用说明 Python软件授权 Linux命令行百度网盘 为 Containerd 配置 Harbor 无证书镜像站 Docker一键部署Meta和MetacubexD面板 必应搜索屏蔽垃圾网站 VMware的ubuntu完整安装vm-tools支持粘贴板 Docker Desktop 安装到其他位置 Dell EMC PowerEdge R740服务器内存插槽使用说明及正确安装方法 tc常用命令总结 OpenStack排错 稳定币监管与投资指南 VMware ESXi 密码恢复指南 VMware 加密 state.tgz 文件解密教程 六百万数据 MySQL count(*) 优化 使用iptables禁止特定子网访问指定端口 解决 iptables DNAT 无法转发到 127.0.0.1 的问题及安全风险分析 Linux 一键测试脚本 Gitlab配置详解 Gitlab批量创建用户 Ubuntu安装VNC教程 Windows11跳过微软账号登录 vue配置Nginx伪静态 Linux下Ollama开放端口 模型详解配置 修改Git提交历史中的作者信息 在PowerShell中启动Git Bash的方法 一键安装OpenVPN 大语言模型 模型架构-Transformer模型 训练相关资料 GPT&DeepSeek模型 大模型技术基础 Git Bash 中一键安装 pacman Docker运行kwaivgi-liveportrait Firefox密码提取 在x86-64上构建和运行多种架构的Docker容器 flutter配置镜像站 VMware最新下载地址(纪念碑) 一键安装Conda Docker老版本runc报错无法启动 清理Rancher节点 aapanel 7.x 中文语言配置指南 Ubuntu 22 安装 Kubernetes 1.29 集群指南 Ubuntu修复CNVD-2024-4920726 GRUB锁定密码 Grub2手动引导Linux Cron在线表达式生成器 GitLab一键设置镜像源 文本字符串倒序 Windows禁用任务管理器 UOS(1070a)服务器版本部署Kubernetes1.28 Windows11恢复Windows10右键菜单 Ubuntu一键设置镜像源 CentOS 7 一键设置Vault镜像 Base64在线编码解码 代码差异对比 为Docker分配物理网卡 解密CFSSL生成的CRL数据 已经在谷底了 怎么走都是向上 GitLab统计提交代码行数Python代码 Windows11的24H2出现扩展错误 Windows绕过MicroSoft Store直接下载应用 Fossy平台离线部署分析 在WSL中移除Windows环境变量 重装MicroSoft Store Sony Xperia 10 IV(pdx225)AOSP14编译和刷机方法 pnpm在DevContainer中存储出错解决方法 从SVN迁移仓库到Git Ubuntu中移除Snap软件包 使用Netcat检测UDP端口连通性 rke2集群命令行调试方法 Ubuntu隐私优化-关闭公共门户连接检查 Cisco路由器配置ipv4和ipv6的VTY账户密码 Python实现九九乘法表 Windows10中用多网卡链路聚合来解决网卡网速瓶颈 CentOS7 安装 OpenResty
Gitlab-Runner的一些问题
Paper-Dragon · 2025-04-25 · via 运维开发绿皮书

Gitlab-Runner的一些问题

Gitlab在mac下环境变量和用户环境变量不一致的问题

相关信息

具体问题表现: 在zsh和bash下可以运行flutter命令,但是在pipline里面会显示flutter: command not found

解决方法

编辑服务的plist文件,新增环境变量,

编辑服务文件 /Users/mac/Library/LaunchAgents/gitlab-runner.plist

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Disabled</key>
        <false/>
        <key>KeepAlive</key>
        <true/>
        <key>Label</key>
        <string>gitlab-runner</string>
        <key>ProgramArguments</key>
        <array>
                <string>/opt/homebrew/bin/gitlab-runner</string>
                <string>run</string>
                <string>--config</string>
                <string>/Users/mac/.gitlab-runner/config.toml</string>
                <string>--working-directory</string>
                <string>/Users/mac</string>
                <string>--service</string>
                <string>gitlab-runner</string>
                <string>--syslog</string>
        </array>
        <key>EnvironmentVariables</key>
        <dict>
          <key>PATH</key>
          <string>/opt/homebrew/bin/:/opt/devTools/flutter/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/opt/devTools/flutter/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin</string>
        </dict>
        <key>RunAtLoad</key>
        <true/>
        <key>SessionCreate</key>
        <false/>
        <key>StandardErrorPath</key>
        <string>/Users/mac/gitlab-runner.err.log</string>
        <key>StandardOutPath</key>
        <string>/Users/mac/gitlab-runner.out.log</string>
</dict>
</plist>

运行命令

先加载配置及然后停止然后启动。(别重启,有概率报错,可能是bug)

launchctl load ~/Library/LaunchAgents/homebrew.mxcl.gitlab-runner.plist

gitlab-runner stop
gitlab-runner start

这样问题就迎刃而解了

Gitlab的CI中日志超过4194304bytes的问题

相关信息

报错信息: 在GitLab面板的job里面显示日志超过4MB无法继续显示更多日志,在写gitlab-ci文件的时候如果遇到报错根本无法调试,这是一个致命的问题。尤其是xcode编译xcarchive然后再打包为ipa文件的时候,日志动不动就是5MB多,下面的文档给出解决方案。

Job's log exceeded limit of 4194304 bytes

问题的原因

根据描述及任务执行状态的初步判断,是因为控制台输出的信息量过大,超出了GitLab Runner默认允许的大小。

解决方法

  • 找到gitlab-runner的配置文件,(如果找不到可以使用命令 gitlab-runner list 命令能够看到字段ConfigFile,即为当前使用的runner配置)
  • 在runner字段下添加output_limit字段设置大小,我这写为1048576大小,也就是最大1G
  • 重启runner

在mac中如果使用的是brew安装的runner,默认配置文件在

cat /Users/<用户名>/.gitlab-runner/config.toml

修改好的配置

concurrent = 1
check_interval = 0
shutdown_timeout = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "C4a0-170 Mac Bash 6c32g500g"
  url = "http://gitlabr.c4a.com/"
  id = 34
  token = "EK...BM"
  token_obtained_at = 2024-06-06T09:37:57Z
  token_expires_at = 0001-01-01T00:00:00Z
  executor = "shell"
  output_limit = 1048576
  [runners.custom_build_dir]
  [runners.cache]
    MaxUploadedArchiveSize = 0
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]

重启runner

结果

经过验证,完美解决问题。

更新日志

  • 5a3c8-集中gitlab-runner的问题,更改文件名称GitLab的CI中日志超过4194304bytes的问题为Gitlab-Runner的一些问题