This project include python service that allowed you to send request and recive answer in json format. Using Jenkins and Docker. The service will run on localhost:8080
Returns a value of success / fail to contact the backend API.
curl localhost:8080/status
{“status”: “success”}
Returns the date (and value) of the highest peak of new Covid-19 cases in the last 30 days for a required country.
curl localhost:8080/newCasesPeak?country=israel
{“country”:”israel”,“method”:“newCasesPeak”,”date”:“9/12/20”,“value”:4158}
Returns the date (and value) of the highest peak of recovered Covid-19 cases in the last 30 days for the required country.
curl localhost:8080/deathsPeak?country=israel
{“country”:”israel”,“method”:“deathsPeak”,”date”:“9/12/20”,“value”:110}
Returns the date (and value) of the highest peak of death Covid-19 cases in the last 30 days for a required country.
new recoverd peak
curl localhost:8080/recoveredPeak?country=israel
{“country”:”israel”,“method”:“recoveredPeak”,”date”:“9/12/20”,“value”:11000}
First check that git installed in your computer.
Now go to Manage Jenkins -> Global Tool Configuration ->Git ->Git installation. Verify that git is define.
Second download and install Docker.
Third, download to jenkins the following plugin: Docker pipeline. Docker.
Choose "This project is parameterized". After that choose "Multi-Line string paramter" And name the paramter : "country"
Should look like this:
Starting the pipeline with git with the follwoing setting(notice to change the brance to"main"):
Git url: https://github.com/eladsolomon/Corona-API
That's it, you are ready to go!
While starting the job by clicking build, you will ask to enter parameters:
Enter each country you will like seperate by comma Example:
Click build and you will get 3 answer for each country:
- new cases peak
- new recoverd peak
- new death peak
If no country enter , stats of all the countries included will show.
By Elad Solomon