blob: 22259c630b72a7b460f7fa9fcf2b2dcebf8bb36d [file] [log] [blame]
Ruslan Gustomiasova43be9e2019-06-27 14:45:33 +02001package com.mirantis.mk
2/**
3 * Tox functions
4 */
5
6/**
7 * Run tox
Ruslan Gustomiasov2d84ca12019-06-27 14:45:33 +02008 * @param args tox run arguments
Ruslan Gustomiasova43be9e2019-06-27 14:45:33 +02009 *
Ruslan Gustomiasova43be9e2019-06-27 14:45:33 +020010 */
11
Ruslan Gustomiasov2d84ca12019-06-27 14:45:33 +020012def 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 Gustomiasova43be9e2019-06-27 14:45:33 +020017 sh(script: "tox ${args}", returnStdout: returnStdout)
18 }
19}