Hi,
Most probable reason: gcc will only emit color codes if run in an
interactive terminal( with a console attached). Check gcc docs how to
enable this for non-interactive runs, or check bash manuals how to force
interactive mode.
Björn
Am Donnerstag, 27. Oktober 2016 09:02:22 UTC+2 schrieb Sverre Moe:
>
> There is not much information on that plugin page how to do that. In
> Jenkins configuration for ANSI Color there are xterm, vga, css
> and gnome-terminal. Those are only color codes, and there is nothing how to
> "translate" the ansi escape codes.
>
> I found a Pipeline example on the plugin github page that worked
> partially. By setting the parameter colorMapName I was able to get coloring
> on tests that where running with RUN OK, PASSED. However the compiling
> (Building CXX Object) did not get colored.
> wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) {
>
> }
> The snippet generator does not work for this build wrapper.
>
>
>
> onsdag 26. oktober 2016 15.02.11 UTC+2 skrev Baptiste Mathus følgende:
>>
>> Hi, you have to understand a bit more how things work to enable that.
>>
>> On the CLI, this is generally done through ansi escape codes. So, to
>> enable that on Jenkins, you "just" have to enable "something" that would
>> translate those to something a web browser can understand:
>> https://wiki.jenkins-ci.org/display/JENKINS/AnsiColor+Plugin
>>
>> 2016-10-24 10:48 GMT+02:00 Sverre Moe <[email protected]>:
>>
>>> When running make manually on the command line I get highlighting. It
>>> would help the developers greatly if they could see the same in Jenkins
>>> Console Output.
>>>
>>>
>>> <https://lh3.googleusercontent.com/-7vYKz7LoxVA/WA3KreTpP3I/AAAAAAAAExc/s2U6et8Nb_kS6XcSZlBmcA6lU40jTufAQCLcB/s1600/makeconsole1.png>
>>>
>>>
>>> onsdag 19. oktober 2016 09.55.27 UTC+2 skrev Sverre Moe følgende:
>>>>
>>>> The Pipeline Stage View, show Logs
>>>> It should show red color for those steps that has error, I have seen it
>>>> on some occasions. However it does not highlight those steps that has gcc
>>>> compile errors.
>>>>
>>>> Our developers opinion is that the Console output is difficult to
>>>> parse. since all the paralell runs are all jumbled all together. I
>>>> have tried the AnsiColorBuildWrapper, but that does not work. Shouldn't
>>>> the
>>>> AnsiColorBuildWrapper color the output, but what are the criteria for
>>>> the coloring?
>>>>
>>>> The Snippet Generator gives me the following not working example
>>>> wrap(<object of type hudson.plugins.ansicolor.AnsiColorBuildWrapper>) {
>>>> make
>>>> }
>>>>
>>>>
>>>> BUG! exception in phase 'semantic analysis' in source unit
>>>> 'WorkflowScript' The lookup for com.company.ci.Build caused a failed
>>>> compilaton. There should not have been any compilation from this call.
>>>> at org.codehaus.groovy.control.ClassNodeResolver.
>>>> tryAsLoaderClassOrScript(ClassNodeResolver.java:190)
>>>> at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(
>>>> ClassNodeResolver.java:170)
>>>> at org.codehaus.groovy.control.ClassNodeResolver.resolveName(
>>>> ClassNodeResolver.java:126)
>>>> at org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(
>>>> ResolveVisitor.java:676)
>>>> at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.
>>>> java:308)
>>>> at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.
>>>> java:276)
>>>> at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(
>>>> ResolveVisitor.java:260)
>>>> at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(
>>>> ResolveVisitor.java:272)
>>>> at org.codehaus.groovy.control.ResolveVisitor.
>>>> transformConstructorCallExpression(ResolveVisitor.java:1047)
>>>> at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor
>>>> .java:706)
>>>> at org.codehaus.groovy.control.ResolveVisitor.
>>>> transformDeclarationExpression(ResolveVisitor.java:1088)
>>>> at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor
>>>> .java:698)
>>>> at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.
>>>> visitExpressionStatement(ClassCodeExpressionTransformer.java:142)
>>>> at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(
>>>> ExpressionStatement.java:42)
>>>> at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(
>>>> CodeVisitorSupport.java:37)
>>>> at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement
>>>> (ClassCodeVisitorSupport.java:166)
>>>> at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(
>>>> ResolveVisitor.java:1318)
>>>> at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.
>>>> java:71)
>>>> at org.codehaus.groovy.ast.ClassCodeVisitorSupport.
>>>> visitClassCodeContainer(ClassCodeVisitorSupport.java:104)
>>>> at org.codehaus.groovy.ast.ClassCodeVisitorSupport.
>>>> visitConstructorOrMethod(ClassCodeVisitorSupport.java:115)
>>>> at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.
>>>> visitConstructorOrMethod(ClassCodeExpressionTransformer.java:53)
>>>> at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod
>>>> (ResolveVisitor.java:201)
>>>> at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(
>>>> ClassCodeVisitorSupport.java:126)
>>>> at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1078
>>>> )
>>>> at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(
>>>> ClassCodeVisitorSupport.java:53)
>>>> at org.codehaus.groovy.control.ResolveVisitor.visitClass(
>>>> ResolveVisitor.java:1261)
>>>> at org.codehaus.groovy.control.ResolveVisitor.startResolving(
>>>> ResolveVisitor.java:176)
>>>> at org.codehaus.groovy.control.CompilationUnit$11.call(CompilationUnit
>>>> .java:651)
>>>> at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(
>>>> CompilationUnit.java:931)
>>>> at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(
>>>> CompilationUnit.java:593)
>>>> at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit
>>>> .java:542)
>>>> at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:
>>>> 298)
>>>> at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268
>>>> )
>>>> at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688)
>>>> at groovy.lang.GroovyShell.parse(GroovyShell.java:700)
>>>> at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(
>>>> CpsGroovyShell.java:67)
>>>> at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(
>>>> CpsFlowExecution.java:411)
>>>> at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(
>>>> CpsFlowExecution.java:374)
>>>> at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java
>>>> :220)
>>>> at hudson.model.ResourceController.execute(ResourceController.java:98)
>>>> at hudson.model.Executor.run(Executor.java:404)
>>>> Caused by: org.codehaus.groovy.control.
>>>> MultipleCompilationErrorsException: startup failed:
>>>> /var/lib/jenkins/workflow-libs/src/com/company/ci/Build.groovy: 461:
>>>> unexpected token: < @ line 461, column 10.
>>>> wrap(<object of type hudson.plugins.ansicolor.
>>>> AnsiColorBuildWrapper>) {
>>>> ^
>>>>
>>>>
>>>> Another syntax I could find on some examples out there does not
>>>> Highlight errors:
>>>> wrap([$class: 'AnsiColorBuildWrapper']) {
>>>> make
>>>> }
>>>>
>>>> --
>>> 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 [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/235757a5-ec1d-4293-af66-a64018a277db%40googlegroups.com
>>>
>>> <https://groups.google.com/d/msgid/jenkinsci-users/235757a5-ec1d-4293-af66-a64018a277db%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/005418d9-3d6a-4f48-a9e1-21a0591398ba%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.