Example usage for com.amazonaws.services.devicefarm.model Suite getArn

List of usage examples for com.amazonaws.services.devicefarm.model Suite getArn

Introduction

In this page you can find the example usage for com.amazonaws.services.devicefarm.model Suite getArn.

Prototype


public String getArn() 

Source Link

Document

The suite's ARN.

Usage

From source file:org.jenkinsci.plugins.awsdevicefarm.AWSDeviceFarmRecorder.java

License:Open Source License

private Map<String, FilePath> getSuites(AWSDeviceFarm adf, ScheduleRunResult run, Map<String, FilePath> jobs)
        throws IOException, InterruptedException {
    Map<String, FilePath> suites = new HashMap<String, FilePath>();
    String runArn = run.getRun().getArn();
    String components[] = runArn.split(":");
    // constructing job ARN for each job using the run ARN
    components[5] = "job";
    for (Map.Entry<String, FilePath> jobEntry : jobs.entrySet()) {
        String jobArn = jobEntry.getKey();
        components[6] = jobArn;//from   ww w  .jav a 2  s. com
        String fullJobArn = StringUtils.join(components, ":");
        ListSuitesResult result = adf.listSuites(fullJobArn);
        for (Suite suite : result.getSuites()) {
            String arn = suite.getArn().split(":")[6];
            suites.put(arn, new FilePath(jobs.get(jobArn), suite.getName()));
            suites.get(arn).mkdirs();
        }
    }
    return suites;
}