def grabArtifactFromJenkins(**context):
    "\n    Grab an artifact from the previous job\n    The python-jenkins library doesn't expose a method for that\n    But it's totally possible to build manually the request for that\n    "
    hook = JenkinsHook('jenkins_nqa')
    jenkins_server = hook.get_jenkins_server()
    url = context['task_instance'].xcom_pull(task_ids='trigger_job')
    url = (url + 'artifact/myartifact.xml')
    self.log.info('url : %s', url)
    request = Request(url)
    response = jenkins_server.jenkins_open(request)
    self.log.info('response: %s', response)
    return response
Grab an artifact from the previous job
The python-jenkins library doesn't expose a method for that
But it's totally possible to build manually the request for that
def grabArtifactFromJenkins(**context):
    "\n    Grab an artifact from the previous job\n    The python-jenkins library doesn't expose a method for that\n    But it's totally possible to build manually the request for that\n    "
    hook = JenkinsHook('jenkins_nqa')
    jenkins_server = hook.get_jenkins_server()
    url = context['task_instance'].xcom_pull(task_ids='trigger_job')
    url = (url + 'artifact/myartifact.xml')
    self.log.info('url : %s', url)
    request = Request(url)
    response = jenkins_server.jenkins_open(request)
    self.log.info('response: %s', response)
    return response