Can't enable Gitlab notification email for failed pipeline - gitlab

so I want to get email notification for failed pipeline builds, I tried to configure my gitlab settings as following: https://docs.gitlab.com/ee/workflow/notifications.html
But in my settings I see following:
There is no check box for Failed/Successful pipeline.
For the project I set it to 'Watch:' receive notifications from projects or groups user is a member of.
What am I missing?

Even if the question is old, the solution is the Gitlab Integration "Pipeline emails" (suggested by this other answer).
In short, in your project, go to Project -> Settings -> Integrations -> Pipelines emails and set the list of emails to notify.

The link to https://docs.gitlab.com/ee/workflow/notifications.html is no more active.
I found a blog post from 2020 on https://about.gitlab.com/blog/, explaining how to do.
Read it there : https://about.gitlab.com/blog/2020/06/17/notification-on-pipeline-succeeds/
In short, you have checkboxes for custom notification events like :
failed pipeline
fixed pipeline
successful pipeline
etc.
To access it, like said in the blog post,
Go to the Project overview page for the project.
Click the "bell" 🔔 (Notification setting) button and select Custom.
And before all, check your global notification email at : https://gitlab.com/-/profile/notifications

Related

Set default reviewers for merge request in GitLab

How I can set default reviewers in GitLab Premium?
In Settings → General I have only Merge request (MR) approvals, not reviewers.
There is no such setting in the UI. If you think it would be useful to others, please file a feature request.
As a workaround, you could use the Merge requests API to set reviewers when creating the MR or by updating it after creation.
How you want to achieve the desired result depends on your workflow.
For example, you could have something subscribe to the project webhook which triggers a script that does the API call whenever it sees an open MR event.
Another option, if you run pipelines on MRs, you can have a job run a script which could set reviewers if none are already set via the API.
Yet another option would be to have a specified reviewer set when a merge request is created through the /assign_reviewer #user quick action by adding it to the default and all MR template files.
You can use "Default description template for merge requests" either via Settings->Merge Requests or via file in .gitlab/merge_request_templates to do it via a workaround. (Doc)
In the template you can use the chat code
/assign_reviewer #user1 #user2 #user3
to automatically assign user1, user2 and user3 as reviewers when creating a new MR.
Might be a useful workaround as this does not add you as a reviewer. (especially for gitlab free/CE 14.8+, as multiple reviewers are only available for Premium)
You could add a Reviewers section to your default MR template. Then persons will be notified with a Todo for the MR upon creation.
This should be in your default branch.
.gitlab/merge_request_templates/default.md
## What this MR does / why we need it
- description
- proof of work
## Reviewers
- [ ] Reviewed by #gitlabUser1
- [ ] Reviewed by #gitlabUser2
- [ ] Reviewed by #gitlabUser3
- [ ] Reviewed by #gitlabUser4
- [ ] Reviewed by #gitlabUser5
Thanks for your MR, you're awesome! :+1:
The user can then check the checkbox upon review which will change the MR history too.
Could you please try below
In Settings-->General-Merge Request Approvals.
Click on Add approval Rule.
Add Rule name as "Default", Approvals required, desired branch and add members under approvers.
These approvers would be your default reviewers for any Merge request.

Customize GitLab slack integration messages

Is it possible to change the automatic slack notifications on "Receive event notifications in Slack"?
For example, if a pipeline has successfully completed, we get the following message from the Webhook:
User/Project Name: Pipeline #269 of tag Ticket_8088 by User-Name
(User) passed in 12:02
The form of the message should be different.
I am the server administrator. So I can also change something at the code level. (if required)
There isn't a programmatic way to accomplish such task.
All messages are hardcoded in app/models/project_services/chat_message (as you can see in the repo).
So, in your case, you need to change the method activity in app/models/project_services/chat_message/pipeline_message.rb - please consider that your changes will be discarded when you update GitLab.

send mail to commiter after gitlab CI stage

in my .gitlab-ci.yml I have:
stages:
- test # unit tests
- proof # system tests
I want after each run send mail to committer how trigger run (in mail i want to have result of run). Could you tell me how should I do it or send me to same example?
To Bartłomiej Bartnicki.
It seems jaxxstorm talked about functionality in GitLab, which you can find by the path: your project -> Settings -> Integrations -> scroll down to the Project services and click by the "Emails on push" link and you will see the next settings page:
By enabling this service, you will be able to receive e-mail notifications about the result status of your builds.
In the Recipients area, provide a list of e-mails separated by comma.
The easiest way to do this is to use the build emails service

VSO Webhook not trigger (work item updated)

I am currently trying to set the webhook (for visualStudio.com). I managed to to make the event 'Work item commented' work.
Now i try to set up the event 'Work item updated'. when i create the hook, the test is successfull (captured with http://requestb.in/). I save the webhook then go to edit any issue (I've selected all work item type and all fields) but i doesnt trigger the webhook. (no errors, just no webhook sent...)
Is there something special that need to be actived to make the work item updated trigger active?
Thank you
This is due to the Visual Studio Team Service issue, Microsoft is working on a deployment for this. Refer to this link for details: ServiceHooks notification issues with Visual Studio Team Services - 1/27 - Mitigating

github notification to nodeJS when master get a commit

Is it possible if my master branch in my github repo gets an update that my nodeJS server got a notification ? so i can do stuff with it ? like get the version tag and commit message ?
First you need to go to your repo, and click through this sequence:
Settings -> Webhooks & Services -> Add webhook
Then paste the url where github will submit data for each new commit. You can find examples of payload in example.
Then implement the logic needed in the backend to work with info about new commits.

Resources