commit 920e1464a95ee53062a6ac6b29dfdab07d04bcc1 Author: Nikita Gryzlov Date: Tue Mar 17 15:38:26 2020 +0300 Наметки по jenkins-lib diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6d0bb27 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.groovy eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f7f35ad --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea/ +*.iml diff --git a/vars/cmd.groovy b/vars/cmd.groovy new file mode 100644 index 0000000..5b1855c --- /dev/null +++ b/vars/cmd.groovy @@ -0,0 +1,7 @@ +def call(String command, boolean returnStatus = false) { + if (isUnix()) { + sh script: "${command}", returnStatus: returnStatus, encoding: "UTF-8" + } else { + bat script: "chcp 65001 > nul \n${command}", returnStatus: returnStatus, encoding: "UTF-8" + } +}