From 6b2caa823bc0b72714af8051f7c8a8d6895a7ceb Mon Sep 17 00:00:00 2001 From: Vilnius Ramanauskas Date: Fri, 19 Jul 2024 10:45:26 +0300 Subject: [PATCH] Docs updated --- REFERENCE.md | 12 ++++++------ lib/puppet/functions/gitlab_ci_runner/unregister.rb | 2 +- .../gitlab_ci_runner/unregister_from_file.rb | 3 ++- types/register.pp | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/REFERENCE.md b/REFERENCE.md index 6d74851..76ec4f3 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -34,7 +34,7 @@ * [`Gitlab_ci_runner::Keyserver`](#Gitlab_ci_runner--Keyserver): Type to match repo_keyserver Regex from: https://github.com/puppetlabs/puppetlabs-apt/blob/main/manifests/key.pp * [`Gitlab_ci_runner::Log_format`](#Gitlab_ci_runner--Log_format): Gitlab Runner log format configuration * [`Gitlab_ci_runner::Log_level`](#Gitlab_ci_runner--Log_level): Gitlab Runner log level configuration -* [`Gitlab_ci_runner::Register`](#Gitlab_ci_runner--Register): A struct of all possible additionl options for gitlab_ci_runner::register +* [`Gitlab_ci_runner::Register`](#Gitlab_ci_runner--Register): A struct of all possible additional options for gitlab_ci_runner::register * [`Gitlab_ci_runner::Register_parameters`](#Gitlab_ci_runner--Register_parameters): A enum containing a possible keys used for Gitlab runner registrations * [`Gitlab_ci_runner::Session_server`](#Gitlab_ci_runner--Session_server): Gitlab Runner session_server configuration @@ -503,7 +503,7 @@ puppet apply -e "notice(gitlab_ci_runner::register('https://gitlab.com', 'regist A function that registers a Gitlab runner on a Gitlab instance. Be careful, this will be triggered on noop runs as well! -Returns: `Struct[{ id => Integer[1], token => String[1], }]` Returns a hash with the runner id and authentcation token +Returns: `Struct[{ id => Integer[1], token => String[1], }]` Returns a hash with the runner id and authentication token ##### Examples @@ -673,7 +673,7 @@ puppet apply -e "notice(gitlab_ci_runner::unregister('https://gitlab.com', 'runn A function that unregisters a Gitlab runner from a Gitlab instance. Be careful, this will be triggered on noop runs as well! -Returns: `Struct[{ status => Enum['success'], }]` Returns a hash with the runner id and authentcation token +Returns: `Struct[{ status => Enum['success'], }]` Returns status ##### Examples @@ -724,7 +724,7 @@ file { '/etc/gitlab-runner/auth-token-testrunner': A function that unregisters a Gitlab runner from a Gitlab instance, if the local token is there. This is meant to be used in conjunction with the gitlab_ci_runner::register_to_file function. -Returns: `Any` +Returns: `String` Returns status ##### Examples @@ -747,7 +747,7 @@ The url to your Gitlab instance. Please only provide the host part (e.g https:// Data type: `String[1]` -The name of the runner. Use as identifier for the retrived auth token. +The name of the runner. Use as identifier for the retrieved auth token. ##### `proxy` @@ -784,7 +784,7 @@ Alias of `Enum['debug', 'info', 'warn', 'error', 'fatal', 'panic']` ### `Gitlab_ci_runner::Register` -A struct of all possible additionl options for gitlab_ci_runner::register +A struct of all possible additional options for gitlab_ci_runner::register Alias of diff --git a/lib/puppet/functions/gitlab_ci_runner/unregister.rb b/lib/puppet/functions/gitlab_ci_runner/unregister.rb index 3a85b75..ea789dc 100644 --- a/lib/puppet/functions/gitlab_ci_runner/unregister.rb +++ b/lib/puppet/functions/gitlab_ci_runner/unregister.rb @@ -8,7 +8,7 @@ # @param url The url to your Gitlab instance. Please only provide the host part (e.g https://gitlab.com) # @param token Runners authentication token. # @param ca_file An absolute path to a trusted certificate authority file. - # @return [Struct[{ id => Integer[1], token => String[1], }]] Returns a hash with the runner id and authentcation token + # @return [Struct[{ status => String[1], }]] Returns status # @example Using it as a replacement for the Bolt 'unregister_runner' task # puppet apply -e "notice(gitlab_ci_runner::unregister('https://gitlab.com', 'runner-auth-token'))" # diff --git a/lib/puppet/functions/gitlab_ci_runner/unregister_from_file.rb b/lib/puppet/functions/gitlab_ci_runner/unregister_from_file.rb index d0c9ebe..e807d7c 100644 --- a/lib/puppet/functions/gitlab_ci_runner/unregister_from_file.rb +++ b/lib/puppet/functions/gitlab_ci_runner/unregister_from_file.rb @@ -6,9 +6,10 @@ # This is meant to be used in conjunction with the gitlab_ci_runner::register_to_file function. Puppet::Functions.create_function(:'gitlab_ci_runner::unregister_from_file') do # @param url The url to your Gitlab instance. Please only provide the host part (e.g https://gitlab.com) - # @param runner_name The name of the runner. Use as identifier for the retrived auth token. + # @param runner_name The name of the runner. Use as identifier for the retrieved auth token. # @param proxy HTTP proxy to use when unregistering # @param ca_file An absolute path to a trusted certificate authority file. + # @return [String] Returns status # @example Using it as a Deferred function with a file resource # file { '/etc/gitlab-runner/auth-token-testrunner': # file => absent, diff --git a/types/register.pp b/types/register.pp index 09bc9de..4b56839 100644 --- a/types/register.pp +++ b/types/register.pp @@ -1,4 +1,4 @@ -# @summary A struct of all possible additionl options for gitlab_ci_runner::register +# @summary A struct of all possible additional options for gitlab_ci_runner::register type Gitlab_ci_runner::Register = Struct[{ Optional[description] => String[1], Optional[info] => Hash[String[1],String[1]],