How to avoid line wrap in jenkins output console? - jenkins

How can I avoid Jenkins from wrapping long lines in the console output?
I want the lines to keep the original formatting, with spaces and line break, just avoid wrapping when looking at the console output in Chrome.
I use Chrome and Jenkins 2.107.2.

Related

Dart/Flutter doesn't print multiple newlines in VS Code Debug Console

I'm writing my first Flutter/Dart app and am running it as a Chrome project from within VS Code. I'm using print() statements for simple debugging, but when printing multi-line strings multiple newlines get compressed into a single one. Is this normal?
print("this is\n\na test");
Will print...
this is
a test
I tried debugPrint() and it does the same thing. log() will print correctly, but it truncates the output.

Jenkins: Changing Console Output

I am working in jenkins.
I'd like to put some specified text in the Console Output in a specified colour.
For example:
My output is:
Commit message....
Creating dir: /var/lib/1
Creating dir: /var/lib/2
Job done
Build Successful
I'd like to out "Job Done" in red.
How can I do this?
I've looked at some plugins (The parsed log, AnsiColor Plugin) but I think I cannot do this using it.
The Log Parser plugin will do what you want.
It allows you to specify your own rules with a parsing rules file and regular expression like syntax.

Prevent LaTex code from showing in report

In my markdown file I use the latex command
$$\pagebreak$$
to force a page break.
The page break works fine but the latex code also shows up in my report.
I want to let the code work but hide it in the report.
How can I do that?
The $$ tags are used to enter and exit math mode for writing equations. Since you are executing a typesetting command, you need to use \pagebreak without the $$ tags.
As noted in your comment, blank lines around the tag are necessary.

What is the syntax to comment a line in a tibco ems script

In a script which looks like below
create queue one
create queue two
create topic three
How can I comment a line?
I could find noting in either the tool itself or documentation.
The closest thing to comments you could do is:
echo off some comments here
tibemsadmin does not fail, and don't react to extra parameters. The "echo" command is harmless... so it is a great candidate.
Of course, you might prefer "echo on".
Not a great solution, but the only one I find.
Are you referring to the script that will be executed by tibemsadmin binary? You can try to prepend "#" in the front of the line which you don't need.
There is no way to run a command against the EMS server that is a comment. The easiest is to let it crash.
I've use
// Comment line "Creating queue for XYZ process"
However it still generates an error which wasn't a problem until we have just implemented continuous deployments for EMS and Tibco BW Ears, and it stopped when there was an error coming back from the command.
You could write a quick pre-processor that reads each line of the EMS script file and spits out a separate file that you can just run without errors. I'd do something like
(Your language of choice)
for each line in the file
if line starts with // then
do nothing
else
write it to the other file
end loop

Jenkins text parameter rebuild

I'm using the text parameter to get multi line parameters, and write them to file.
If I use the rebuild, the text parameter is loaded as a single line string (where newline is removed).
Does anyone have an idea on how to fix this? I guess the rebuild plugin is the problem...
The multi-line text parameter seems to be rather buggy. One workaround you may consider is to substitute newlines with some custom escape system and then convert the escape sequences back to newlines inside your build.
A more advanced solution would be to modify the plugin itself to convert the escape sequences into newlines and use that modified plugin in your Jenkins. I've done that sort of thing for Claim Plugin to display failed matrix jobs which it did not do on its own. If you decide to take this route I can walk you through the main steps.
I have just enhanced the plugin to add TextParameterValue.jelly
That works fine, since text and textarea are not that different except new lines just use StringParameterValue.jelly as template and use <f:textarea name="value" value="${it.value}" /> instead of <f:textbox name="value" value="${it.value}" />

Resources