-
New Feature
-
Resolution: Fixed
-
Minor
-
None
it is often usefull in reusable code to know if you are running on a windows slave or not.
For example you may want to invoke maven - but on windows you need bat 'mvn ...' and Unix like systems sh ' mvn...'
The current workaround involves a function like
boolean isWindows() { return env.OS == 'Windows_NT' }
but this is not ideal.
so please implement something that can be more reliable to determine a windows node. (get the path separator, directory seporator - or just isCurrentNodeWindows())
- is related to
-
JENKINS-26169 Workflow support for XShell plugin
-
- Open
-
- links to
[JENKINS-31691] add a step to determine if the current node is windows or not.
Link | New: This issue is related to JENKINS-26169 [ JENKINS-26169 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Remote Link | New: This issue links to "PR 256 (Web Link)" [ 13543 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Progress [ 3 ] | New: Resolved [ 5 ] |
Workflow | Original: JNJira [ 167129 ] | New: JNJira + In-Review [ 198122 ] |
Code changed in jenkins
User: Jesse Glick
Path:
CHANGES.md
aggregator/src/test/java/org/jenkinsci/plugins/workflow/steps/IsUnixStepTest.java
basic-steps/src/main/java/org/jenkinsci/plugins/workflow/steps/IsUnixStep.java
basic-steps/src/main/resources/org/jenkinsci/plugins/workflow/steps/IsUnixStep/config.jelly
basic-steps/src/main/resources/org/jenkinsci/plugins/workflow/steps/IsUnixStep/help.html
http://jenkins-ci.org/commit/workflow-plugin/bbd1e838533601139b6daf2f255d456b5090b329
Log:
[FIXED JENKINS-31691] Added isUnix step.