title:How to use the hub | Prerequisites and quick setup
description:Discover how to use the hub! You’ll find here the prerequisites, a quick setup and how to customize a job. Those topics will have no secret for you!
description:Discover how to use the hub. You’ll find here the prerequisites, a quick setup and how to customize a job. Those topics will have no secret for you!
---
# Use the hub
## 📝 Prerequisites
* 🦊 Manage your project in Gitlab and understand what is [CI/CD with Gitlab](https://docs.gitlab.com/ee/ci/){:target="_blank"}
* 🔫 Be aware each file modification in your project can trigger a [Pipeline](/r2bulary/#pipeline)
* 🗝 Have access to the pipelines page in your Gitlab project and write access to your project `.gitlab-ci.yml` file
* 🦊 Manage your project in GitLab and understand what is [CI/CD with GitLab](https://docs.gitlab.com/ee/ci/){:target="_blank"}
* 🔫 Be aware: each file modification in your project can trigger a [Pipeline](/r2bulary/#pipeline)
* 🗝 Have access to the pipelines page in your GitLab project and write access to your project `.gitlab-ci.yml` file
## ⏳ Quick setup
Follows these steps to setup your CI/CD pipeline in less than 5 minutes!
1. If you haven't yet a `.gitlab-ci.yml` file in the root on your repository:
create it with the list of stages:
create it with the following list of stages:
```yaml
stages:
- static_tests
- build
- dynamic_tests
- tests
- provision
- review
- release
@@ -31,41 +30,41 @@ Follows these steps to setup your CI/CD pipeline in less than 5 minutes !
```
!!! info
Check [stages](#stages) section to get more information about this list
You can check the [stages](#stages) section to get more information about this list
or if you already have a configuration with different stages.
2. Select Jobs you want in [jobs section](/jobs/) and append their URL in the
2. Select the Jobs you want in the [jobs section](https://r2devops.io/jobs) and append their URL in the
@@ -205,16 +202,16 @@ to a job: [`services`](https://docs.gitlab.com/ee/ci/yaml/#services).
To use this option, you must have access to an image of the container you want
to run as a service. For example, if you are using our
[docker_build](https://r2devops.io/_/r2devops-bot/docker_build) job to build an
[docker_build](https://r2devops.io/_/r2devops-bot/docker_build/) job to build an
image of your application, and you want to test this image using the
[nmap](/jobs/dynamic_tests/nmap/) job, just add the following configuration in
[nmap](https://r2devops.io/_/r2devops-bot/nmap) job, just add the following configuration in
your `.gitlab-ci.yml` file:
!!! info
* The `name` option must contain your image name and tag or an image name from [Docker Hub](https://hub.docker.com){:target="_blank"}.
* The `name` option must contain your image name and tag, or an image name from [Docker Hub](https://hub.docker.com){:target="_blank"}.
* The `alias` option permits to the job to reach your application using a name. This name
must be the same that the one specified inside the job target's variable.
* You may also run some other services like a database depending on your application needs.
* You may also run some other services, like a database depending on your application needs.
```yaml
nmap:
@@ -227,9 +224,7 @@ nmap:
### 🎶 Multiple usage of the same job in your pipeline
If you want to reuse a job on the hub, for example launching `apiDoc` to build 2 API documentations in the same pipeline:
You can easily do so with Hub's jobs using ==extends== GitLab keyword.
If you want to reuse a job from the hub, for example launching `apiDoc` to build 2 API documentations in the same pipeline, you can easily do so with the Hub's jobs using ==extends== GitLab keyword.