Skip to content

Instantly share code, notes, and snippets.

@pavelzag
Last active September 5, 2019 19:42
Show Gist options
  • Save pavelzag/1f90e31a38c32411d545066ad1949415 to your computer and use it in GitHub Desktop.
Save pavelzag/1f90e31a38c32411d545066ad1949415 to your computer and use it in GitHub Desktop.
from configuration import get_config
from json import dumps
from flask import Flask, request, Response
import jenkins as jenkins_python_module
JENKINS_URL = get_config("jenkins_url")
JENKINS_JOB_NAME = get_config("jenkins_job_name")
JENKINS_USER = get_config("jenkins_user")
JENKINS_PASSWORD = get_config("jenkins_password")
SUCCESS_MESSAGE = {
"status": "OK"
}
FAILURE_MESSAGE = {
"status": "Failure"
}
app = Flask(__name__)
server = jenkins_python_module.Jenkins(JENKINS_URL, username=JENKINS_USER, password=JENKINS_PASSWORD)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment