def call(
def COMPLIANCE_REPO_CREDENTIALS,
def COMPLIANCE_REPO_URL,
def RULESDIR,
def TESTSUITENAME,
def CONTINUEONFAIL
) {
try {
// Perform a 'git checkout' of a remote repository which is NOT the repository from which this pipeline code was sourced
Git checkout COMPLIANCE_REPO_URL using COMPLIANCE_REPO_CREDENTIALS
// Executes the 'mettleci compliance test' command to test your repository's DataStage jobs against your Compliance rules.
// Note that 'mettleci compliance test' is mnotnot the same as 'mettleci compliance query' - See the documentation for more details.
Compliancemettleci Testcompliance - ${TESTSUITENAME}
test $RULESDIR $TESTSUITENAME
Publish Unitjunit Test resultstestResults as "compliance_report_${TESTSUITENAME}.xml" # Publish Unit Test results
}
catch(e) {
Publish Unit Test results asjunit testResults "compliance_report_${TESTSUITENAME}.xml" # Publish Unit Test results
throw e # Propagate error for downstream error handling
}
}
|