class_docstr: Hook to manage connection to jenkins server.
class_docstr_tok: ["Hook","to","manage","connection","to","jenkins","server","."]
code: def get_build_building_state(
      self, job_name: str, build_number: int | None
  ) -> bool:
      if not build_number:
          build_number_to_check = self.get_latest_build_number(job_name)
      else:
          build_number_to_check = build_number
  
      self.log.info(
          "Getting build info for %s build number: #%s",
          job_name,
          build_number_to_check,
      )
      build_info = self.jenkins_server.get_build_info(
          job_name, build_number_to_check
      )
      building = build_info["building"]
      return building
  
file_path: airflow/airflow/providers/jenkins/hooks/jenkins.py
imports: from __future__ import annotations
  from typing import Any
  import jenkins
  from airflow.hooks.base import BaseHook
label_desc: Use image node_id 7 for calling the JenkinsHook obj's underlying member method code with example usage: obj.get_build_building_state(job_name, build_number) and returns: building