DEV Community

gcalvoCR
gcalvoCR

Posted on

Alien symbols in Jenkins!

If you ever come accross some these "alien symbols" in Jenkins, specially on Windows:

Alt Text

And you want to make it up, the problem is the default encoding system and the solution is pretty straight forward:

  • Navigate to the directory where jenkins is installed. Usually C:\Program Files (x86)\Jenkins.

  • Once in the folder, open the jenkins.xml with Notepad, VSCode or any text editor.

  • Add --> -Dfile.encoding=UTF8 to the arguments.

The arguments should look something like this:

<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -Dfile.encoding=UTF8 -jar "%BASE%\jenkins.war" --httpPort=8080 --webroot="%BASE%\war"</arguments>
  • restart you Jenkins service and voilá!

After that, if you run the job/pipeline, you should see the console output showing the logs properly!

Alt Text

That's it, keep having fun with your CI/CD pipelines!

Discussion (0)