Created
November 4, 2019 13:11
-
-
Save egek92/8f3a3f0ffdf9ff1b2ea6a8ed93b87768 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
One can specifies a different port than the usual 8080 to make it unique and avoid any errors, in case another service is using Jenkins | |
java -jar jenkins.war --httpPort=9091 | |
Next Step: Configure Jenkins | |
Manage Jenkins > Configure System | |
Mentioned the ANDROID_HOME as my Android SDK path variable in Global properties. | |
2. Manage Jenkins > Global Tool Configuration | |
Here I told Jenkins where it can find GIT. | |
Next Step : Add New Item | |
Adding New Item is the easy part .Enter Item Name [ Android Application/Project Name ] and Select Freestyle project . | |
Click OK. | |
Next Step : Configure New Item | |
Next, go to Source Code Management. Configure you repository with Jenkins like below . | |
Also we need to git Credentials .So click on Add and your Credentials. | |
Select the newly added Credentials . | |
In Build Triggers, select Poll SCM | |
and add Schedule : | |
* * * * * | |
Five time “*” with space .Which mean Jenkins will check after every minute if there are any changes in the git repository it will run the build. | |
In Build , Add build step > Invoke Gradle script | |
Select Use Gradle Wrapper and add the following tasks | |
clean | |
assembleDebug | |
test | |
connectedAndroidTest | |
Lets add some Post-build Actions . | |
Publish JUnit test result report | |
2. Archive the artifacts | |
3. Editable Email Notification | |
In Project Recipient List add emails to which you would like to send email after each build . In above configuration I have attached the APK and the Build Log file . | |
All done .Click Apply and Save. | |
The Result . | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment