This is an automated email from the ASF dual-hosted git repository.

binh pushed a commit to branch xinbinhuang-patch-1
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 10d984f51767beb8ad359be38c4d4560487e82b6
Author: Xinbin Huang <[email protected]>
AuthorDate: Fri Oct 15 16:36:41 2021 -0700

    Remove dead code path from JenkinsJobTriggerOperator
---
 airflow/providers/jenkins/operators/jenkins_job_trigger.py | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/airflow/providers/jenkins/operators/jenkins_job_trigger.py 
b/airflow/providers/jenkins/operators/jenkins_job_trigger.py
index 155070b..68491c2 100644
--- a/airflow/providers/jenkins/operators/jenkins_job_trigger.py
+++ b/airflow/providers/jenkins/operators/jenkins_job_trigger.py
@@ -183,20 +183,6 @@ class JenkinsJobTriggerOperator(BaseOperator):
         return JenkinsHook(self.jenkins_connection_id)
 
     def execute(self, context: Mapping[Any, Any]) -> Optional[str]:
-        if not self.jenkins_connection_id:
-            self.log.error(
-                'Please specify the jenkins connection id to use.'
-                'You must create a Jenkins connection before'
-                ' being able to use this operator'
-            )
-            raise AirflowException(
-                'The jenkins_connection_id parameter is missing, impossible to 
trigger the job'
-            )
-
-        if not self.job_name:
-            self.log.error("Please specify the job name to use in the job_name 
parameter")
-            raise AirflowException('The job_name parameter is 
missing,impossible to trigger the job')
-
         self.log.info(
             'Triggering the job %s on the jenkins : %s with the parameters : 
%s',
             self.job_name,

Reply via email to