We are, extensively.

I may be interpreting the issue wrong, but it seems like a more "native" 
pipeline API is not necessarily the blocker here.

Does this help at all?:

sh "gradle build --info --console=plain"

Those switches increase logging verbosity and eliminate the control 
characters that Jenkins console renders poorly.

More doc on Gradle's logging and other command line options is here 
<https://docs.gradle.org/current/userguide/command_line_interface.html>.

On Thursday, April 12, 2018 at 11:02:43 PM UTC-7, Sverre Moe wrote:
>
> We are currently using Maven for building our applications. 
>
> Our Jenkins maven pipeline are using the withMaven step from Pipeline 
> Maven Integration.
>
> I have written gradle build scripts for our projects and begun to write 
> the Pipeline build script to build gradle.
>
> We could really use an Pipeline Gradle Integration plugin and an 
> withGradle step.
>
> In the absence of such a plugin I am left with
> tool name: 'gradle-4.6', type: 'gradle'
> sh "gradle build"
>
> I think I have to put some verbosity to gradle. The Jenkins console output 
> did not provide any insight while gradle was running the JUnit tests.
>
> :processResources
> :classes
> :jar
> :javadoc
> :javadocJar
> :sourcesJar
> :assemble
> :startMockServer
>
> :processTestResources
> :testClasses
> :test
>
> :stopMockServer
> :check
> :build
>
>
> After :test there was no output for about 2 minutes. Not until task test was 
> finished.
>
> Not knowing if the build has halted, a test taking to long, or some other 
> problem.
>
>
> Would be great to have something like the dynamic output from running gradle
>
> <=========----> 75% EXECUTING [15s]
>
> > :test > 100 tests completed
>
> > :test > Executing test com.company.api.ConnectionTest
>
>
>
> Running Gradle with --console=rich gives me this output, but it is a mess.
>
> :test [m [0K [7D [1B [2A [1m< [0;32;1m========= [0;39;1m----> 75% 
> EXECUTING [9s] [m [34D [1B [1m> :test [m [7D [1B [2A [1m< [0;32;1m========= 
> [0;39;1m----> 75% EXECUTING [9s] [m [34D [1B [1m> :test > 0 tests completed 
> [m [27D [1B [2A [1m< [0;32;1m========= [0;39;1m----> 75% EXECUTING [9s] [m 
> [34D [1B [1m> :test > 0 tests completed [m [27D [1B [2A [1m< 
> [0;32;1m========= [0;39;1m----> 75% EXECUTING [9s] [m [34D [1B [1m> :test > 
> 0 tests completed [m [27D [1B [2A [1m< [0;32;1m========= [0;39;1m----> 75% 
> EXECUTING [9s] [m [34D [1B [1m> :test > 0 tests completed [m [27D [1B [2A 
> [1m< [0;32;1m========= [0;39;1m----> 75% EXECUTING [9s] [m [34D [1B [1m> 
> :test > 0 tests 
> ...
> ...
> > 330 tests completed [m [29D [1B [1m> :test > Executing test 
> com.company.server.api.commands.Command1Test [m [0K [68D [1B [3A [1m< 
> [0;32;1m========= [0;39;1m----> 75% EXECUTING [1m 29s] [m [38D [1B [1m> 
> :test > 412 tests completed [m [29D [1B [1m> :test > Executing test 
> com.company.server.api.commands.Command2Test [m [76D [1B [3A [1m< 
> [0;32;1m========= [0;39;1m----> 75% EXECUTING [1m 29s] [m [38D [1B [1m> 
> :test > 507 tests completed [m [29D [1B [1m> :test > Executing test 
> com.company.server.api.commands.Command3Test [m [0K [68D [1B [3A [1m< 
> [0;32;1m========= [0;39;1m----> 75% EXECUTING [1m 29s] [m [38D [1B [1m> 
> :test > 661 tests completed [m [29D [1B> IDLE [0K [6D [1B [3A [1m< 
> [0;32;1m========= [0;39;1m----> 75% EXECUTING [1m 29s] [m [38D [1B [1m> 
> :test > 661 tests completed [m [29D [2B [3A [1m< [0;32;1m========= 
> [0;39;1m----> 75% EXECUTING [1m 29s] [m [38D [1B [1m> :test > 661 tests 
> completed [m [29D [2B [3A [1m< [0;32;1m========= [0;39;1m----> 75% 
> EXECUTING [1m 30s] [m [38D [1B [1m> :test > 661 tests completed [m [29D [2B 
> [3A [1m< [0;32;1m========= [0;39;1m----> 75% EXECUTING [1m 30s] [m [38D [1B 
> [1m> :test [m [0K [7D [2B [3A [1m< [0;32;1m========= [0;39;1m----> 75% 
> EXECUTING [1m 30s] [m [38D [1B [1m> :test [m [7D [2B [3A [0K
> [0K
> [32;1mBUILD SUCCESSFUL [0;39m in 1m 32s
> 11 actionable tasks: 11 executed
>
>
>
> Are anyone using gradle in their Jenkins pipeline?
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/78434a79-2816-499e-8b5c-f4215e55a7be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to