Adapted to Jenkins API