... | ... | @@ -22,7 +22,67 @@ For verification purposes you can check the list of ildap group members with a c |
|
|
|
|
|
## How to use the continuous integration (CI) service?
|
|
|
|
|
|
See [[CI@gitlab.inria.fr|https://gitlab.inria.fr/lnussbau/ci-test]]
|
|
|
Besides using Inria's Continuous Integration platform [ci.inria.fr](https://ci.inria.fr), you can use gitlab's integrated CI pipelines. This tool is more suited to the execution of simple and lightweight tasks, than for complex deployment pipelines.
|
|
|
|
|
|
You will need to set up a CI runner (small tool in charge of running the CI
|
|
|
tasks themselves) and then register the runner with your project.
|
|
|
|
|
|
### Enabling CI on a gitlab project
|
|
|
|
|
|
* Go to your project's settings
|
|
|
* In the *General* tab, search for "Pipelines", and check the permission is not "Disabled"
|
|
|
* Then a *Pipelines* tab should appear
|
|
|
* In this *Pipelines* tab, you will find the url and the registration token you will need later, when adding a runner.
|
|
|
|
|
|
### Installing runners
|
|
|
|
|
|
To perform the actual build, you need to install GitLab Runner. Runners can run anywhere : you can use a virtual machine on [ci.inria.fr](https://ci.inria.fr) to host your GitLab runner.
|
|
|
|
|
|
See :
|
|
|
|
|
|
* <https://wiki.inria.fr/ciportal/Web_Portal_Tutorial> to create a slave on Inria's CI platform and access it (you can ignore the jenkins related parts)
|
|
|
* <https://docs.gitlab.com/runner/install/> for the official documentation to install the runner on the vm(s) you've created.
|
|
|
|
|
|
### Register a runner in your project
|
|
|
|
|
|
On the virtual machine where you installed the gitlab CI runner, run (as root or sudo!) :
|
|
|
|
|
|
```
|
|
|
$ sudo gitlab-runner register
|
|
|
```
|
|
|
Use the gitlab URL and the registration token found in the "Pipelines" page when asked.
|
|
|
|
|
|
In order to answer when asked
|
|
|
|
|
|
Please enter the gitlab-ci tags for this runner (comma separated):
|
|
|
|
|
|
it is important to know that "gitlab-ci tags" are NOT git tags. The tags you enter here are useful to specify conditional execution in the configuration file .gitlab-ci.yml.
|
|
|
See :
|
|
|
|
|
|
* <https://docs.gitlab.com/ce/ci/yaml/#tags>
|
|
|
* and <https://docs.gitlab.com/ce/ci/yaml/#only-and-except>
|
|
|
|
|
|
for more details.
|
|
|
|
|
|
The next question
|
|
|
|
|
|
Whether to run untagged builds [true/false]:
|
|
|
|
|
|
becomes clear when the "gitlab-ci tag" concept is understood.
|
|
|
|
|
|
When asked
|
|
|
|
|
|
Please enter the executor:
|
|
|
you should answer `shell`
|
|
|
|
|
|
At the end of this step, your runner should appear in the *Settings > Pipelines* tab of your project.
|
|
|
|
|
|
|
|
|
### Configurating CI tasks
|
|
|
|
|
|
Finally, configure the tasks to run by creating a .gitlab-ci.yml file at the root of your project.
|
|
|
Follow the official documentation at <https://docs.gitlab.com/ce/ci/yaml/> to create this file.
|
|
|
|
|
|
|
|
|
## Git-LFS is not activated
|
|
|
|
... | ... | |