blob: 12428ba12a9d9313e2d0c35bba75f2567a4d7b35 [file] [log] [blame]
azvyagintsev4eb89ea2018-08-07 17:48:19 +02001package com.mirantis.mk
2def common = new com.mirantis.mk.Common()
3def saltModelTesting = new com.mirantis.mk.SaltModelTesting()
4
5/**
6 * Test CC model wrapper
7 * EXTRA_VARIABLES_YAML: yaml based string, to be directly passed into testCCModel
8 */
9
10timeout(time: 1, unit: 'HOURS') {
11node() {
12 try {
13 extra_vars = readYaml text: EXTRA_VARIABLES_YAML
azvyagintsevb261fa42018-08-08 10:54:18 +020014 currentBuild.description = extra_vars.modelFile
azvyagintsev4eb89ea2018-08-07 17:48:19 +020015 saltModelTesting.testCCModel(extra_vars)
azvyagintsev4eb89ea2018-08-07 17:48:19 +020016 } catch (Throwable e) {
17 // If there was an error or exception thrown, the build failed
18 currentBuild.result = "FAILURE"
19 currentBuild.description = currentBuild.description ? e.message + " " + currentBuild.description : e.message
20 throw e
21 }
22 }
23 }