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

Update --help #282

Merged
merged 3 commits into from
Jan 17, 2020
Merged

Update --help #282

merged 3 commits into from
Jan 17, 2020

Conversation

dakale
Copy link
Contributor

@dakale dakale commented Jan 14, 2020

Updates --help document to separate out common/config/run options that are exposed by these helper scripts

Separates options that are only useful on Windows (for running as service)

Omits internal binary flags that arent a public api, monitorsocketaddress and startuptype.
Omits auth because I think only one auth type is supported right now.
Omits username and pool which seem to be unused.

Provides basic examples for common scenarios (unattended, scripted setup)

Windows/Unix:

Commands:
 .\config.cmd         Configures the runner
 .\config.cmd remove  Unconfigures the runner
 .\run.cmd            Runs the runner interactively. Does not require any options.

Options:
 --help     Prints the help for each command
 --version  Prints the runner version
 --commit   Prints the runner commit

Config Options:
 --unattended     Disable interactive prompts for missing arguments. Defaults will be used for missing options
 --url string     Repository to add the runner to. Required if unattended
 --token string   Registration token. Required if unattended
 --name string    Name of the runner to configure (default DAKALE-WORK)
 --work string    Relative runner work directory (default _work)
 --replace        Replace any existing runner with the same name (default false)
 --runasservice   Run the runner as a service
 --windowslogonaccount string   Account to run the service as. Requires runasservice
 --windowslogonpassword string  Password for the service account. Requires runasservice

Run Options:
 --once  Exit after completing a job. Does not remove the runner

Examples:
 Configure a runner non-interactively:
  .\config.cmd --unattended --url <url> --token <token>
 Configure a runner non-interactively, replacing any existing runner with the same name:
  .\config.cmd --unattended --url <url> --token <token> --replace [--name <name>]
 Configure a runner to run as a service:
  .\config.cmd --url <url> --token <token> --runasservice

--------------------------------------------------------------------------------------------------------------------

Commands:
 ./config.sh         Configures the runner
 ./config.sh remove  Unconfigures the runner
 ./run.sh            Runs the runner interactively. Does not require any options.

Options:
 --help     Prints the help for each command
 --version  Prints the runner version
 --commit   Prints the runner commit

Config Options:
 --unattended     Disable interactive prompts for missing arguments. Defaults will be used for missing options
 --url string     Repository to add the runner to. Required if unattended
 --token string   Registration token. Required if unattended
 --name string    Name of the runner to configure (default DAKALE-WORK)
 --work string    Relative runner work directory (default _work)
 --replace        Replace any existing runner with the same name (default false)

Run Options:
 --once  Exit after completing a job. Does not remove the runner

Examples:
 Configure a runner non-interactively:
  ./config.sh --unattended --url <url> --token <token>
 Configure a runner non-interactively, replacing any existing runner with the same name:
  ./config.sh --unattended --url <url> --token <token> --replace [--name <name>]

@thejoebourneidentity
Copy link
Contributor

@lucascosti 👀

_term.WriteLine($@" --windowslogonpassword string Password for the service account. Requires runasservice");
#endif
_term.WriteLine($@"
Run Options:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest taking the --once option out, since run once is not fully working due to race condition on the server-side.
@bryanmacfarlane for input.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed it for now. It can easily be added back when we are ready to release/support it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add it back, it would likely be something like --ephemeral. keep it gone for now. we should also delete the code supporting once in a separate PR since it was the wrong pattern

@bryanmacfarlane
Copy link
Member

LGTM

Copy link
Contributor

@lucascosti lucascosti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucascosti 👀

This is a great update! I think this will prevent a lot of users from having to resort to the documentation if they are have started using self-hosted runners without any previous assistance.

I don't think any docs update is required for this, but let me know if you disagree 🙂

@dakale dakale merged commit 9cafe8c into master Jan 17, 2020
@dakale dakale deleted the 226-help branch January 17, 2020 18:55
@TingluoHuang
Copy link
Member

#226

AdamOlech pushed a commit to antmicro/runner that referenced this pull request Jan 28, 2021
* Update --help

* Tiny indent

* Remove once option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants