blob: 53c044a5ed9de644f8215317d8e182714829bf04 [file] [log] [blame]
/**
*
* Launch sanity validation of the cloud
*
* Expected parameters:
* SALT_MASTER_URL URL of Salt master
* SALT_MASTER_CREDENTIALS Credentials to the Salt API
*
* SANITY_TESTS_SET Leave empty for full run or choose a file (test), e.g. test_mtu.py
* SANITY_TESTS_REPO CVP-sanity-checks repo to clone
* PROXY Proxy to use for cloning repo or for pip
*
*/
validate = new com.mirantis.mcp.Validate()
def artifacts_dir = 'validation_artifacts/'
node() {
try{
stage('Initialization') {
validate.prepareVenv(SANITY_TESTS_REPO, PROXY)
}
stage('Run Infra tests') {
sh "mkdir -p ${artifacts_dir}"
validate.runSanityTests(SALT_MASTER_URL, SALT_MASTER_CREDENTIALS, SANITY_TESTS_SET, artifacts_dir)
}
stage ('Publish results') {
archiveArtifacts artifacts: "${artifacts_dir}/*"
junit "${artifacts_dir}/*.xml"
}
} catch (Throwable e) {
// If there was an error or exception thrown, the build failed
currentBuild.result = "FAILURE"
throw e
}
}