示例#1
0
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
示例#2
0
def remote_file(relative_path):
    return JenkinsHelper.getRemoteFile(context, relative_path)
示例#3
0
def is_windows():
    return JenkinsHelper.isNodeWindows(context)
示例#4
0
def execute(cmds):
    return JenkinsHelper.execute(context, cmds, env_vars)
示例#5
0
def archive_artifacts(source_patterns):
    JenkinsHelper.archiveArtifacts(context, source_patterns)
示例#6
0
def report_tests(test_file_pattern):
    return JenkinsHelper.reportTests(context, test_file_pattern)
示例#7
0
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 archive_artifacts(source_patterns):
    JenkinsHelper.archiveArtifacts(context, source_patterns)
示例#9
0
def wait_for_jobs_start(jobs, wait_millis=0):
    return JenkinsHelper.waitForJobsToStart(context, jobs, wait_millis)
示例#10
0
def wait_for_job(job, wait_millis=0):
    return JenkinsHelper.waitForJob(context, job, wait_millis)
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)
示例#14
0
def trigger_jobs(job_names, params=None):
    return JenkinsHelper.triggerJobs(context, job_names, params)
示例#15
0
def run_git(args, with_auth=False):
    return JenkinsHelper.runGit(context, args, env_vars, with_auth)
示例#16
0
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)