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

Open
#712 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
powershell, shell
Domain
ci-cd, devops

Research direction

Start with pkg/integrations/gitlab/snippet-darwin.sh and pkg/integrations/gitlab/snippet-windows.ps1, then compare them with the referenced GitHub and Cirrus snippets. Verify the macOS LaunchDaemon and Windows runner setup use the current user without elevated-account permission problems, while preserving the existing GitLab runner behavior.

Written by the indexing model from the issue text.

Description

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
Dominant language
Go
Stars
26
Forks
41
Avg merge
3d 14h
Merged PRs (30d)
27

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from redhat-developer/mapt

All issues in redhat-developer/mapt

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.