This project is a flask app written in Python, designed to scrape 3rd party API regarding covid-19. returns, upon specified query, json info on peak deaths/recovered/new cases regarding requested country in the last 30 days. Also, Attached a jenkinsfile with configuration and basic querys for our flask server. This repo is deisgned for jenkins server, In case you wish to only run flask app , only app.py is requiered (specified in [optional])
- install Docker according to specified instructions at [https://docs.docker.com/get-docker/)
- install Jenkins according to https://www.jenkins.io/doc/book/installing/
- run jenkins on docker according to the info specified on (2)
- finish jenkins installation with the post installation wizard https://www.jenkins.io/doc/book/installing/#setup-wizard
- your jenkins server is now up and running , log in using http://localhost:8080/
- start a new job namee "fyber", name it , and choose the 'Pipeline' option
- scroll down to "Pipelin", and in the drop down replace "Pipeline script" to "Pipeline script from scp".
- change scm drop down menu to "git", and input this repository https://github.com/jovajiv/Fyber_Task_YOAV_GIAT.git
- apply and save
- now, at http://localhost:8080/job/fyber/ , choose the "build now" option
- once the execution is complete, refresh the current web page, you know see the option "build with parameters"
- click "build with parameters", and insert a list of country names you want to query, as specified in the description
- at the end of the execution, the outputs of the execution are available at the jobs console output , at http://localhost:8080/job/fyber/<build_id>/console
in case you wish to only run the flask server, please create a new flask project, and replace the app.py supplied in this repository. installing extra modules (such as 'requests module') might be necessery