To add the ritchie-formulas-demo repository locally, you can use the rit add repo
command, or run the command line below:
rit add repo --provider="Github" --name="demo" --repoUrl="https://github.com/ZupIT/ritchie-formulas-demo" --priority=1
rit list repo
command.Now, check the details of the formula, you can execute this tutorial commands.
To get details about a formula, you can execute the command using with the --help
flag:.
rit demo hello-world --help
It will return all the flags available for the command execution.
On Ritchie, you have 6 possibilities to run a formula through these flags:
You can see them below, choose a case and type the following commands lines.
rit demo hello-world
Select an option for each input parameter and see how the magic works:
This is the default command line execution, that runs the formula locally using prompt to inform the input parameters.
You can run the same command using the –docker flag pto execute it remotely (on a container), but still using prompt to inform the inputs parameters:
rit demo hello-world --docker
You can also run the command informing the inputs through flags (you can know which flags are available using the --help
flag when executing a command). This way, inputs parameters are informed directly with the command line.
rit demo hello-world --rit_input_text="Dennis" --rit_input_boolean=true --rit_input_list="everything" --rit_input_password="Ritchie"
When you combine both input flags
and the --docker
flag, it is possible to run a command remotely (on a container) with the input parameters directly informed on the command line:
rit demo hello-world --rit_input_text="Dennis" --rit_input_boolean=true --rit_input_list="everything" --rit_input_password="Ritchie" --docker
You can also run the command with the --stdin
(Standard input) flag. This way, inputs parameters are also informed directly with the command line.
echo '{"rit_input_text":"Dennis", "rit_input_boolean":"true", "rit_input_list":"everything", "rit_input_password":"Ritchie"}' | rit demo hello-world --stdin
When you combine both –stdin and –docker flags, it is also possible to run a command remotely (on a container) with the input parameters directly informed on the command line:
echo '{"rit_input_text":"Dennis", "rit_input_boolean":"true", "rit_input_list":"everything", "rit_input_password":"Ritchie"}' | rit demo hello-world --stdin --docker
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.