azvyagintsev | 4eb89ea | 2018-08-07 17:48:19 +0200 | [diff] [blame] | 1 | package com.mirantis.mk |
| 2 | def common = new com.mirantis.mk.Common() |
| 3 | def 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 | |
| 10 | timeout(time: 1, unit: 'HOURS') { |
| 11 | node() { |
| 12 | try { |
| 13 | extra_vars = readYaml text: EXTRA_VARIABLES_YAML |
azvyagintsev | b261fa4 | 2018-08-08 10:54:18 +0200 | [diff] [blame] | 14 | currentBuild.description = extra_vars.modelFile |
azvyagintsev | 4eb89ea | 2018-08-07 17:48:19 +0200 | [diff] [blame] | 15 | saltModelTesting.testCCModel(extra_vars) |
azvyagintsev | 4eb89ea | 2018-08-07 17:48:19 +0200 | [diff] [blame] | 16 | } 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 | } |