Module: PuppetX::Gitlab::Runner

Defined in:
lib/puppet_x/gitlab/runner.rb

Class Method Summary collapse

Class Method Details

.register(host, options, proxy = nil, ca_file = nil) ⇒ Object



67
68
69
70
71
# File 'lib/puppet_x/gitlab/runner.rb', line 67

def self.register(host, options, proxy = nil, ca_file = nil)
  url = "#{host}/api/v4/runners"
  Puppet.info "Registering gitlab runner with #{host}"
  PuppetX::Gitlab::APIClient.post(url, options, proxy, ca_file)
end

.unregister(host, options, proxy = nil, ca_file = nil) ⇒ Object



73
74
75
76
77
# File 'lib/puppet_x/gitlab/runner.rb', line 73

def self.unregister(host, options, proxy = nil, ca_file = nil)
  url = "#{host}/api/v4/runners"
  Puppet.info "Unregistering gitlab runner with #{host}"
  PuppetX::Gitlab::APIClient.delete(url, options, proxy, ca_file)
end