[Backport 2.9] gitlab_runner: fix idempotency for shared runners (#65545)

* gitlab_runner: fix idempotency for shared runners (#65176)


(cherry picked from commit 2eb615f1ef)

* add changelog
pull/69136/head
Guillaume Martinez 5 years ago committed by Matt Clay
parent b05a2c8a62
commit 1159193d16

@ -0,0 +1,2 @@
bugfixes:
- gitlab_runner - fix idempotency for shared runner

@ -258,10 +258,10 @@ class GitLabRunner(object):
@param description Description of the runner @param description Description of the runner
''' '''
def findRunner(self, description): def findRunner(self, description):
runners = self._gitlab.runners.list(as_list=False) runners = self._gitlab.runners.all(as_list=False)
for runner in runners: for runner in runners:
if (runner.description == description): if (runner['description'] == description):
return self._gitlab.runners.get(runner.id) return self._gitlab.runners.get(runner['id'])
''' '''
@param description Description of the runner @param description Description of the runner

Loading…
Cancel
Save