Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send Gitlab-CI artifacts via e-mail

Our Gitlab pipeline generates some performance graphs, which I would like to be sent to every team member via e-mail. So far, they are marked as artifacts so Gitlab keeps them. Is there any way within Gitlab to achive this? Or should I do that within the job script?

like image 757
fpnick Avatar asked Aug 23 '17 15:08

fpnick


People also ask

Where are GitLab CI artifacts stored?

The artifacts are stored by default in /home/git/gitlab/shared/artifacts . Save the file and restart GitLab for the changes to take effect.

How do I download job artifacts from GitLab?

Download the artifacts archive The use of CI_JOB_TOKEN in the artifacts download API was introduced in GitLab Premium 9.5. Download the artifacts zipped archive from the latest successful pipeline for the given reference name and job, provided the job finished successfully.

What is CI_JOB_TOKEN?

CI_JOB_TOKEN for multi-project pipelines was moved from GitLab Premium to GitLab Free in 12.4. You can use the CI_JOB_TOKEN to trigger multi-project pipelines from a CI/CD job. A pipeline triggered this way creates a dependent pipeline relation that is visible on the pipeline graph.


1 Answers

There is no way currently to send artifacts via email from the gitlab interface. You will indeed have to send them from your job scripts.
Gitlab can send an email after a pipeline is finished (see in Settings>Integrations>Pipeline emails), but it doesn't attach artifacts.

Another way to share them would be to publish them in gitlab pages from your job script (doc here : https://docs.gitlab.com/ee/user/project/pages/index.html), but it wouldn't send an email.

like image 178
CCH Avatar answered Sep 27 '22 02:09

CCH