List of usage examples for com.amazonaws.services.devicefarm.model Job getName
public String getName()
The job's name.
From source file:org.jenkinsci.plugins.awsdevicefarm.AWSDeviceFarmRecorder.java
License:Open Source License
private Map<String, FilePath> getJobs(AWSDeviceFarm adf, ScheduleRunResult run, FilePath resultsDir) throws IOException, InterruptedException { Map<String, FilePath> jobs = new HashMap<String, FilePath>(); ListJobsResult result = adf.listJobs(run.getRun().getArn()); for (Job job : result.getJobs()) { String arn = job.getArn().split(":")[6]; String jobId = arn.substring(arn.lastIndexOf("/") + 1); // Two jobs can have same name. Appending Os version information to job name String osVersion = null;//from w ww. jav a 2s . c om if (job.getDevice() != null) { osVersion = job.getDevice().getOs(); } jobs.put(arn, new FilePath(resultsDir, job.getName() + "-" + (osVersion != null ? osVersion : jobId))); jobs.get(arn).mkdirs(); } return jobs; }