diff options
author | Henrik Jensen <hrikjsenvagt-lo-KK7TH6PgNEI@public.gmane.org> | 2011-08-10 22:56:50 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-08-15 09:30:28 +0200 |
commit | 021fac37ddcdb1d00617bca334ca4cd688c0750e (patch) | |
tree | a651013902760f9f2d49a7bf993fd7e7efd38612 /ubuntu-jenkins | |
parent | 0904f09a9bcdcc30784a534b4f6a6e61ee13bd1b (diff) |
Series of fixes and migration to One Git for contrib/dev-tools/ubuntu-jenkins
Patches licensed under LGPLv3+/MPL 1.1 ( or what ever Bjoern Michaelsen prefers :-) )
A series of 7 suggested patches to fix some bugs and migrate to One Git in Bjoern MichaelsenĀ
Jenkins Continuous Integration Serversetup found in contrib/dev-tools/ubuntu-jenkins
Patch descriptions:
---------------------------------------------------------------------------------------------------
0001-Bugfix-Prevent-redundant-tarfile-downloads.patch
Bugfix: Prevent redundant tarfile downloads.
'./download' sources 'Env.Host.sh', not 'LinuxX86-64Env.Set.sh',so we must add
'set_tarfile_location.sh' to 'Env.Host.sh' after first './autogen.sh' run.
I speculate if this is an artifact of the cloning from the master and "down-branching"
to 3-4 !!!? - Maybe ./download should be called after the second autogen.sh though I
can't yet see through the consequences of that?
---------------------------------------------------------------------------------------------------
0002-Bugfix-x86-processor-architecture-agnostic.patch
Bugfix: x86 processor architecture agnostic.
Checks if 2nd. run of 'autogen.sh' has generated 'LinuxX86Env.Set.sh' or
'LinuxX86-64Env.Set.sh' and use the appropriate one.
---------------------------------------------------------------------------------------------------
0003-Bugfix-Using-the-new-Env.Host.sh-in-libreoffice-mast.patch
Bugfix: Using the new 'Env.Host.sh' in libreoffice-master instead of hardcoding 'LinuxX86-64Env.Set.sh'
---------------------------------------------------------------------------------------------------
0004-Bugfix-libreoffice-master-job-needs-a-make-before-ma.patch
Bugfix: 'libreoffice-master' job needs a 'make' before 'make dev-install'
'dev-install' has dependencies to the 'all' target but it's not reflected in the
lo-root makefile.
---------------------------------------------------------------------------------------------------
0005-Migrate-to-One-Git-keep-possibility-for-3-4-build.patch
Migrate to One Git, keep possibility for 3-4 build.
- Cloning from 'repo-mirror/core.git' for 'libreoffice-master'.
- Cloning from 'repo-mirror-pre-one-git/bootstrap.git' for 'libreoffice-3-4'.
- Adding a 'repo-mirror-pre-one-git' to still support the 'libreoffice-3-4' job
- Disable cron schedule for the new (old) 'repo-mirror-pre-one-git'.
Adding 2 repo-mirrors to support both the new master and the 'libreoffice-3-4'
seems a bit unnecessary, but as I understand from asking on #libreoffice-dev
the new one-git master can't be used to checkout libreoffice.3.4.
Also tried a './g checkout libreoffice-3-4' on the new one-git repo
Output: "error: pathspec 'libreoffice-3-4' did not match any file(s) known to git."
A solution might be to only mirror the old locked remote master gits and locally use
the onegit.sh conversion script located in
'anongit.freedesktop.org/libreoffice/contrib/dev-tools/onegit' to create a new
copy and then 'git fetch --all --tags' to update it to the newest?
---------------------------------------------------------------------------------------------------
0006-Using-the-JENKINS_HOME-variable.patch
Using the ${JENKINS_HOME} variable
Using the ${JENKINS_HOME} variable instead of hardcoding to the '~/.jenkins' path
This commit sets up an easier transition to a more generalized install procedure
see: https://wiki.jenkins-ci.org/display/JENKINS/Winstone
and https://wiki.jenkins-ci.org/display/JENKINS/Administering+Jenkins
for the ${JENKINS_HOME} variable
---------------------------------------------------------------------------------------------------
0007-Install-Jenkins-in-current-dir-instead-of-.jenkins.patch
Install Jenkins in current dir in stead of ~/.jenkins
Let Jenkins be installed in current dir instead of force to '~/.jenkins'
'setup-ubuntu-jenkins.sh' now creates a 'start-lo-jenkins.sh' with the appropriate startup arguments
---------------------------------------------------------------------------------------------------
TODO:
- Add the ccache lines to './autogen.sh' command line instead of concatenating to 'XEnv.Set.sh/Env.Host.sh'
- Let installer choose between installing Jenkins default dir ('~/.jenkins') or current dir.
--Henrik Jensen
(HenrikJ on #libreoffice-dev)
From f82ffb467f01f23adc1a6afc348790108d8b6ada Mon Sep 17 00:00:00 2001
From: Henrik Jensen <hrikjsenvagt-lo@yahoo.dk>
Date: Wed, 10 Aug 2011 20:40:08 +0200
Subject: [PATCH 1/7] Bugfix: Prevent redundant tarfile downloads.
'./download' sources 'Env.Host.sh', not 'LinuxX86-64Env.Set.sh',so we must add
'set_tarfile_location.sh' to 'Env.Host.sh' after first './autogen.sh' run.
I speculate if this is an artifact of the cloning from the master and "down-branching"
to 3-4 !!!? - Maybe ./download should be called after the second autogen.sh though I
can't yet see through the consequences of that?
Diffstat (limited to 'ubuntu-jenkins')
-rw-r--r-- | ubuntu-jenkins/jobs/libreoffice-3-4/config.xml | 28 | ||||
-rw-r--r-- | ubuntu-jenkins/jobs/libreoffice-master/config.xml | 17 | ||||
-rw-r--r-- | ubuntu-jenkins/jobs/repo-mirror-pre-one-git/config.xml | 46 | ||||
-rw-r--r-- | ubuntu-jenkins/jobs/repo-mirror/config.xml | 5 | ||||
-rw-r--r-- | ubuntu-jenkins/jobs/tarfiles/config.xml | 4 | ||||
-rwxr-xr-x | ubuntu-jenkins/setup-ubuntu-jenkins.sh | 11 |
6 files changed, 85 insertions, 26 deletions
diff --git a/ubuntu-jenkins/jobs/libreoffice-3-4/config.xml b/ubuntu-jenkins/jobs/libreoffice-3-4/config.xml index abd9ffe..b1981ac 100644 --- a/ubuntu-jenkins/jobs/libreoffice-3-4/config.xml +++ b/ubuntu-jenkins/jobs/libreoffice-3-4/config.xml @@ -13,26 +13,32 @@ <concurrentBuild>false</concurrentBuild> <builders> <hudson.tasks.Shell> - <command>BASEURL=`readlink -f ${WORKSPACE}/../../repo-mirror/workspace/` + <command>BASEURL=`readlink -f ${WORKSPACE}/../../repo-mirror-pre-one-git/workspace/` [ -d ${WORKSPACE}/.git ] || git clone ${BASEURL}/bootstrap.git ${WORKSPACE} git pull -./autogen.sh --disable-mozilla --disable-binfilter --with-junit=${HOME}/.jenkins/junit-4.9b2.jar --with-num-cpus=4 --with-max-jobs=4 -cat ${HOME}/.jenkins/set_tarfile_location.sh >> LinuxX86-64Env.Set.sh +./autogen.sh --disable-mozilla --disable-binfilter --with-junit=${JENKINS_HOME}/junit-4.9b2.jar --with-num-cpus=4 --with-max-jobs=4 +cat ${JENKINS_HOME}/set_tarfile_location.sh >> Env.Host.sh ./download ./g checkout libreoffice-3-4 -./autogen.sh --disable-mozilla --disable-binfilter --with-junit=${HOME}/.jenkins/junit-4.9b2.jar --with-num-cpus=4 --with-max-jobs=4 -cat ${HOME}/.jenkins/set_tarfile_location.sh >> LinuxX86-64Env.Set.sh -echo 'export CC="ccache gcc"' >> LinuxX86-64Env.Set.sh -echo 'export CXX="ccache g++"' >> LinuxX86-64Env.Set.sh -echo "export CCACHE_BASEDIR=\"${WORKSPACE}\"" >> LinuxX86-64Env.Set.sh +./autogen.sh --disable-mozilla --disable-binfilter --with-junit=${JENKINS_HOME}/junit-4.9b2.jar --with-num-cpus=4 --with-max-jobs=4 +if [ -e LinuxX86Env.Set.sh ] +then + ENV_SET_SH=LinuxX86Env.Set.sh +else + ENV_SET_SH=LinuxX86-64Env.Set.sh +fi +cat ${JENKINS_HOME}/set_tarfile_location.sh >> $ENV_SET_SH +echo 'export CC="ccache gcc"' >> $ENV_SET_SH +echo 'export CXX="ccache g++"' >> $ENV_SET_SH +echo "export CCACHE_BASEDIR=\"${WORKSPACE}\"" >> $ENV_SET_SH ./g stash save ./g pull -r ./g -f stash pop ./g branch -v #./g --set-push-user YOURUSERNAMEHERE -. $WORKSPACE/LinuxX86-64Env.Set.sh && cd $SOLARSRC/instsetoo_native && $SOLARENV/bin/build.pl --all -P4 -- -P4 -. $WORKSPACE/LinuxX86-64Env.Set.sh && cd $SOLARSRC/smoketestoo_native && dmake localinstall -. $WORKSPACE/LinuxX86-64Env.Set.sh && cd $WORKSPACE && $SOLARENV/bin/subsequenttests -j10 -l9 -k +. $WORKSPACE/$ENV_SET_SH && cd $SOLARSRC/instsetoo_native && $SOLARENV/bin/build.pl --all -P4 -- -P4 +. $WORKSPACE/$ENV_SET_SH && cd $SOLARSRC/smoketestoo_native && dmake localinstall +. $WORKSPACE/$ENV_SET_SH && cd $WORKSPACE && $SOLARENV/bin/subsequenttests -j10 -l9 -k </command> </hudson.tasks.Shell> </builders> diff --git a/ubuntu-jenkins/jobs/libreoffice-master/config.xml b/ubuntu-jenkins/jobs/libreoffice-master/config.xml index b75b187..62c4bf7 100644 --- a/ubuntu-jenkins/jobs/libreoffice-master/config.xml +++ b/ubuntu-jenkins/jobs/libreoffice-master/config.xml @@ -14,21 +14,22 @@ <builders> <hudson.tasks.Shell> <command>BASEURL=`readlink -f ${WORKSPACE}/../../repo-mirror/workspace/` -[ -d ${WORKSPACE}/.git ] || git clone ${BASEURL}/bootstrap.git ${WORKSPACE} +[ -d ${WORKSPACE}/.git ] || git clone ${BASEURL}/core.git ${WORKSPACE} git pull -./autogen.sh --disable-mozilla --disable-binfilter --with-junit=${HOME}/.jenkins/junit-4.9b2.jar --with-num-cpus=4 --with-max-jobs=4 -cat ${HOME}/.jenkins/set_tarfile_location.sh >> LinuxX86-64Env.Set.sh -echo 'export CC="ccache gcc"' >> LinuxX86-64Env.Set.sh -echo 'export CXX="ccache g++"' >> LinuxX86-64Env.Set.sh -echo "export CCACHE_BASEDIR=\"${WORKSPACE}\"" >> LinuxX86-64Env.Set.sh +./autogen.sh --disable-mozilla --disable-binfilter --with-junit=${JENKINS_HOME}/junit-4.9b2.jar --with-num-cpus=4 --with-max-jobs=4 +cat ${JENKINS_HOME}/set_tarfile_location.sh >> Env.Host.sh +echo 'export CC="ccache gcc"' >> Env.Host.sh +echo 'export CXX="ccache g++"' >> Env.Host.sh +echo "export CCACHE_BASEDIR=\"${WORKSPACE}\"" >> Env.Host.sh ./download ./g stash save ./g pull -r ./g -f stash pop ./g branch -v #./g --set-push-user YOURUSERNAMEHERE -. $WORKSPACE/LinuxX86-64Env.Set.sh && make dev-install -. $WORKSPACE/LinuxX86-64Env.Set.sh && make subsequentcheck -j5 -k -f $WORKSPACE/GNUmakefile.mk +. $WORKSPACE/Env.Host.sh && make +. $WORKSPACE/Env.Host.sh && make dev-install +. $WORKSPACE/Env.Host.sh && make subsequentcheck -j5 -k -f $WORKSPACE/GNUmakefile.mk </command> </hudson.tasks.Shell> </builders> diff --git a/ubuntu-jenkins/jobs/repo-mirror-pre-one-git/config.xml b/ubuntu-jenkins/jobs/repo-mirror-pre-one-git/config.xml new file mode 100644 index 0000000..5ccc2fb --- /dev/null +++ b/ubuntu-jenkins/jobs/repo-mirror-pre-one-git/config.xml @@ -0,0 +1,46 @@ +<?xml version='1.0' encoding='UTF-8'?> +<project> + <actions/> + <description>sync local LibreOffice repositories for 3.4.x versions</description> + <keepDependencies>false</keepDependencies> + <properties/> + <scm class="hudson.scm.NullSCM"/> + <canRoam>true</canRoam> + <disabled>false</disabled> + <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> + <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> + <triggers class="vector"/> + <concurrentBuild>false</concurrentBuild> + <builders> + <hudson.tasks.Shell> + <command>#!/usr/bin/env python + +import os +import os.path +import subprocess + +workspace = os.environ['WORKSPACE'] +baseurl = 'git://anongit.freedesktop.org/libreoffice/' +repos = ['artwork', 'base', 'bootstrap', 'calc', 'components', 'extensions', 'extras', 'filters', 'help', 'impress', 'libs-core', 'libs-extern', 'libs-extern-sys', 'libs-gui', 'postprocess', 'sdk', 'testing', 'ure', 'writer'] + +state = [] +for (repo, repodir) in ((repo, os.path.join(workspace, repo+'.git')) for repo in repos): + if os.path.isdir(repodir): + os.chdir(repodir) + os.system('git fetch --all --tags') + else: + os.mkdir(repodir) + os.system('git clone --bare --mirror %s%s %s' % (baseurl, repo, repodir)) + os.chdir(repodir) + state.append('%s:\n' % repo) + for line in subprocess.check_output(['git', 'branch', '--verbose']).split('\n'): + state.append(' %s\n' % line) + +open(os.path.join(workspace, 'gitstate.txt'),'w').writelines(state) +</command> + </hudson.tasks.Shell> + </builders> + <publishers/> + <buildWrappers/> +</project> + diff --git a/ubuntu-jenkins/jobs/repo-mirror/config.xml b/ubuntu-jenkins/jobs/repo-mirror/config.xml index 791d028..c329421 100644 --- a/ubuntu-jenkins/jobs/repo-mirror/config.xml +++ b/ubuntu-jenkins/jobs/repo-mirror/config.xml @@ -25,7 +25,7 @@ import subprocess workspace = os.environ['WORKSPACE'] baseurl = 'git://anongit.freedesktop.org/libreoffice/' -repos = ['artwork', 'base', 'bootstrap', 'calc', 'components', 'extensions', 'extras', 'filters', 'help', 'impress', 'libs-core', 'libs-extern', 'libs-extern-sys', 'libs-gui', 'postprocess', 'sdk', 'testing', 'ure', 'writer'] +repos = [ 'core', 'binfilter', 'dictionaries', 'help', 'translations'] state = [] for (repo, repodir) in ((repo, os.path.join(workspace, repo+'.git')) for repo in repos): @@ -46,4 +46,5 @@ open(os.path.join(workspace, 'gitstate.txt'),'w').writelines </builders> <publishers/> <buildWrappers/> -</project>
\ No newline at end of file +</project> + diff --git a/ubuntu-jenkins/jobs/tarfiles/config.xml b/ubuntu-jenkins/jobs/tarfiles/config.xml index 72986b1..a887b4b 100644 --- a/ubuntu-jenkins/jobs/tarfiles/config.xml +++ b/ubuntu-jenkins/jobs/tarfiles/config.xml @@ -13,9 +13,9 @@ <concurrentBuild>false</concurrentBuild> <builders> <hudson.tasks.Shell> - <command>echo "export TARFILE_LOCATION=\"${WORKSPACE}\"" > ${HOME}/.jenkins/set_tarfile_location.sh</command> + <command>echo "export TARFILE_LOCATION=\"${WORKSPACE}\"" > ${JENKINS_HOME}/set_tarfile_location.sh</command> </hudson.tasks.Shell> </builders> <publishers/> <buildWrappers/> -</project>
\ No newline at end of file +</project> diff --git a/ubuntu-jenkins/setup-ubuntu-jenkins.sh b/ubuntu-jenkins/setup-ubuntu-jenkins.sh index 9f0e968..fc7f242 100755 --- a/ubuntu-jenkins/setup-ubuntu-jenkins.sh +++ b/ubuntu-jenkins/setup-ubuntu-jenkins.sh @@ -1,12 +1,17 @@ #!/bin/sh set -e -mkdir ${HOME}/.jenkins -cd ${HOME}/.jenkins +mkdir jenkins +cd jenkins wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war wget --no-check-certificate https://github.com/downloads/KentBeck/junit/junit-4.9b2.jar git clone git://anongit.freedesktop.org/libreoffice/contrib/dev-tools dev-tools mv dev-tools/ubuntu-jenkins/jobs jobs rm -rf dev-tools +cd .. +echo "#!bin/sh" > start-lo-jenkins.sh +echo "java -DJENKINS_HOME=$(pwd)/jenkins -jar $(pwd)/jenkins/jenkins.war">> start-lo-jenkins.sh +chmod u+x start-lo-jenkins.sh echo "done." -echo "You can start your LibreOffice Ubuntu Jenkins server with: java -jar ~/.jenkins/jenkins.war" +echo "You can start your LibreOffice Ubuntu Jenkins server with: $(pwd)/start-lo-jenkins.sh" echo "It will then be running at http://localhost:8080" + |