Sunday, December 20, 2015

Solving Gradle DSL method not found : 'android()'


Getting "Gradle DSL method not found : 'android()" error, well then you are at right place to solve the things :)


Solution:
  • Open the project top level 'build.gradle' file
  • Remove the below configuration  android() method 

// Delete these lines from project top level 'build.gradle' file
android {
 compileSdkVersion 23
 buildToolsVersion '22.0.1'
}

  • Save the changes and re-compile 

Configure Jenkins email notifications

In this tutorial we will discuss about setting up the email notification in your Jenkins environment from the start :

Part I: Configure the email notifications from Jenkins Management section.

Part II : Configure the email notification for the individual Jenkins job  

Part I: Configure the email notifications from Jenkins Management section.

  1. First you should be logged in to Jenkins interface as Administrators, so you should see 'Manage Jenkins' link on the left side options.
  2. Click on the 'Manage Jenkins', to navigate to 'Manage Jenkins' page. 'Configure System' option should be available
  3. Click on the 'Configure System' link, scroll down on 'Configure System' page, you should see the 'Email notifications' section.
  4. Set the following settings in the 'Email notification' section [We are taking yahoo domain for example]
    • SMTP Server : smtp.mail.yahoo.com
    • Check 'Use SMTP Authentication'
    • Username : <email address to send emails> Example : test@yahoo.com
    • Password : <used email address password>
    • Check 'Use SSL'
    • SMTP Port : 465
    • Reply-To-Address :  <email address to reply emails, can be same email or different>
    • Charset : UTF-8
    • Scroll up on the page and now set following settings in 'Locations' section
      • System admin e-mail address :  <email address to send emails> Example : test@yahoo.com
    • Now to test your email configurations, Scroll down to 'Email Notification' section.
      • Check 'Test Configuration by sending test e-mail'
      • Test e-mail recipient : <recipient email address to test configuration> Example: youremail@yahoo.com
      • Click on "Test Configuration" button.
    • You should see message 'Email was successfully sent'. It yes, congrats you have successfully configured Jenkins email notifications :)
    • 'Apply' and 'Save' the changes.

    Part II : Configure the email notification for the individual Jenkins job  

    1. Navigate to configuration page of Jenkins job, for which you wants to send a email notification. For example we have a job 'test-email-notification'
    2. Under 'Post Build Actions', click on 'Add post build action' and select 'Email Notification' option.
    3. Now, when the 'Email notification' section visible. Provide the recipients email addresses and select other check box options per your requirement
    4. Click on Apply and Save the changes.
    Feel free to leave your comments in case of any issues in above steps... :)

    Saturday, December 12, 2015

    Some helpful commands to build multi-module maven project tests

    Build and execute tests from all the sub modules


    • mvn clean install

    Build and execute tests from a specific sub module


    • mvn clean install -pl <module-name> -am

    Build and execute a specific test from a specific sub module


    • mvn -DfailIfNoTests=false -Dtest=<test-class-name> clean install -pl <module-name> -am
    • mvn -DfailIfNoTests=false -Dtest=<test-class-name#test-method-name> clean install -pl <module-name> -am

    AWS Certified Solutions Architect Associate - AWS Introduction - Questions

    All the Best !!! Show Result !! Try Again !! ×