**Description**

Don't mark dag as `failed` when `UNSTABLE` status received from Jenkins.
It can be done by adding `allow_unstable: bool` or `success_status_values: list` parameter to `JenkinsJobTriggerOperator.__init__`. For now `SUCCESS` status is hardcoded, any other lead to fail.

**Use case / motivation**

I want to restart a job (`retries` parameter) only if I get `FAILED` status. `UNSTABLE` is okay for me and it's no need to restart.

**Are you willing to submit a PR?**

Yes

**Related Issues**

No

airflow/providers/jenkins/operators/jenkins_job_trigger.py
#
#
#
import ast
import json
import socket
import time
from typing import Any, Dict, List, Mapping, Optional, Union
from urllib.error import HTTPError, URLError
import jenkins
from jenkins import Jenkins, JenkinsException
from requests import Request
from airflow.exceptions import AirflowException
from airflow.models import BaseOperator
from airflow.providers.jenkins.hooks.jenkins import JenkinsHook
from airflow.utils.decorators import apply_defaults
JenkinsRequest = Mapping[str, Any]
ParamType = Optional[Union[str, Dict, List]]
def jenkins_request_with_headers(jenkins_server: Jenkins, req: Request) -> Optional[JenkinsRequest]:
    """
    We need to get the headers in addition to the body answer
    to get the location from them