Ruslan Gustomiasov | a43be9e | 2019-06-27 14:45:33 +0200 | [diff] [blame] | 1 | package com.mirantis.mk |
| 2 | /** |
| 3 | * Tox functions |
| 4 | */ |
| 5 | |
| 6 | /** |
| 7 | * Run tox |
Ruslan Gustomiasov | 2d84ca1 | 2019-06-27 14:45:33 +0200 | [diff] [blame] | 8 | * @param args tox run arguments |
Ruslan Gustomiasov | a43be9e | 2019-06-27 14:45:33 +0200 | [diff] [blame] | 9 | * |
Ruslan Gustomiasov | a43be9e | 2019-06-27 14:45:33 +0200 | [diff] [blame] | 10 | */ |
| 11 | |
Ruslan Gustomiasov | 2d84ca1 | 2019-06-27 14:45:33 +0200 | [diff] [blame] | 12 | def runTox(String args){ |
| 13 | image = params['image'] ?: "docker-prod-local.docker.mirantis.net/mirantis/external/tox" |
| 14 | args = params['args'] ?: "" |
| 15 | returnStdout = params['returnStdout'].toBoolean() ?: true |
| 16 | return docker.image(image).inside { |
Ruslan Gustomiasov | a43be9e | 2019-06-27 14:45:33 +0200 | [diff] [blame] | 17 | sh(script: "tox ${args}", returnStdout: returnStdout) |
| 18 | } |
| 19 | } |