src/main/java/org/jenkinsci/plugins/awsdevicefarm/AWSDeviceFarmRecorder.java
private boolean validateConfiguration(@Nonnull PrintStream log) {
        String roleArn = getRoleArn();
        String akid = Secret.toString(getAkid());
        String skid = Secret.toString(getSkid());

        // [Required]: Auth Credentials
        if ((roleArn == null || roleArn.isEmpty()) && (akid == null || akid.isEmpty() || skid == null || skid.isEmpty())) {
            writeToLog(log, "Either IAM Role ARN or AKID/SKID must be set.");
            return false;
        }

        // [Required]: Project
        if (projectName == null || projectName.isEmpty()) {
            writeToLog(log, "Project must be set.");
            return false;
        }
        // [Required]: DevicePool
        if (devicePoolName == null || devicePoolName.isEmpty()) {
            writeToLog(log, "DevicePool must be set.");
            return false;
        }
        // [Required]: App Artifact
        if (!ifWebApp && (appArtifact == null || appArtifact.isEmpty())) {
            writeToLog(log, "Application Artifact must be set.");
            return false;
        }
        // [Required]: At least one test.
        if (testToRun == null || stringToTestType(testToRun) == null) {
            writeToLog(log, "A test type must be set.");
            return false;
        }
        return true;
    }
/**
     * Validate top level configuration values.
     *
     * @param log Destination Task Log
     * @return Whether or not the configuration is valid.
     */
Validate top level configuration values.
@param log Destination Task Log
@return Whether or not the configuration is valid.
Validate top level configuration values . @param log Destination Task Log @return Whether or not the configuration is valid .
private boolean validateConfiguration(@Nonnull PrintStream log) {
        String roleArn = getRoleArn();
        String akid = Secret.toString(getAkid());
        String skid = Secret.toString(getSkid());
        if ((roleArn == null || roleArn.isEmpty()) && (akid == null || akid.isEmpty() || skid == null || skid.isEmpty())) {
            writeToLog(log, "Either IAM Role ARN or AKID/SKID must be set.");
            return false;
        }
        if (projectName == null || projectName.isEmpty()) {
            writeToLog(log, "Project must be set.");
            return false;
        }
        if (devicePoolName == null || devicePoolName.isEmpty()) {
            writeToLog(log, "DevicePool must be set.");
            return false;
        }
        if (!ifWebApp && (appArtifact == null || appArtifact.isEmpty())) {
            writeToLog(log, "Application Artifact must be set.");
            return false;
        }
        if (testToRun == null || stringToTestType(testToRun) == null) {
            writeToLog(log, "A test type must be set.");
            return false;
        }
        return true;
    }
private boolean validateConfiguration ( @ Nonnull PrintStream log ) { String roleArn = getRoleArn ( ) ; String akid = Secret . toString ( getAkid ( ) ) ; String skid = Secret . toString ( getSkid ( ) ) ; if ( ( roleArn == null || roleArn . isEmpty ( ) ) && ( akid == null || akid . isEmpty ( ) || skid == null || skid . isEmpty ( ) ) ) { writeToLog ( log , "Either IAM Role ARN or AKID/SKID must be set." ) ; return false ; } if ( projectName == null || projectName . isEmpty ( ) ) { writeToLog ( log , "Project must be set." ) ; return false ; } if ( devicePoolName == null || devicePoolName . isEmpty ( ) ) { writeToLog ( log , "DevicePool must be set." ) ; return false ; } if ( ! ifWebApp && ( appArtifact == null || appArtifact . isEmpty ( ) ) ) { writeToLog ( log , "Application Artifact must be set." ) ; return false ; } if ( testToRun == null || stringToTestType ( testToRun ) == null ) { writeToLog ( log , "A test type must be set." ) ; return false ; } return true ; }
Validate top level configuration values.
Validate top level configuration values .
// [Required]: Auth Credentials // [Required]: Project // [Required]: DevicePool // [Required]: App Artifact // [Required]: At least one test.