Home » Android » android – Jenkins email artifact for each build

android – Jenkins email artifact for each build

Posted by: admin June 15, 2020 Leave a comment

Questions:

I am using Jenkins to build my Android Applications. Once the artifact has been created i want the apk to be email to a set of users. I am already aware of Testflight etc but i just need Jenkins to email the signed apk to a set of users. How can i do this ?

Kind Regards

How to&Answers:

I did the exact same thing,
So first install the Email Extension Plugin for jenkins
then configure the job, add post-build action –> Editable email notification
fill the Project Recipient List etc..
and there’s the Attachments section where you can type the relative address of the apk file
(the base directory is the workspace’s root directory)

And finally you have to setup the trigger (add trigger) and choose the success ‘cos you dont have the apk at the specified path if the build was unsuccessful.

Answer:

What you are looking for is the Email Ext plugin. It has options for attaching artifacts from the build.

Answer:

You have to install Email Ext plugin.After installing follow this step.

  • Click the ‘Add post-build action’ drop-down and select the ‘Editable Email Notification’ option.
  • In Project Recipient List , This is a comma separated list (optional whitespace after commas) of email addresses that should receive emails. May contain references to build parameters. To CC or BCC someone instead of putting them in the To list, add cc: or bcc: before the email address (e.g., cc:[email protected], bcc:[email protected]).

  • You can define Default Subject and Default Content as per your project requirement.

  • In Attachments field, you have to give the path of your binary file (i.e path of your .APK file like app/build/outputs/apk/**/*.apk)

enter image description here

  • Now click on Advanced Settings at bottom right corner.
  • Click on Add trigger and select Success trigger.
    enter image description here
  • Click on Add drop down from the success trigger and select Recipient List option.
  • Now Apply and save the Configuration. You can send the apk in email to each user which is selected in recipient.

That’s how you can send the apk in email.Thank you.