SlideShare a Scribd company logo
 
 
 
 
 
 
 
 
 
 
Jenkins Setup Document
 
   
BrainBox Network. Copyright@2015. All rights reserved
 
 
The document provides steps to integrate Android Application with Jenkins.
The integration process requires following steps ‐
1. System Requirements
2. Download Jenkins
3. Starting Jenkins
4. How to Install Tomcat in Windows
5. Configure Apache with Jenkins
6. Jenkins First Look
7. Configuration
8. JDK Setup
9. PlugIn Installation
10. List of Necessary Plugins 
11. Jenkins New Project Setup
12. Get Project from Repository
13. Build Android Project
14. Email Notification
15. Advanced Setting
16. Set Success Trigger
17. Setup Notification Detail
18. Set Failure Trigger
19. Setup Notification Detail
20. Project Build Error
21. Build the Project
BrainBox Network. Copyright@2015. All rights reserved
 
 
SYSTEM REQUIREMENTS 
 
➔ JDK :​JDK 1.5 or above
➔ Memory:​2GB RAM (recommended)
➔ Disk Space:​No minimum requirement. Note that since all builds will be stored on the Jenkins
machines, it has to be ensured that sufficient disk space is available for build storage.
➔ Operating System Version:​Jenkins can be installed on Windows, Ubuntu/Debian, Red
Hat/Fedora/CentOS, Mac OS X, openSUSE, FReeBSD, OpenBSD, Gentoo.
➔ Java Container:​The WAR file can be run in any container that supports Servlet 2.4/JSP 2.0 or
later.(An example is ​TOMCAT/APACHE​).
BrainBox Network. Copyright@2015. All rights reserved
 
 
DOWNLOAD JENKINS 
 
➔ Open Given Link :​​https://jenkins‐ci.org/
➔ Download Jenkins for system
BrainBox Network. Copyright@2015. All rights reserved
 
 
STARTING JENKINS 
➔ Open the command prompt,
➔ Browse to the directory where the “Jenkins.war” file is present.
➔ Run the following command:
Mostly Jenkins installation directory location is:​C:Program Files (x86)Jenkins
​Command:​Java –jar Jenkins.war
➔ Accessing Jenkins:​ ​Once Jenkins is up and running,  
You can access Jenkins from the link − ​http://localhost:8080
 
BrainBox Network. Copyright@2015. All rights reserved
 
 
HOW TO INSTALL TOMCAT IN WINDOWS MACHINE 
 
➔ Link ​https://tomcat.apache.org/download‐70.cgi​use for download the tomcat.
➔ Then unzip the contents of the downloaded zip file and install.
BrainBox Network. Copyright@2015. All rights reserved
 
 
CONFIGURE APACHE WITH JENKINS 
 
➔ Copy the ​Jenkis.war​file and PASTE it to the webapps folder in the tomcat folder.
➔ Now open the​​command prompt
➔ Browse to the bin directory in this folder and run the start.bat file
E:Appstomcat7bin>startup.bat
➔ Then open ​http://localhost/jenkins
BrainBox Network. Copyright@2015. All rights reserved
 
 
JENKINS FIRST LOOK 
BrainBox Network. Copyright@2015. All rights reserved
 
 
CONFIGURATION 
 
➔ Click on “Manage Jenkins” link, showing in left side bar of the screen.
➔ Click on “Configuration Setting”, showing in the container part of the screen.
 
BrainBox Network. Copyright@2015. All rights reserved
 
 
JDK SETUP 
 
➔ Click on “JDK Installations” button
➔ Set JDK path, where you want the install JDK in your machine.
➔ Then click “Save”
BrainBox Network. Copyright@2015. All rights reserved
 
 
➔ Then click on “Available” button
➔ Then put the “Go to next Slide” in your “Filter” showing in right top corner.
➔ Check and select Plugin,
➔ Then Click “Download now and install after restart” button
BrainBox Network. Copyright@2015. All rights reserved
 
 
INSTALL PLUGIN 
➔ Click on “Manage Plugin” icon, it is located in container part of the screen.
 
 
 
 
BrainBox Network. Copyright@2015. All rights reserved
 
 
LIST FOR NECESSARY PLUGINS 
 
