Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
Doc review (#161)
Browse files Browse the repository at this point in the history
* doc review

Signed-off-by: jessica-tw <jessica.olinda@zup.com.br>

* fixes

Signed-off-by: jessica-tw <jessica.olinda@zup.com.br>
  • Loading branch information
jessica-tw committed Oct 29, 2021
1 parent 913c466 commit ef9c57d
Show file tree
Hide file tree
Showing 91 changed files with 672 additions and 688 deletions.
19 changes: 11 additions & 8 deletions content/en/Contribute.md
@@ -1,7 +1,7 @@
---
title: Contribute
weight: 105
description: "Nesta seção, você encontrará como contribuir com o Ritchie."
description: "In this section, you will find how to contribute with Ritchie."
---

## **Community**
Expand All @@ -15,11 +15,14 @@ You just have to open a pull request on [**ritchie-formula’s repository** ](ht

You can contribute with improvements, suggestions or reporting bugs on [**ritchie-cli’s repository.** ](https://github.com/ZupIT/ritchie-cli).

See the process you should follow:
Follow the steps below to contribute:

1. Fork the repository
2. Create a branch: `git checkout -b <branch_name>`
3. Implement your idea
4. Commit your implementation: `git commit -m '<commit_message>'`
5. Push your branch: `git push origin <project_name>/<location>`
6. Open a pull request on the `main` branch for the team's analysis.
**Step 1.** Fork the repository
**Step 2.** Create a branch: `git checkout -b <branch_name>`
**Step 3.** Implement your idea
**Step 4.** Commit your implementation: `git commit -s -S . "git commit -s -S -m '<commit_message>'"`
**Step 5.** Push your branch: `git push origin <project_name>/<location>`
**Step 6.** Open a pull request on the `main` branch for the team's analysis.


For more information, access the [**Contributing Guide**](https://github.com/ZupIT/ritchie-cli/blob/main/CONTRIBUTING.md).
7 changes: 4 additions & 3 deletions content/en/Credentials/Add providers.md
Expand Up @@ -6,9 +6,10 @@ description: In this section, you will find how to add providers.

---

You can also configure Ritchie to add new providers on your workspace.
You can configure Ritchie to add new providers on your workspace.

To do so, just choose "**Add a new**" option when running the **`rit set credential`** command.
To do that:
1. Choose "**Add a new**" option when running the **`rit set credential`** command:

```text
? Select your provider Add a new
Expand All @@ -26,7 +27,7 @@ The informations that will be requested are:
* **Field name:** Name of a credential from this provider.
* **Field type:** Value type of this credential. It can be: **plain text** or **secret**.

Once you finished this configuration, you set up this credentials following the same instructions you saw above.
After this configuration, you set up this credentials following the same instructions above.

{{% alert color="warning" %}}

Expand Down
14 changes: 6 additions & 8 deletions content/en/Credentials/Delete credentials.md
Expand Up @@ -6,22 +6,20 @@ description: In this section, you will find how to delete credentials.

---

## How to delete?
## **How to delete?**

To delete a credential, you just have to run this command:
To delete a credential, you have to run this command:

```text
rit delete credential
```

Check out how the process works:
Check out below how the process works:

![](/shared/delete-credentials.gif)

## Next steps
## **Read more**

On this section, you saw how to delete a credential on Ritchie. If you want to keep reading:
- [**How to add providers**]({{< ref path="Credentials/Add providers" >}}) to keep configuring your credentials?

👉 Go to [**how to add providers**]({{< ref path="Credentials/Add providers" >}}) section to keep configuring your credentials.

👉 Check out the [**list of commands and flags**]({{< ref path="Reference/List of commands and flags" >}}) available on Ritchie.
- [**List of commands and flags**]({{< ref path="Reference/List of commands and flags" >}}) available on Ritchie.
8 changes: 4 additions & 4 deletions content/en/Credentials/Set credentials.md
@@ -1,14 +1,14 @@
---
title: Set credentials
weight: 55
description: In this section, you will find how to set credentials.
description: In this section, you will find how to set credentials.
---

---

You have to set Ritchie's credentials to avoid informing data multiples times through the terminal.
You have to set Ritchie's credentials to avoid inform data multiples times through the terminal.

To do so, just run the following command:
To do so, run the following command:

```text
rit set credential
Expand Down Expand Up @@ -39,6 +39,6 @@ After you chose one of the available providers, Ritchie will ask you to fill the

{{% alert color="info" %}}

You can check out on [**formula's editable files**]({{< ref path="Formulas/Organize the formula folder" >}}) to see how to manipulate the credentials defined in the session as formula input parameters (inputs in the config.json file).
For more information about the formula's editable files and to see how to manipulate the credentials defined in the session as formula input parameters (inputs in the config.json file), check out the [**Formulas section**]({{< ref path="Formulas/Organize the formula folder" >}}).

{{% /alert %}}
18 changes: 8 additions & 10 deletions content/en/Credentials/Use credentials as formula inputs.md
@@ -1,16 +1,17 @@
---
title: Use credentials as formula inputs
weight: 61
description: In this section, you will find how to set credentials as inputs.
description: In this section, you will find how to set and manipulate credentials as inputs.
---

---

Once a provider's credential has been set, it can be used as input in the formula's **`config.json`**file.
After a provider's credential has been set, it can be used as input in the formula's **`config.json`**file.

To do so, it is necessary to use the reserved keyword:**`CREDENTIAL`**
## **How can you configure?**
To do so, it is necessary to use the reserved keyword: **`CREDENTIAL`**

When used as an input, the credential will contain 2 fields:
When the credential is used as an input, it will contain 2 fields:

* The **name** is the variable used to extract the input and manipulate it inside the formula's code.
* The **type** is the specific nomenclature for the CLI to now which credential to use.
Expand Down Expand Up @@ -40,7 +41,7 @@ For example, to be able to use **`GITHUB`** credentials as input, you need to in
]
```

If you have any doubt regarding the provider's variable names, you can check the credentials you've set using the following command:
If you have any questions regarding the provider's variable names, you can check the credentials you've set using the following command:

```text
rit list credential
Expand All @@ -53,8 +54,5 @@ PROVIDER CONTEXT CREDENTIAL
github default {"token":"***", "email":"***", "username":"***"}
```

## Next steps

You saw in this section how to deal with credentials on Ritchie.

👉 Check the [**commands list**]({{< ref path="Reference/List of commands and flags" >}}) to see the available automations on our community repo.
### **Learn More**
For more information about the available automations on our community repository, check out the [**commands list**]({{< ref path="Reference/List of commands and flags" >}}).
6 changes: 3 additions & 3 deletions content/en/Formulas/Add formula dependencies.md
@@ -1,12 +1,12 @@
---
title: Add formula dependencies
weight: 39
description: 'In this section, you will find how to add formula dependencies'
description: 'In this section, you will find how to add formulas dependencies'
---

---

## What are dependencies?
## **How to add formula dependencies?**

{{% alert color="info" %}}

Expand All @@ -16,7 +16,7 @@ Each programming language has its own specificities **to import libraries or pac

On Ritchie, it's possible to configure each formula as an independent and small project.

Therefore, it will be possible to import all the necessary dependencies to perform the operations you want to implement.
Therefore, it will be possible to import all the necessary dependencies to perform the operations you want to implement. See more below:

{{< tabs id="T2" >}}
{{% tab name="go.mod (GOLANG)" %}}
Expand Down
6 changes: 3 additions & 3 deletions content/en/Formulas/Build formulas.md
Expand Up @@ -14,11 +14,11 @@ If you're using a previous version just follow the instructions of this section.

{{% /alert %}}

## How to build?
## **How to build?**

After [**creating a formula**]({{< ref path="Formulas/Create formulas" >}}), if you want to edit the code of the formula, it's necessary to **build** these changes to test the command with the new implementation.

To do so, just run the command:
To do so, run the command:

```text
rit build formula
Expand All @@ -29,7 +29,7 @@ You must inform:
* The **directory's path** where the formula is located.
* The **formula's path** to be builded (the formula's command).

In case you want to update the formula's code in running time, you can use the **flag “--watch”** as shown in the command below:
If you want to update the formula's code in running time, you can use the **flag “--watch”** like in the command below:

```text
rit build formula --watch
Expand Down
44 changes: 23 additions & 21 deletions content/en/Formulas/Configure inputs.md
Expand Up @@ -6,16 +6,16 @@ description: "In this section, you will find information about a formula config.

---

## What is the config.json file?
## **What is the config.json file?**

The **config.json** file contains the formula's input parameters. It allows the CLI to know what datas to ask the user when he runs the command in the terminal in order to process the formula correctly.
The **config.json** file contains the formula's input parameters. It allows the CLI to know what data to ask the user when he runs the command in the terminal to process the formula correctly.

These input parameters are made up of the following fields:

- [**dockerImageBuilder**] - A docker image builder (according to the programming language chose at the formula creation).
- [**dockerVolumes**] - List of local volumes you want to mount in the docker run container.
- [**inputs**] - The formula inputs parameters list.
- [**requireLatestVersion**] - A boolean, indicating the need (or not) of the formula to run in the last available version of a repository.
- **dockerImageBuilder**: A docker image builder (according to the programming language chose at the formula creation).
- **dockerVolumes**: List of local volumes you want to mount in the docker run container.
- **inputs**: The formula inputs parameters list.
- **requireLatestVersion**: A boolean, indicating the need (or not) of the formula to run in the last available version of a repository.

```text
{
Expand All @@ -26,12 +26,12 @@ These input parameters are made up of the following fields:
}
```

## Docker volume mapping configuration
## **Docker volume mapping configuration**

For each volume that will be mapped, you must inform its origin and destination, using a colon ":" as a separator.
For each volume that will be mapped, you must inform its origin and destination, using a colon **":"** as a separator.

#### Example:
the source directory being `/home/user-name/folder` and the destination directory `/mount/folder`
#### **Example:**
The source directory being **`/home/user-name/folder`** and the destination directory **`/mount/folder`**
```text
{
"dockerVolumes": [
Expand All @@ -40,11 +40,11 @@ the source directory being `/home/user-name/folder` and the destination director
}
```

## Input parameter configuration
## **Input parameter configuration**

Each input parameter is composed of the following fields:

### Mandatory fields
### **Mandatory fields**

- `name`: variable name to extract.

Expand All @@ -70,7 +70,7 @@ The variable **name** will be convert **uppercase** as the **local variable name
- **path:** enables the autocomplete to inform a path to a folder or a file _(string)_.
- `label`: text appearing on the CLI, asking for the input.

#### Input example with mandatory fields:
#### **Input example with mandatory fields:**

```text
{
Expand All @@ -80,7 +80,7 @@ The variable **name** will be convert **uppercase** as the **local variable name
}
```

#### Input example with the multiselect type:
#### **Input example with the multiselect type:**

```text
{
Expand All @@ -100,15 +100,17 @@ The variable **name** will be convert **uppercase** as the **local variable name
}
```

### Some observations regarding the **`multiselect`** type
### **Some observations regarding the **`multiselect`** type**

- To select one of the options with the `multiselect` type, you must press the `space` key (the `enter` key will move to the next input, if any)
1. To select one of the options with the `multiselect` type,
- Press the `space` key (the `enter` key will move to the next input, if any).

- The options selected in the `multiselect` type field will return a string with the options separated by pipe (`|`) and without space example: `Monday | Wednesday | Friday`
2. The options selected in the `multiselect` type field will return a string with:
- The options separated by pipe (`|`) and without space example: `Monday | Wednesday | Friday`

- It is suggested to use the `required` field as `true`, otherwise, if no option is selected, the local variable will be saved as `undefined`
3. Use the `required` field as `true`, otherwise, if no option is selected, the local variable will be saved as `undefined`.

#### Parameter example using the autocomplete type:
#### **Parameter example using the autocomplete type:**

```text
{
Expand All @@ -118,7 +120,7 @@ The variable **name** will be convert **uppercase** as the **local variable name
}
```

### Optional fields
### **Optional fields**

- `default`: default input value (if value is **null**).

Expand Down Expand Up @@ -237,7 +239,7 @@ In case of fields without a default value, the flag will keep asking for this in

{{% alert color="warning" %}}

The **`dynamic input`** type will be **depreciated** in the **next releases**.
The **`dynamic input`** type will be **deprecated** in the **next releases**.

{{% /alert %}}

Expand Down
20 changes: 9 additions & 11 deletions content/en/Formulas/Create formulas.md
Expand Up @@ -7,9 +7,9 @@ description: >-

---

## How to create?
## **How to create?**

### Step 1: Run the formula creation command
### **Step 1: Run the formula creation command**

Run the following command to create a formula:

Expand All @@ -31,7 +31,7 @@ Example: `rit demo create formula`

You can test the formula directly after its creation. That's possible because the **`rit create formula`** command also builds the formula automatically (it generates the formula's executable files and add them on **.rit folder**).

In that case, the formula **"Hello World" template** will be executed as shown below:
In that case, the formula **"Hello World" template** will be executed as you can see below:

![](/shared/rit_demo_hello-world.gif)

Expand All @@ -42,17 +42,17 @@ This template is composed of **4 inputs parameters**, that represents the curren
3. A **`sample boolean`** variable
4. A **`sample password`** variable

When you finished your formula creation, it will be built and sent to a specific repository according to the name of your workspace with the prefix **"local".**
When you finished creating your formula, it will be built and sent to a specific repository according to the name of your workspace with the prefix **"local".**

Example: if we have a workspace with the name `Default`.
**Example:** If we have a workspace with `Default` name:

```text
{
"Default":"/home/user/ritchie-formula-local"
}
```

A repository associated to this workspace will be created on the `/home/user/.rit/repos` folder, and added on the `repositories.json` file.
A repository associated to this workspace will be created on the **`/home/user/.rit/repos`** folder, and added on the **`repositories.json`** file.

```text
[
Expand All @@ -67,8 +67,6 @@ A repository associated to this workspace will be created on the `/home/user/.ri
]
```

## Next steps

On this section, you saw how to create a formula on Ritchie and test it. To keep configuring the formula:

👉 Go to [**organize the formula folder**]({{< ref path="formulas/Organize the formula folder" >}}) to see how to organize the formulas you create.
## **Next steps**
Keep configuring your formula:
- Go to [**organize the formula folder**]({{< ref path="formulas/Organize the formula folder" >}}) to see how to organize the formulas you create.
8 changes: 4 additions & 4 deletions content/en/Formulas/Delete formulas.md
Expand Up @@ -7,9 +7,9 @@ description: >-

---

## How to delete?
## **How to delete?**

To delete a formula, you just have to run this command:
To delete a formula, you have to run this command:

```text
rit delete formula
Expand All @@ -25,9 +25,9 @@ Once you've made this, follow the steps:

![](/shared/delete-formula.gif)

## Next Steps
### **Learn More**

On this section, you saw how to delete a formula on Ritchie. To keep reading:
On this section, you saw how to delete a formula on Ritchie. To keep learning:

👉 Go to [**how to group formulas**]({{< ref path="Formulas/Group formulas" >}}) section to find out how to run a formula inside another formula.

Expand Down

0 comments on commit ef9c57d

Please sign in to comment.