def init(new_context, new_config): assert new_context is not None assert new_config is not None global context, shared_context, config, build, launcher, listener, logger, env_vars context = new_context shared_context = new_context.sharedContext config = new_config build = context.build launcher = context.launcher listener = context.listener logger = listener.getLogger() env_vars = JenkinsHelper.getEnvVars(context) logger.println("pyjenkins module initialized!") return True
def remote_file(relative_path): return JenkinsHelper.getRemoteFile(context, relative_path)
def is_windows(): return JenkinsHelper.isNodeWindows(context)
def execute(cmds): return JenkinsHelper.execute(context, cmds, env_vars)
def archive_artifacts(source_patterns): JenkinsHelper.archiveArtifacts(context, source_patterns)
def report_tests(test_file_pattern): return JenkinsHelper.reportTests(context, test_file_pattern)
def wait_for_jobs(jobs, wait_millis=0): if isinstance(jobs, list): return JenkinsHelper.waitForJobsList(context, jobs, wait_millis) else: return JenkinsHelper.waitForJobs(context, jobs, wait_millis)
def wait_for_jobs_start(jobs, wait_millis=0): return JenkinsHelper.waitForJobsToStart(context, jobs, wait_millis)
def wait_for_job(job, wait_millis=0): return JenkinsHelper.waitForJob(context, job, wait_millis)
def execute(cmds): return JenkinsHelper.execute(context, cmds)
def trigger_jobs(job_names, params=None): return JenkinsHelper.triggerJobs(context, job_names, params)
def run_git(args, with_auth=False): return JenkinsHelper.runGit(context, args, env_vars, with_auth)
def trigger_jobs_and_wait(job_names, params=None, wait_millis=0): return JenkinsHelper.triggerJobsAndWait(context, job_names, params, wait_millis)
def report_tests(test_file_pattern): JenkinsHelper.reportTests(context, test_file_pattern)