1. Credentials Plugin
2. Email Extension Plugin
3. Google Authenticated Source plugin
4. Google Login Plugin
5. Google OAuth Credentials plugin
6. Gradle plugin
7. Subversion Plug‐in
8. OAuth Credentials plugin
9. SSH Credentials Plugin
➔ Go to “Configure System”
➔ Go to extended email notification
➔ Click “Advanced”
➔ Fill in blank:
1. SMTP server ‐> smtp.gmail.com (Mandatory)
2. Use SMTP Authentication ‐> CHECK TRUE (Mandatory)
3. USER NAME ‐> <YOUR_EMAIL_ID> (Mandatory)
4. PASSWORD ‐> <YOUR_EMAIL_ID_PASSWORD> (Mandatory)
5. USE SSL ‐> CHECK TRUE (Mandatory)
6. SMTP PORT ‐> 465 (Mandatory)
7. Default Recipients ‐> <ANY EMAIL ID> (Mandatory)
➔ Save and Restart.
BrainBox Network. Copyright@2015. All rights reserved
 
 
JENKINS NEW PROJECT SETUP 
➔ OPEN ​http://localhost:8080/
➔ Create new Job:​Click on “New Item”
➔ Enter your project name in “Item Name” text box
➔ Check true “Freestyle project”
➔ Press “OK”
BrainBox Network. Copyright@2015. All rights reserved
 
 
GET PROJECT FROM  REPOSITORY 
 
 
➔ Go to “Source Code Management” block
➔ Select “Subversion”
➔ Enter Repository Url”
➔ Insert “Use Svn update as much as possible” in the “Check‐out Strategy” field
➔ Press “Apply”
➔ In first time Svn setup you also configure Svn credential
➔ Click “Enter Credentials”, and enter your Svn credentials
BrainBox Network. Copyright@2015. All rights reserved
 
 
BUILD ANDROID PROJECT 
 
 
 
➔ Go To “Build Tag”
➔ Click on “Add Build Setup”
➔
➔ Select “Execute windows batch command”
➔ Paste below code in Command Prompt:
​gradlew.bat assembleDebug
➔ ADD ONE MORE COMMAND BOX by clicking on “Add build step” and paste below code
➔ if exist temp rmdir temp /S /Q
➔ if not exist temp mkdir temp
copy /Y "%WORKSPACE%appbuildoutputsapk<YOUR_APK_NAME>.apk"
"temp<YOUR_APK_NAME>_%BUILD_NUMBER%.apk"
move /Y "%WORKSPACE%appbuildoutputsapk<YOUR_APK_NAME>.apk"
"c:Program Files (x86)JenkinsuserContent"
➔ As shown below :‐
BrainBox Network. Copyright@2015. All rights reserved
 
 
➔ Press “Apply”.
EMAIL NOTIFICATION 
 
➔ NOTIFICATION ON SUCCESS BUILD (SEND APK WITH NOTIFICATION)
1. Go To post build action tag
2. Select “Add Post build action”
3. Select “Editable Email Notification”
BrainBox Network. Copyright@2015. All rights reserved
 
 
ADVANCED SETTING 
 
 
 
➔ Click on “Advanced Setting”
BrainBox Network. Copyright@2015. All rights reserved
 
 
SET SUCCESS TRIGGER 
 
 
 
➔ Go To “Trigger” tag
➔ Press “Add Trigger”
➔ Select “success”
➔ Screen looks like below screen
➔ Select “Advanced”.
BrainBox Network. Copyright@2015. All rights reserved
 
 
SETUP NOTIFICATION DETAIL 
 
 
 
