Can Jenkins send some letters?

After the build, I want to run two emails.

The first is a letter to the SharePoint server. SharePoint uploads its attachments. The subject of this mail must match the SharePoint folder to download.

The second is mail for the team. Thus, it should have a good object, not a folder name.

How can I get Jenkins to send two letters?

+4
source share
2 answers

A plugin that provides this feature is missing. You have two options for performing this function. You can implement your own plugin. A good place to start is probably the email ext plugin .

Alternatively, you can run the first email with the actual assembly, and then run Jenkins a separate dummy assembly that will send the second email. It would not be so elegant, but much easier, since you would not need to implement any functionality yourself. Depending on what you want the letters to be contained in, you may have to transfer some data from the first to the second assembly (for example, through a parameterized assembly).

+3
source

A cheap alternative is to create a "shell script" of the build steps, for example: (if on * nix platform)

echo "Please Mr. SharePoint, would you be so kind to attach my file(s) ? Thanks!" | mail -s "<folder name>" -a ${WORKSPACE}/target/artifacts/myfile sharepoint@example.com 
0
source

Source: https://habr.com/ru/post/1413562/


All Articles