[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible fdroid: create build job separate from setup

Holger Levsen holger at layer-acht.org
Thu Apr 20 11:20:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 2f81aceb09ebf0973bda391337a1c8c6c1921e38
Author: Hans-Christoph Steiner <hans at eds.org>
Date:   Thu Apr 20 11:06:19 2017 +0200

    reproducible fdroid: create build job separate from setup
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 ...h => reproducible_fdroid_build_all_profitbricks7.sh} | 17 ++++++++---------
 bin/reproducible_setup_fdroid_build_environment.sh      | 15 +--------------
 job-cfg/reproducible.yaml                               | 10 ++++++++--
 3 files changed, 17 insertions(+), 25 deletions(-)

diff --git a/bin/reproducible_setup_fdroid_build_environment.sh b/bin/reproducible_fdroid_build_all_profitbricks7.sh
old mode 100755
new mode 100644
similarity index 80%
copy from bin/reproducible_setup_fdroid_build_environment.sh
copy to bin/reproducible_fdroid_build_all_profitbricks7.sh
index 584abdf..cbc25a7
--- a/bin/reproducible_setup_fdroid_build_environment.sh
+++ b/bin/reproducible_fdroid_build_all_profitbricks7.sh
@@ -14,8 +14,7 @@ common_init "$@"
 . /srv/jenkins/bin/reproducible_common.sh
 
 # define and clean work space (differently than jenkins would normally do as we run via ssh on a different node…)
-WORKSPACE=$BASE/fdroid
-# FIXME: add locking here to only run this if no build job is running… not yet needed, as we don't have any build jobs yet
+WORKSPACE=$BASE/fdroid-build
 rm $WORKSPACE -rf
 mkdir -p $WORKSPACE
 
@@ -43,9 +42,12 @@ ls -lR ~/.vagrant.d/ || echo no access
 virsh --connect qemu:///system list --all || echo cannot virsh list
 cat /etc/issue
 
-# delete old libvirt instances, until the fdroid tools do it reliably
-virsh --connect qemu:///system undefine builder_default || echo nothing to undefine
-virsh --connect qemu:///system vol-delete /var/lib/libvirt/images/builder_default.img || echo nothing to delete
+# point to the Vagrant/VirtualBox configs created by reproducible_setup_fdroid_build_environment.sh
+# these variables are actually set in fdroidserver/jenkins-build-makebuildserver
+SETUP_WORKSPACE=$BASE/fdroid
+export XDG_CONFIG_HOME=$SETUP_WORKSPACE
+export VBOX_USER_HOME=$WORKSPACE/VirtualBox
+export VAGRANT_HOME=$WORKSPACE/vagrant.d
 
 # the way we handle jenkins slaves doesn't copy the workspace to the slaves
 # so we need to "manually" clone the git repo here…
@@ -58,10 +60,6 @@ git checkout jenkins.debian.net # normally master too
 # set up Android SDK to use the Debian packages in stretch
 export ANDROID_HOME=/usr/lib/android-sdk
 
-# this script is maintained upstream and is also run on Guardian
-# Project's jenkins box
-./jenkins-build-makebuildserver
-
 # ignore username/password prompt for non-existant repos
 git config --global url."https://fakeusername:fakepassword@github.com".insteadOf https://github.com
 git config --global url."https://fakeusername:fakepassword@gitlab.com".insteadOf https://gitlab.com
@@ -74,6 +72,7 @@ cd fdroiddata
 echo "build_server_always = True" > config.py
 $WORKSPACE/fdroidserver/fdroid build --verbose --latest --all
 
+
 # remove trap
 trap - INT TERM EXIT
 echo "$(date -u) - the end."
diff --git a/bin/reproducible_setup_fdroid_build_environment.sh b/bin/reproducible_setup_fdroid_build_environment.sh
index 584abdf..c6c94c9 100755
--- a/bin/reproducible_setup_fdroid_build_environment.sh
+++ b/bin/reproducible_setup_fdroid_build_environment.sh
@@ -15,7 +15,6 @@ common_init "$@"
 
 # define and clean work space (differently than jenkins would normally do as we run via ssh on a different node…)
 WORKSPACE=$BASE/fdroid
-# FIXME: add locking here to only run this if no build job is running… not yet needed, as we don't have any build jobs yet
 rm $WORKSPACE -rf
 mkdir -p $WORKSPACE
 
@@ -45,7 +44,7 @@ cat /etc/issue
 
 # delete old libvirt instances, until the fdroid tools do it reliably
 virsh --connect qemu:///system undefine builder_default || echo nothing to undefine
-virsh --connect qemu:///system vol-delete /var/lib/libvirt/images/builder_default.img || echo nothing to delete
+virsh --connect qemu:///system vol-delete --pool default /var/lib/libvirt/images/builder_default.img || echo nothing to delete
 
 # the way we handle jenkins slaves doesn't copy the workspace to the slaves
 # so we need to "manually" clone the git repo here…
@@ -62,18 +61,6 @@ export ANDROID_HOME=/usr/lib/android-sdk
 # Project's jenkins box
 ./jenkins-build-makebuildserver
 
-# ignore username/password prompt for non-existant repos
-git config --global url."https://fakeusername:fakepassword@github.com".insteadOf https://github.com
-git config --global url."https://fakeusername:fakepassword@gitlab.com".insteadOf https://gitlab.com
-git config --global url."https://fakeusername:fakepassword@bitbucket.org".insteadOf https://bitbucket.org
-
-# now build the whole archive
-cd $WORKSPACE
-git clone https://gitlab.com/fdroid/fdroiddata.git
-cd fdroiddata
-echo "build_server_always = True" > config.py
-$WORKSPACE/fdroidserver/fdroid build --verbose --latest --all
-
 # remove trap
 trap - INT TERM EXIT
 echo "$(date -u) - the end."
diff --git a/job-cfg/reproducible.yaml b/job-cfg/reproducible.yaml
index 96850ae..11c2bfc 100644
--- a/job-cfg/reproducible.yaml
+++ b/job-cfg/reproducible.yaml
@@ -859,10 +859,16 @@
             otherproject_git:
                 - 'setup_fdroid_build_environment_profitbricks7':
                     my_description: 'Setup a build environment for F-Droid.'
-                    my_timed: '42 23 * * *'
+                    my_timed: '42 0 * * 1'
                     my_hname: 'profitbricks7'
                     my_gitrepo: 'https://gitlab.com/fdroid/fdroidserver.git'
-                    my_recipients: 'jenkins+reproducible-builds qa-jenkins-scm at lists.alioth.debian.org hans at guardianproject.info'
+                    my_recipients: 'jenkins+reproducible-builds qa-jenkins-scm at lists.alioth.debian.org hans at guardianproject.info michael.poehn at fsfe.org'
+                - 'fdroid_build_all_profitbricks7':
+                    my_description: 'Build all the latest apps for F-Droid.'
+                    my_timed: '42 7 * * *'
+                    my_hname: 'profitbricks7'
+                    my_gitrepo: 'https://gitlab.com/fdroid/fdroidserver.git'
+                    my_recipients: 'jenkins+reproducible-builds qa-jenkins-scm at lists.alioth.debian.org hans at guardianproject.info michael.poehn at fsfe.org'
                 - 'diffoscope_from_git_master':
                     my_description: 'Build diffoscope Debian package from git branch master.'
                     my_timed: '42 23 1 1 *'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list