Jenkins is an open source continuous integration server. Here’s how to set it up on Linux for managinf as3/flex applications/modules/libraries:

Installation

  1. Install Jenkins:
    sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
    sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
    yum install jenkins 
    sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
    sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
    yum install jenkins 
  2. Install Flash Player for running Unit tests:
    in your sdk folder find: /runtimes/player/10/lnx/flashplayer.tar.gz
    Extract the contents and add flashplayer to the path.
    Try sudo -u jenkins flashplayer on the commandline to verify that it’s working correctly.
    You might need to chmod/chown it.
  3. Install XVNC Plugin In Jenkins:
    Go to Jenkins>Manage Jenkins>Mange Plugins>Available
    Find XVNC, select it and click install.
  4. Install a vnc server on the box:
    yum -y install tigervnc-server
  5. Set up the vnc password for Jenkins:
    sudo vncpasswd /var/lib/jenkins/.vnc/passwd
    Password:
    Verify:

Start/Stop Jenkins

  • sudo service jenkins start
  • sudo service jenkins stop
  • sudo service jenkins restart

Default Jenkins Config

If you installed jenkins using the steps above, you should have the following default configuration:

  • The default Jenkins installation folder is:
    /var/lib/jenkins
  • If you reboot your box, Jenkins will be automatically started as a daemon. To change/remove this, edit: /etc/init.d/jenkins
  • A jenkins user is created.
  • The default jenkins url is: http://localhost:8080

Troubleshooting

  • Error:
    Caused by: java.io.IOException: Cannot run program "xvfb-run": java.io.IOException: error=2, No such file or directory
    Caused by: java.io.IOException: Cannot run program "xvfb-run": java.io.IOException: error=2, No such file or directory

    Solution:
    yum install Xvfb
    or use xvnc…

  • Error:
    Failed to launch Flash Player. Probably java was not able to find flashplayer.
    Failed to launch Flash Player. Probably java was not able to find flashplayer.


    Solution:

    1. in your sdk folder find: /runtimes/player/10/lnx/flashplayer.tar.gz
    Extract the contents and add flashplayer to the path.

  • Error:
    [WARNING] [LAUNCHER] Using xvfb-run to launch headless tests [ERROR] Failed to delete Xvfb locking files, does the current user has access? java.io.IOException: File /tmp/.X11-unix/X0 unable to be deleted.
    Solution:

    change the ownership to the jenkins user:
    sudo chown -R jenkins:jenkins /tmp/.X11-unix
  • Error:
    [ERROR] Unexpected return code 127/var/lib/jenkins/workspace/...
    [ERROR] Unexpected return code 127/var/lib/jenkins/workspace/...

    Solution:
    Xvfb is not configured correctly.
    I found it easier to install XVNC Plugin In Jenkins:
    Go to Jenkins>Manage Jenkins>Mange Plugins>Available
    Find XVNC and install it.
    2. Install a vnc server:
    yum -y install tigervnc-server

  • Error:
    $ vncserver :15 You will require a password to access your desktops. getpassword error: Invalid argument Password:ERROR: Failed to parse POMs java.io.IOException: Failed to run 'vncserver :15' (exit code 1), blacklisting display #15; consider checking the "Clean up before start" option
    $ vncserver :15 You will require a password to access your desktops. getpassword error: Invalid argument Password:ERROR: Failed to parse POMs java.io.IOException: Failed to run 'vncserver :15' (exit code 1), blacklisting display #15; consider checking the "Clean up before start" option

    Solution:
    use vncpasswd to create a default password:
    vncpasswd /var/lib/jenkins/.vnc/passwd

Tagged with:
 

One Response to How to install Jenkins on Scientific Linux for Flex Development

Leave a Reply

Your email address will not be published. Required fields are marked *

*


× 7 = sixty three

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" extra="">