Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runner unregister #123

Closed
cova-fe opened this issue Mar 9, 2017 · 3 comments
Closed

runner unregister #123

cova-fe opened this issue Mar 9, 2017 · 3 comments
Labels
enhancement New feature or request needs-help Extra attention is needed

Comments

@cova-fe
Copy link

cova-fe commented Mar 9, 2017

Hi,
I was wondering if there is a way to tell cirunner to unregister a runner, maybe adding a "ensure absent" parameter, or something like that.
Is something feasible/useful/planned?
If yes, I could have a look at it

@tobru
Copy link
Contributor

tobru commented Mar 15, 2017

This is probably not easily possible as there would have to be communication with the Gitlab API. This is not yet implemented and also not planned in the near future. If you want to work on this, I'll be happy to see a pull request.

@tobru tobru added enhancement New feature or request needs-help Extra attention is needed labels Apr 8, 2017
@timhughes
Copy link

timhughes commented Nov 3, 2017

The new runner has gitlab-runner unregister --name value so you may be able to collect up all the names of you runners and add them to a file somewhere and then unregister any that dont appear in it.

I use the folloowing in my profile to clean up old runners. It doesnt unregister but you can delete them from the UI and then the module will recreate them with the updated config.

  exec { 'gitlab-delete-broken':
    command => 'gitlab-runner verify --delete',
    onlyif  => 'gitlab-runner verify 2>&1 | grep -q "is removed"',
    require => Class['::gitlab::cirunner'],
    returns => 0,
    path    => ['/bin', '/usr/bin', '/usr/sbin'],
  }

@SirUrban
Copy link

Have a look at: #178

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-help Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants