src/main/java/org/jenkinsci/plugins/awsdevicefarm/AWSDeviceFarm.java
private Upload upload(Project project, String artifact, AWSDeviceFarmUploadType uploadType) throws InterruptedException, IOException, AWSDeviceFarmException {
        if (artifact == null || artifact.isEmpty()) {
            throw new AWSDeviceFarmException("Must have an artifact path.");
        }

        File file = getArtifactFile(env.expand(artifact));
        if (file == null || !file.exists()) {
            throw new AWSDeviceFarmException(String.format("File artifact %s not found.", artifact));
        }

        return upload(file, project, uploadType);
    }
/**
     * Private method to handle uploading apps and tests to Device Farm.
     *
     * @param project    The Device Farm project to upload to.
     * @param artifact   Possibly glob-y path to the file to be uploaded.
     * @param uploadType The type of upload (app/test/etc.).
     * @return The Device Farm Upload object.
     * @throws IOException
     * @throws AWSDeviceFarmException
     */
Private method to handle uploading apps and tests to Device Farm.
@param project    The Device Farm project to upload to.
@param artifact   Possibly glob-y path to the file to be uploaded.
@param uploadType The type of upload (app/test/etc.).
@return The Device Farm Upload object.
Private method to handle uploading apps and tests to Device Farm . @param project The Device Farm project to upload to . @param artifact Possibly glob - y path to the file to be uploaded . @param uploadType The type of upload ( app / test / etc . ) . @return The Device Farm Upload object .
private Upload upload(Project project, String artifact, AWSDeviceFarmUploadType uploadType) throws InterruptedException, IOException, AWSDeviceFarmException {
        if (artifact == null || artifact.isEmpty()) {
            throw new AWSDeviceFarmException("Must have an artifact path.");
        }
        File file = getArtifactFile(env.expand(artifact));
        if (file == null || !file.exists()) {
            throw new AWSDeviceFarmException(String.format("File artifact %s not found.", artifact));
        }
        return upload(file, project, uploadType);
    }
private Upload upload ( Project project , String artifact , AWSDeviceFarmUploadType uploadType ) throws InterruptedException , IOException , AWSDeviceFarmException { if ( artifact == null || artifact . isEmpty ( ) ) { throw new AWSDeviceFarmException ( "Must have an artifact path." ) ; } File file = getArtifactFile ( env . expand ( artifact ) ) ; if ( file == null || ! file . exists ( ) ) { throw new AWSDeviceFarmException ( String . format ( "File artifact %s not found." , artifact ) ) ; } return upload ( file , project , uploadType ) ; }
Private method to handle uploading apps and tests to Device Farm.
Private method to handle uploading apps and tests to Device Farm .