Fix GitLab runner snippets to run as current user on Windows and Mac

未关闭
#712 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
powershell, shell
领域
ci-cd, devops

调研方向

从 pkg/integrations/gitlab/snippet-darwin.sh 和 pkg/integrations/gitlab/snippet-windows.ps1 开始,然后将它们与所引用的 GitHub 和 Cirrus snippet 进行比较。验证 macOS LaunchDaemon 和 Windows runner 设置使用当前用户,且不会因高权限账户而出现权限问题,同时保留现有的 GitLab runner 行为。

由索引模型根据 Issue 内容生成。

描述

Problem

As per https://github.com/redhat-developer/mapt/pull/711, more specifically GitLab runner snippets for Windows and Mac install as system services running under privileged accounts (SYSTEM/root), unlike other integrations (GitHub Actions, Cirrus) which run as the current user.

See related comment in PR: https://github.com/redhat-developer/mapt/pull/711#issuecomment-3785957041

Impact

  • Permissions issues accessing user files/directories
  • Different behavior than other CI runner integrations
  • Security concerns running as elevated accounts

Solution

Update snippets to match pattern from GitHub/Cirrus integrations:

Mac (snippet-darwin.sh)
  • Configure LaunchDaemon UserName to run as current user
  • Similar to: pkg/integrations/github/snippet-darwin.sh line 10 or pkg/integrations/cirrus/snippet-darwin.sh lines 32-35
Windows (snippet-windows.ps1)
  • Either use startup folder approach (like Cirrus)
  • Or configure service to run as current user

Files

  • pkg/integrations/gitlab/snippet-darwin.sh
  • pkg/integrations/gitlab/snippet-windows.ps1

Reference

  • GitHub snippet: pkg/integrations/github/snippet-darwin.sh
  • Cirrus snippet: pkg/integrations/cirrus/snippet-darwin.sh
主要语言
Go
星标
26
派生
41
平均合并
3 天 14 小时
30 天内合并 PR
27

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

redhat-developer/mapt 的其他 Issue

查看 redhat-developer/mapt 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。