➔ Add “Recipient List” (Ex: ​mohit.mobifly@gmail.com​)
➔ Set “Subject” (Ex: $PROJECT_NAME ‐ $BUILD_NUMBER ‐ $BUILD_STATUS)
➔ Set “Content” :
​<html>
<body>
<h4>Build # $BUILD_NUMBER ‐ $BUILD_STATUS</h4>
<h4>APK Name: <YOUR_APK_NAME>_$BUILD_TYPE_ $BUILD_NUMBER .apk</h4>
</body>
</html>
➔ Add “Attachments”
Copy & Paste given code:​​(temp/*.apk)
➔ Set “Attach Build Log”: ​If you want to attach any bulid log, then you have to select “Attach
Build Log” otherwise select “Do Not Attach Build Log”
BrainBox Network. Copyright@2015. All rights reserved
 
 
SET FAILURE TRIGGER 
 
 
 
➔ Go To “Trigger Tag”
➔ Press “Add Trigger”
➔ Select “Failure”
➔ Your screen will looks like below shown screen
BrainBox Network. Copyright@2015. All rights reserved
 
 
SETUP NOTIFICATION DETAIL 
 
➔ ADD Recipient List​​(Ex: ​mohit.mobifly@gmail.com​)
➔ Set Subject (Ex: $PROJECT_NAME ‐ $BUILD_NUMBER ‐ $BUILD_STATUS)
➔ Set Content (<ANY INFORMATION>)
➔ Set “Attach Build Log” (Select “Attach Build Log”)
➔ Save and Build now.
BrainBox Network. Copyright@2015. All rights reserved
 
 
PROJECT BUILD ERROR 
➔ If during build a Project on jenkin , An exception occurs with message “The SDK directory
does not exist.”
As shown below :‐
➔ Then go through the jenkins directory of your system :
1. Open workspace folder under your project folder in jenkins directory
2. Update “local.properties” file with your local SDK path and save it.
 
   
BrainBox Network. Copyright@2015. All rights reserved
 
 
NOW BUILD THE PROJECT 
 
➔ On successful build of project.
➔ Find generated APK on your specified locations.
➔ Check your specified emails also.
BrainBox Network. Copyright@2015. All rights reserved
 
 
Thank You So Very Much
For queries please write on ​ashish@mobifly.in
Developed By
Mohit Saini
Android Developer ‐ Mobifly
mobifly.in
BrainBox Network. Copyright@2015. All rights reserved
 

More Related Content

PPT
Php ppt
PDF
How to investigate and recover from a security breach in WordPress
PDF
WordPress Security - 12 WordPress Security Fundamentals
PDF
Creating a full stack web app with python, npm, webpack and react
PDF
Improving WordPress performance (xdebug and profiling)
PDF
Account creation lab guide
PDF
The moment my site got hacked
PDF
OpenStack Upstream Training Cisco Live!
Php ppt
How to investigate and recover from a security breach in WordPress
WordPress Security - 12 WordPress Security Fundamentals
Creating a full stack web app with python, npm, webpack and react
Improving WordPress performance (xdebug and profiling)
Account creation lab guide
The moment my site got hacked
OpenStack Upstream Training Cisco Live!

What's hot (18)

PDF
Realtime with-websockets-2015
PPTX
My Database Skills Killed the Server
PPTX
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
PDF
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
PDF
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
PDF
First steps with Gutenberg for developers - WC Prague 2020
PPTX
HTTPS and HTTP/2
PDF
Build, Deploy and Run Node Js Application on Azure using Docker
PDF
Continuous Integration and Deployment Patterns for Magento
PDF
When Web meet Native App
PDF
Writing a Jenkins / Hudson plugin
PPTX
WinOps meetup April 2016 DevOps lessons from Microsoft \\Build\
PDF
DevOops & How I hacked you DevopsDays DC June 2015
PPTX
Jenkins Plugin Development With Gradle And Groovy
PDF
Testing Automaton - CFSummit 2016
PPTX
Automated ui-testing
PDF
Continuous Integration with Hackintosh
PDF
Step by step guide for creating wordpress plugin
Realtime with-websockets-2015
My Database Skills Killed the Server
DevOops Redux Ken Johnson Chris Gates - AppSec USA 2016
Take home your very own free Vagrant CFML Dev Environment - Presented at dev....
Gestione avanzata di WordPress con WP-CLI - WordCamp Torino 2017 - Andrea Car...
First steps with Gutenberg for developers - WC Prague 2020
HTTPS and HTTP/2
Build, Deploy and Run Node Js Application on Azure using Docker
Continuous Integration and Deployment Patterns for Magento
When Web meet Native App
Writing a Jenkins / Hudson plugin
WinOps meetup April 2016 DevOps lessons from Microsoft \\Build\
DevOops & How I hacked you DevopsDays DC June 2015
Jenkins Plugin Development With Gradle And Groovy
Testing Automaton - CFSummit 2016
Automated ui-testing
Continuous Integration with Hackintosh
Step by step guide for creating wordpress plugin
Ad

Viewers also liked (14)

PDF
Images(2)
PDF
The beach in Hua Hin Thailand by Ingemar Pongratz
PPSX
TEMPORARY WETLANDS IN SPAIN final
DOCX
Jarvier Peeples - Resume - January 2017
PPT
Conclusiones Coneia 2011
PDF
ENC Times-December 10,2016
PPTX
AGUA EN EL PLANETA DE LA VIDA
PDF
AF 137 (SS 200) - Ka
PDF
presentacion
PDF
Data bases in educatioanl contexts
PPTX
Case Study on Property Portal Data Security
PPTX
Refactoring Workflows & Techniques Presentation by Valentin Stantescu
PDF
PLDT Investment in Rocket Internet
Images(2)
The beach in Hua Hin Thailand by Ingemar Pongratz
TEMPORARY WETLANDS IN SPAIN final
Jarvier Peeples - Resume - January 2017
Conclusiones Coneia 2011
ENC Times-December 10,2016
AGUA EN EL PLANETA DE LA VIDA
AF 137 (SS 200) - Ka
presentacion
Data bases in educatioanl contexts
Case Study on Property Portal Data Security
Refactoring Workflows & Techniques Presentation by Valentin Stantescu
PLDT Investment in Rocket Internet
Ad

Similar to Jenkins Setup Document (20)

PDF
Mixpanel Integration in Android
PDF
Chocolatey - making the process of installing software on windows easy as pie
PDF
Setting up your virtual infrastructure using fi-lab cloud
PPT
Install NewGenLib on Windows XP
PPT
Practical Installation Process Of New Gen Lib Oss On Windows Xp For Library A...
PDF
Sencha touchonbb10 bootcamp
PPT
Installation Process Of New Gen Lib Oss On Windows Xp For Library Automation ...
PDF
Software industrialization
PPT
Newgenlib
PPT
Newgenlib
DOC
Create Applicationwith IIS 7
DOC
( 16 ) Office 2007 Create An Extranet Site With Forms Authentication
DOC
Gwt portlet
PDF
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
PDF
Setting ELK in 10 minutes on Windows locally
PDF
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
PDF
Orangescrum In App Chat Add-on User Manual
PPTX
Bugzilla Installation Process
PPTX
Jenkins CI/CD setup for iOS in Mac OSX
PDF
Installing WordPress on AWS
Mixpanel Integration in Android
Chocolatey - making the process of installing software on windows easy as pie
Setting up your virtual infrastructure using fi-lab cloud
Install NewGenLib on Windows XP
Practical Installation Process Of New Gen Lib Oss On Windows Xp For Library A...
Sencha touchonbb10 bootcamp
Installation Process Of New Gen Lib Oss On Windows Xp For Library Automation ...
Software industrialization
Newgenlib
Newgenlib
Create Applicationwith IIS 7
( 16 ) Office 2007 Create An Extranet Site With Forms Authentication
Gwt portlet
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Setting ELK in 10 minutes on Windows locally
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Orangescrum In App Chat Add-on User Manual
Bugzilla Installation Process
Jenkins CI/CD setup for iOS in Mac OSX
Installing WordPress on AWS

More from mobi fly (6)

PDF
Mobifly - mobile and web application development company gurgaon - brochure
PDF
Razorpay
PDF
Urban Airship & Android Application Integration Document
PPTX
Procto r executive presentation
PPTX
Last mile mobile app for logistics
PDF
Monitoring as a_servihttp://www.slideshare.net/upload#ce_4_healthcareproviders
Mobifly - mobile and web application development company gurgaon - brochure
Razorpay
Urban Airship & Android Application Integration Document
Procto r executive presentation
Last mile mobile app for logistics
Monitoring as a_servihttp://www.slideshare.net/upload#ce_4_healthcareproviders

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Machine learning based COVID-19 study performance prediction
PDF
Unlocking AI with Model Context Protocol (MCP)
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPT
Teaching material agriculture food technology
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PPTX
Cloud computing and distributed systems.
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Review of recent advances in non-invasive hemoglobin estimation
Machine learning based COVID-19 study performance prediction
Unlocking AI with Model Context Protocol (MCP)
“AI and Expert System Decision Support & Business Intelligence Systems”
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Teaching material agriculture food technology
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
Cloud computing and distributed systems.
Spectral efficient network and resource selection model in 5G networks
Advanced methodologies resolving dimensionality complications for autism neur...
Understanding_Digital_Forensics_Presentation.pptx
Empathic Computing: Creating Shared Understanding
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
sap open course for s4hana steps from ECC to s4
Programs and apps: productivity, graphics, security and other tools
Chapter 3 Spatial Domain Image Processing.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

Jenkins Setup Document

  • 1.                     Jenkins Setup Document       BrainBox Network. Copyright@2015. All rights reserved  
  • 2.   The document provides steps to integrate Android Application with Jenkins. The integration process requires following steps ‐ 1. System Requirements 2. Download Jenkins 3. Starting Jenkins 4. How to Install Tomcat in Windows 5. Configure Apache with Jenkins 6. Jenkins First Look 7. Configuration 8. JDK Setup 9. PlugIn Installation 10. List of Necessary Plugins  11. Jenkins New Project Setup 12. Get Project from Repository 13. Build Android Project 14. Email Notification 15. Advanced Setting 16. Set Success Trigger 17. Setup Notification Detail 18. Set Failure Trigger 19. Setup Notification Detail 20. Project Build Error 21. Build the Project BrainBox Network. Copyright@2015. All rights reserved  
  • 3.   SYSTEM REQUIREMENTS    ➔ JDK :​JDK 1.5 or above ➔ Memory:​2GB RAM (recommended) ➔ Disk Space:​No minimum requirement. Note that since all builds will be stored on the Jenkins machines, it has to be ensured that sufficient disk space is available for build storage. ➔ Operating System Version:​Jenkins can be installed on Windows, Ubuntu/Debian, Red Hat/Fedora/CentOS, Mac OS X, openSUSE, FReeBSD, OpenBSD, Gentoo. ➔ Java Container:​The WAR file can be run in any container that supports Servlet 2.4/JSP 2.0 or later.(An example is ​TOMCAT/APACHE​). BrainBox Network. Copyright@2015. All rights reserved  
  • 4.   DOWNLOAD JENKINS    ➔ Open Given Link :​​https://jenkins‐ci.org/ ➔ Download Jenkins for system BrainBox Network. Copyright@2015. All rights reserved  
  • 5.   STARTING JENKINS  ➔ Open the command prompt, ➔ Browse to the directory where the “Jenkins.war” file is present. ➔ Run the following command: Mostly Jenkins installation directory location is:​C:Program Files (x86)Jenkins ​Command:​Java –jar Jenkins.war ➔ Accessing Jenkins:​ ​Once Jenkins is up and running,   You can access Jenkins from the link − ​http://localhost:8080   BrainBox Network. Copyright@2015. All rights reserved  
  • 6.   HOW TO INSTALL TOMCAT IN WINDOWS MACHINE    ➔ Link ​https://tomcat.apache.org/download‐70.cgi​use for download the tomcat. ➔ Then unzip the contents of the downloaded zip file and install. BrainBox Network. Copyright@2015. All rights reserved  
  • 7.   CONFIGURE APACHE WITH JENKINS    ➔ Copy the ​Jenkis.war​file and PASTE it to the webapps folder in the tomcat folder. ➔ Now open the​​command prompt ➔ Browse to the bin directory in this folder and run the start.bat file E:Appstomcat7bin>startup.bat ➔ Then open ​http://localhost/jenkins BrainBox Network. Copyright@2015. All rights reserved  
  • 9.   CONFIGURATION    ➔ Click on “Manage Jenkins” link, showing in left side bar of the screen. ➔ Click on “Configuration Setting”, showing in the container part of the screen.   BrainBox Network. Copyright@2015. All rights reserved  
  • 10.   JDK SETUP    ➔ Click on “JDK Installations” button ➔ Set JDK path, where you want the install JDK in your machine. ➔ Then click “Save” BrainBox Network. Copyright@2015. All rights reserved  
  • 11.   ➔ Then click on “Available” button ➔ Then put the “Go to next Slide” in your “Filter” showing in right top corner. ➔ Check and select Plugin, ➔ Then Click “Download now and install after restart” button BrainBox Network. Copyright@2015. All rights reserved  
  • 12.   INSTALL PLUGIN  ➔ Click on “Manage Plugin” icon, it is located in container part of the screen.         BrainBox Network. Copyright@2015. All rights reserved  
  • 13.   LIST FOR NECESSARY PLUGINS    1. Credentials Plugin 2. Email Extension Plugin 3. Google Authenticated Source plugin 4. Google Login Plugin 5. Google OAuth Credentials plugin 6. Gradle plugin 7. Subversion Plug‐in 8. OAuth Credentials plugin 9. SSH Credentials Plugin ➔ Go to “Configure System” ➔ Go to extended email notification ➔ Click “Advanced” ➔ Fill in blank: 1. SMTP server ‐> smtp.gmail.com (Mandatory) 2. Use SMTP Authentication ‐> CHECK TRUE (Mandatory) 3. USER NAME ‐> <YOUR_EMAIL_ID> (Mandatory) 4. PASSWORD ‐> <YOUR_EMAIL_ID_PASSWORD> (Mandatory) 5. USE SSL ‐> CHECK TRUE (Mandatory) 6. SMTP PORT ‐> 465 (Mandatory) 7. Default Recipients ‐> <ANY EMAIL ID> (Mandatory) ➔ Save and Restart. BrainBox Network. Copyright@2015. All rights reserved  
  • 14.   JENKINS NEW PROJECT SETUP  ➔ OPEN ​http://localhost:8080/ ➔ Create new Job:​Click on “New Item” ➔ Enter your project name in “Item Name” text box ➔ Check true “Freestyle project” ➔ Press “OK” BrainBox Network. Copyright@2015. All rights reserved  
  • 15.   GET PROJECT FROM  REPOSITORY      ➔ Go to “Source Code Management” block ➔ Select “Subversion” ➔ Enter Repository Url” ➔ Insert “Use Svn update as much as possible” in the “Check‐out Strategy” field ➔ Press “Apply” ➔ In first time Svn setup you also configure Svn credential ➔ Click “Enter Credentials”, and enter your Svn credentials BrainBox Network. Copyright@2015. All rights reserved  
  • 16.   BUILD ANDROID PROJECT        ➔ Go To “Build Tag” ➔ Click on “Add Build Setup” ➔ ➔ Select “Execute windows batch command” ➔ Paste below code in Command Prompt: ​gradlew.bat assembleDebug ➔ ADD ONE MORE COMMAND BOX by clicking on “Add build step” and paste below code ➔ if exist temp rmdir temp /S /Q ➔ if not exist temp mkdir temp copy /Y "%WORKSPACE%appbuildoutputsapk<YOUR_APK_NAME>.apk" "temp<YOUR_APK_NAME>_%BUILD_NUMBER%.apk" move /Y "%WORKSPACE%appbuildoutputsapk<YOUR_APK_NAME>.apk" "c:Program Files (x86)JenkinsuserContent" ➔ As shown below :‐ BrainBox Network. Copyright@2015. All rights reserved  
  • 17.   ➔ Press “Apply”. EMAIL NOTIFICATION    ➔ NOTIFICATION ON SUCCESS BUILD (SEND APK WITH NOTIFICATION) 1. Go To post build action tag 2. Select “Add Post build action” 3. Select “Editable Email Notification” BrainBox Network. Copyright@2015. All rights reserved  
  • 18.   ADVANCED SETTING        ➔ Click on “Advanced Setting” BrainBox Network. Copyright@2015. All rights reserved  
  • 19.   SET SUCCESS TRIGGER        ➔ Go To “Trigger” tag ➔ Press “Add Trigger” ➔ Select “success” ➔ Screen looks like below screen ➔ Select “Advanced”. BrainBox Network. Copyright@2015. All rights reserved  
  • 20.   SETUP NOTIFICATION DETAIL        ➔ Add “Recipient List” (Ex: ​mohit.mobifly@gmail.com​) ➔ Set “Subject” (Ex: $PROJECT_NAME ‐ $BUILD_NUMBER ‐ $BUILD_STATUS) ➔ Set “Content” : ​<html> <body> <h4>Build # $BUILD_NUMBER ‐ $BUILD_STATUS</h4> <h4>APK Name: <YOUR_APK_NAME>_$BUILD_TYPE_ $BUILD_NUMBER .apk</h4> </body> </html> ➔ Add “Attachments” Copy & Paste given code:​​(temp/*.apk) ➔ Set “Attach Build Log”: ​If you want to attach any bulid log, then you have to select “Attach Build Log” otherwise select “Do Not Attach Build Log” BrainBox Network. Copyright@2015. All rights reserved  
  • 21.   SET FAILURE TRIGGER        ➔ Go To “Trigger Tag” ➔ Press “Add Trigger” ➔ Select “Failure” ➔ Your screen will looks like below shown screen BrainBox Network. Copyright@2015. All rights reserved  
  • 22.   SETUP NOTIFICATION DETAIL    ➔ ADD Recipient List​​(Ex: ​mohit.mobifly@gmail.com​) ➔ Set Subject (Ex: $PROJECT_NAME ‐ $BUILD_NUMBER ‐ $BUILD_STATUS) ➔ Set Content (<ANY INFORMATION>) ➔ Set “Attach Build Log” (Select “Attach Build Log”) ➔ Save and Build now. BrainBox Network. Copyright@2015. All rights reserved  
  • 23.   PROJECT BUILD ERROR  ➔ If during build a Project on jenkin , An exception occurs with message “The SDK directory does not exist.” As shown below :‐ ➔ Then go through the jenkins directory of your system : 1. Open workspace folder under your project folder in jenkins directory 2. Update “local.properties” file with your local SDK path and save it.       BrainBox Network. Copyright@2015. All rights reserved  
  • 24.   NOW BUILD THE PROJECT    ➔ On successful build of project. ➔ Find generated APK on your specified locations. ➔ Check your specified emails also. BrainBox Network. Copyright@2015. All rights reserved  
  • 25.   Thank You So Very Much For queries please write on ​ashish@mobifly.in Developed By Mohit Saini Android Developer ‐ Mobifly mobifly.in BrainBox Network. Copyright@2015. All rights reserved