A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Writing a Jenkins plugin for dummies


This guide is written for Ubuntu

Install Jenkins
  • Follow these steps
  • It will install this file amongst others: /usr/share/jenkins/jenkins.war
  • You may need to start Jenkins on a different port than its default 8080
  • The config is in this file: /etc/default/jenkins
    • There are a list of command-line options at the end of this file
  • You run it with this command:
    • java -jar /usr/share/jenkins/jenkins.war --httpPort=9090
    • (however this doesn't use the config you just edited)
Write a plugin



Allow PRE text to wrap on Confluence wiki


Add this to the wiki code:


{html}
<style type="text/css">
/* Allow PRE elements to wrap --- better than manually adding ad-hoc
 * linebreaks because
 * (a) It's automatic
 * (b) It adapts to the window width
 * (c) People can still copy-and-paste from the browser window and get the
 * original long lines
 */
pre {
 white-space: pre-wrap; /* css-3 */
 white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
 white-space: -pre-wrap; /* Opera 4-6 */
 white-space: -o-pre-wrap; /* Opera 7 */
 word-wrap: break-word; /* Internet Explorer 5.5+ */
}
</style>
{html}

Thanks duckbill