How to configure Sonarqube Jenkins integration

How to configure sonarqube in jenkins?

SonarQube is code quality checker and that can be integrated to Jenkins workflow to deliver continuous inspection.
Configuration steps as follows:SonarQube:1. Do a SonarQube docker image pull from docker hub 2. Then use docker run command to run the image to build SonarQube container.(Assumption JDK is already setup on the machine) if not , we need to docker containerized JDK.3. Now that step 2 allows us to run the SonarQube as a standalone server under localhost port 9000. (Type localhost:9000 on browser)4.login to SonarQube web app using admin as user I’d and admin as password.5. The go to Admin tab , Market place of SonarQube and install the plugins you wanted (SonarPython, Java, Groovy etc)6. You may need to restart SonarQube app after applying plugin installation.
Jenkins integration with Sonar1. Now that Sonar Server is ready, you may need to integrate Jenkins with Sonar.2. Login on to Jenkins, and go to Manage plugin section to install Sonar plugin.3. After restarting Jenkins, go the Configure system in Manage Jenkins section.4. Enable injection of Sonarserver,  add Sonar server auth token etc.
Now, Enable Analysis with Sonar scanner by defining the SonarQube server on Global configuration Then configure Jenkins build

What is contract testing

What is contract testing?

Contract testing is famous in microservices world. When we consider less numbers of microservices,  then contract testing is not so necessary.However when you look at the Amazon or Netflix microservices mesh, it is countless. Such cases it is extremely difficult for developer or tester to maintain unit/automation test suite as per the microservices development chnages.
Contract testing is the best possible solution currently offered for this situation. In contract testing, a mocked service is created to represent the provider.  There are commercial or opensource tools available to stimulate this. In short, contract is set of predefined requests and responses created by automation or developer team to do their testing.

How to read pdf content in java for automation project

How to read pdf content in java?

Apache PDFBox and FontBox jar available can be useful here. Add these two libraries to your Maven Pom.xml or build.gradle dependencies.
Then write java code to parse your PDF files to create POJOs.
What is POJO in javaPOJO stands for Plain java object and it has not restrictions or class path dependency.

What is Ansible molecule

What is Ansible Molecule and how to install Ansible Molecule ?

Testing your Ansible roles with Molecule: Ansible molecule project is helpful for Ansible roles development and testing. Ansible molecule have been great help for developing ansible testing framework and scenarios.

How to install Molecule?

python3 -m pip install –user “molecule[lint]”

molecule docker image is also available and is a good alternative way to implement ansible molecule.

Ansible molecule Anatomy:

Below are the Anatomy of Ansible molecule,

dependency:

name: this can be galaxy or Shell or Gilt

driver:

name: this can be docker, cloud like Azure, EC2, DigitalOcean etc

linit:

name: this can lint the program. For example ‘yamllint’ for yml playbook files.

platform: this configures driver specific platforms, populates hosts, handle interactions

name:

provisioner: this configures ansible playbooks run.

name: ansible

lint:

name: ansible-lint

verifier: this configures what to run for tests.

name: ansible

lint:

name: ansible-lint

scenario: this configures how test scenario runs…

test_sequence:

-lint

-create

-cleanup

-distroy

-syntax etc

What is google App Engine

What is Google’s App Engine ?

Google provides platform as service or PaaS via Google’s App Engine.App Engine is a cloud computing platform where development and hosting of applications can be done.Other feature is App engine scales up on demand basis when the requests are more.
App Engine supports almost all development technologies like Go, Java , Python, .NET, ruby.
Python web frameworks like Flask, Django all can run on App Engine.

How to setup angular project

How to setup Angular project and generate components ?

  1. install latest nodejs from nodejs.org
  2. Go to git bash/powershell ISE/CMD
  3. type following commands,
  4. install Angular : npm install -g @angular/cli
  5. ng new my-newweb-app
  6. ng g c myFirstModule or type mg generate component myFirstModule (optional)
  7. go to project folder ” my-newweb-app ” via commandline itself
  8. type mg serve -o

Other programming notes

select [(ngModel)]=”value” (change)=”selected()”

option *ngFor=”let item of data” [ngValue]=”item”>{{item.name}}</option
</select

selected(){
alert(this.value.name)
}

data:Array = [
{id: 0, name: “Test “},
{id: 1, name: “Test2”}
];

div>  <input ref-email placeholder=”text here” />  </div