How do I get the output of a shell command executed using into a variable from Jenkinsfile (groovy)?

I have something like this on a Jenkinsfile (Groovy) and I want to record the stdout and the exit code in a variable in order to use the information later. sh “ls -l” How can I do this, especially as it seems that you cannot really run any kind of groovy code inside the Jenkinsfile? … Read more

Scala vs. Groovy vs. Clojure [closed]

Closed. This question needs to be more focused. It is not currently accepting answers. Closed 8 years ago. Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. Can someone please explain the major differences between Scala, Groovy and … Read more

Gradle does not find tools.jar

Found it. System property ‘java.home’ is not JAVA_HOME environment variable. JAVA_HOME points to the JDK, while java.home points to the JRE. See that page for more info. Soo… My problem was that my startpoint was the jre folder (C:\jdk1.6.0_26\jre) and not the jdk folder (C:\jdk1.6.0_26) as I thought(tools.jar is on the C:\jdk1.6.0_26\lib folder ). The compile line in dependencies.gradle … Read more

How to fix “unsupported class file major version 60” in IntelliJ?

I fixed this problem by changing the Gradle JVM settings in IntelliJ settings: In the Settings/Preferences dialog, go to Build, Execution, Deployment | Build Tools | Gradle. Under the Gradle section, change the Gradle JVM option. Select a Gradle JVM which works for you. See https://www.jetbrains.com/help/idea/gradle-jvm-selection.html#jvm_settings