Fatih Degirmenci | c2a4601 | 2019-09-30 12:07:45 +0200 | [diff] [blame] | 1 | from flask import current_app |
| 2 | |
| 3 | from jenkins import Jenkins |
| 4 | |
| 5 | def handle_booking_job(booking_id, deploy_scenario): |
| 6 | jenkins_server = Jenkins(current_app.config['JENKINS_URL'], username=current_app.config['JENKINS_NOLABS_USERNAME'], password=current_app.config['JENKINS_NOLABS_TOKEN']) |
Fatih Degirmenci | adb77ef | 2019-10-02 06:00:46 +0000 | [diff] [blame] | 7 | jenkins_server.build_job(current_app.config['JENKINS_HANDLE_BOOKING_JOB'], {'BOOKING_ID': booking_id, 'DEPLOY_SCENARIO': deploy_scenario}) |
Fatih Degirmenci | c2a4601 | 2019-09-30 12:07:45 +0200 | [diff] [blame] | 8 | |
| 9 | def delete_booking_job(booking_id, deploy_scenario): |
| 10 | jenkins_server = Jenkins(current_app.config['JENKINS_URL'], username=current_app.config['JENKINS_NOLABS_USERNAME'], password=current_app.config['JENKINS_NOLABS_TOKEN']) |
Fatih Degirmenci | adb77ef | 2019-10-02 06:00:46 +0000 | [diff] [blame] | 11 | jenkins_server.build_job(current_app.config['JENKINS_DELETE_BOOKING_JOB'], {'BOOKING_ID': booking_id, 'DEPLOY_SCENARIO': deploy_scenario}) |