blob: e7ce974b9aca406dcece4fe8378a0de59a48ec1f [file] [log] [blame]
Oleksii Zhurbad9034952018-09-03 21:06:06 -05001/**
2 *
3 * Temporary pipeline for running cvp-stacklight job
4 *
5 * Expected parameters:
6 * SALT_MASTER_URL URL of Salt master
7 * SALT_MASTER_CREDENTIALS Credentials to the Salt API
8 *
9 * TESTS_SET Leave empty for full run or choose a file (test)
10 * TESTS_REPO Repo to clone
11 * TESTS_SETTINGS Additional environment varibales to apply
12 * PROXY Proxy to use for cloning repo or for pip
13 *
14 */
15
16validate = new com.mirantis.mcp.Validate()
17
18def artifacts_dir = 'validation_artifacts/'
19
20node() {
21 stage('Initialization') {
22 validate.prepareVenv(TESTS_REPO, PROXY)
23 }
24
25 stage('Run Tests') {
26 sh "mkdir -p ${artifacts_dir}"
27 validate.runTests(SALT_MASTER_URL, SALT_MASTER_CREDENTIALS, TESTS_SET, artifacts_dir, TESTS_SETTINGS)
28 }
29 stage ('Publish results') {
30 archiveArtifacts artifacts: "${artifacts_dir}/*"
31 junit "${artifacts_dir}/*.xml"
32 }
33}