code: def _resolve_base_image(self, build_json):
          
          spec = build_json.get("spec")
          try:
              image_id = spec['triggeredBy'][0]['imageChangeBuild']['imageID']
          except (TypeError, KeyError, IndexError):
              # build not marked for auto-rebuilds; use regular base image
              base_image = self.workflow.builder.base_image
              self.log.info("using %s as base image.", base_image)
          else:
              # build has auto-rebuilds enabled
              self.log.info("using %s from build spec[triggeredBy] as base image.", image_id)
              base_image = ImageName.parse(image_id)  # any exceptions will propagate
  
          return base_image
docs: If this is an auto-rebuild, adjust the base image to use the triggering build