Tagged: jenkinsci Toggle Comment Threads | Горячие клавиши

  • manandbytes 10:03 on April 7, 2011 Постоянная ссылка |
    Tags: , jenkinsci, , shell   

    How to emulate Jenkin’s ‘matrix build’ in command line ad-hoc 

    Why?

    Jenkins presents a concept of the multi-configuration project (AKA matrix project). This feature is useful when you would like to test your application in several environments (with different versions of JDK) or package it for different platforms.

    But what if you can’t use Jenkins for some reason? Scriptable shell comes to the rescue and here is a real-life example: I have to investigate an issue building a project in different environments (actually, for a combination of several versions of Maven2 and a number of different JDKs).

    How?

    So, I need two «axes» for my task:

    • version of Maven2. There are only 4 versions to run my tests against and I just enumerate all installations;
    • version of JDK. Thanks to a great package management system available in Debian, I still have Sun’s Java5 JDK installed. Not as a default one, however 😉 And Sun’s JDK 6 alongside OpenJDK 6… And some other are installed and removed occasionally. So I will just use find utility instead of enumerating all my JDK installations.

    Solution

    for m in \
        ~/bin/apache-maven-2.1.0/bin/ /usr/share/maven2/bin/ ~/bin/apache-maven-3.0.2/bin/ ~/bin/apache-maven-3.0-SNAPSHOT/bin/ ; do \
        for j in `find /usr/lib/jvm/ -maxdepth 2 -type d -name bin` ; do \
            echo "-----" ; \
            export JAVA_HOME=$j/../ ; \
            $m/mvn -version ; \
            $m/mvn clean compile --quiet ; \
        done \
    done
    

    Once executed, this runs given project using a) every version of Maven2 and b) for every Maven2 version using every JDK available. Output looks like:

    -----
    Apache Maven 2.1.0 (r755702; 2009-03-18 21:10:27+0200)
    Java version: 1.6.0_22
    Java home: /usr/lib/jvm/java-6-openjdk/jre
    Default locale: uk_UA, platform encoding: UTF-8
    OS name: "linux" version: "2.6.38-2-686-bigmem" arch: "i386" Family: "unix"
    [ERROR] BUILD FAILURE
    -----
    Apache Maven 2.1.0 (r755702; 2009-03-18 21:10:27+0200)
    Java version: 1.5.0_22
    Java home: /usr/lib/jvm/java-1.5.0-sun-1.5.0.22/jre
    Default locale: uk_UA, platform encoding: UTF-8
    OS name: "linux" version: "2.6.38-2-686-bigmem" arch: "i386" Family: "unix"
    [ERROR] BUILD FAILURE
    -----
    Apache Maven 2.1.0 (r755702; 2009-03-18 21:10:27+0200)
    Java version: 1.6.0_24
    Java home: /usr/lib/jvm/java-6-sun-1.6.0.24/jre
    Default locale: uk_UA, platform encoding: UTF-8
    OS name: "linux" version: "2.6.38-2-686-bigmem" arch: "i386" Family: "unix"
    [ERROR] BUILD FAILURE
    

    Mission accomplished.

     
  • manandbytes 13:58 on January 30, 2011 Постоянная ссылка |
    Tags: , jenkinsci   

    Jenkins is alive! 


    There is no more Hudson logo in Jenkins since this Kohsuke’s commit. However, Hudson’s logo in SVG format is still there.

     
  • manandbytes 00:00 on January 30, 2011 Постоянная ссылка |
    Tags: , , hudson, jenkinsci   

    Hudson is dead. Long live Jenkins! 

    Who’s driving this thing? Community, I hope. Andrew Bayer just posted the vote results on renaming Hudson to Jenkins (more details). What does this mean for me personally?

    So what does this mean now? Well, it means Jenkins lives.

    Well, no more «hudson» in my vocabulary, not a big deal 😉

    we will be renaming the existing Google Groups

    Four mail filters should be updated in GMail, not a problem.

    and renaming our organization at Github from hudson to jenkinsci.

    Well, I’ve forked Hudson/Jenkins and some plugins on Github. Will Github rename base repositories or have I drop and fork them again? For sure, I’m on my own with my local repositories, I have to change couple of git remotes.

    Hudson is dead. Long live Jenkins!

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Ответить
e
Редактировать
o
Show/Hide comments
t
Перейти наверх
l
Go to login
h
Show/Hide help
shift + esc
Отмена