traderepublic / Cilicon

🛠️ Self-Hosted ephemeral macOS CI on Apple Silicon
MIT License
950 stars 28 forks source link

GitLab Runner add additional registration attribute in Provisoner #17

Closed displayn closed 1 year ago

displayn commented 1 year ago

Hey folks, GitLab Runners will always register and run with the setting untagged jobs set to true. It would be nice if the configuration block could contain the attribute run_untaggedin the cilicon.yml to set this value during the GitLab Runner registration process [1] against the GitLab Server API[2].

Here is a draft example how the config block could look like:

provisioner:
  type: gitlab
  config:
     name: "cilicon-runner"
     url: "https://<gitlab-url>"
     registrationToken: "<registration-token>"
     run_untagged: false
     tagList: "macos-cilicon"

[1] https://github.com/traderepublic/Cilicon/blob/main/Cilicon/Provisioner/GitLab%20Runner/GitLabService.swift#L32-L34 [2] https://docs.gitlab.com/ee/api/runners.html#register-a-new-runner

ast3150 commented 1 year ago

As part of the deprecation of the runner registration token, the run_untagged field will be removed from the API. This functionality can now be controlled in the GitLab Admin UI when creating a runner. This issue should be resolved once the updated GitLab Provisioner is available. More info here: https://docs.gitlab.com/ee/ci/runners/new_creation_workflow.html

See: #23

Marcocanc commented 1 year ago

Given @ast3150 's answer I will close this