[Qa-jenkins-scm] [jenkins.debian.net] 01/02: reproducible_fdroid: separate testsuite into its own job

Mattia Rizzolo mattia at debian.org
Wed Nov 8 11:03:05 UTC 2017


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

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

commit cfaf042ae484268bc3cf1524df0a84720cd95e37
Author: Hans-Christoph Steiner <hans at eds.org>
Date:   Wed Nov 8 09:30:21 2017 +0100

    reproducible_fdroid: separate testsuite into its own job
    
    Right now, minor failures in the test suite mark the long lived jobs as
    failed.  The test suite always takes shorter than an hour to run, so it can
    be more easily repeated.  The tests are moved from the other two jobs into
    this one.
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 TODO                            |  6 -----
 bin/jenkins_node_wrapper.sh     |  2 ++
 bin/reproducible_fdroid_test.sh | 51 +++++++++++++++++++++++++++++++++++++++++
 job-cfg/reproducible.yaml       | 14 +++++++++++
 4 files changed, 67 insertions(+), 6 deletions(-)

diff --git a/TODO b/TODO
index e71ade1..9ffd271 100644
--- a/TODO
+++ b/TODO
@@ -360,12 +360,6 @@ notes on source and binary versions:
 *** or: "fdroid build -l org.fdroid.fdroid" to build the latest
 ** run diffopscope on the results
 
-* let froidserver.git trigger the setup job
-* make setup job fail, when a build job is running
-* make build job wait ("forever"), when a setup job is running
-* later, get a list of all available apps by listing fdroiddata/metadata/*.txt
-* later: switch reproducible_build_fdroid_apk.sh to F-Droid 'Verification Server'
-
 * also see https://f-droid.org/wiki/page/Build_Server_Setup
 
 * diskspace needs:
diff --git a/bin/jenkins_node_wrapper.sh b/bin/jenkins_node_wrapper.sh
index 7413b0a..ee39552 100755
--- a/bin/jenkins_node_wrapper.sh
+++ b/bin/jenkins_node_wrapper.sh
@@ -136,6 +136,8 @@ elif [[ "$*" =~ ^reproducible_setup_schroot_archlinux ]] ; then
 	exec /srv/jenkins/bin/reproducible_setup_archlinux_schroot.sh ; croak "Exec failed";
 elif [[ "$*" =~ ^reproducible_fdroid_build_apps ]] ; then
 	exec /srv/jenkins/bin/reproducible_fdroid_build_apps.sh ; croak "Exec failed";
+elif [[ "$*" =~ ^reproducible_fdroid_test ]] ; then
+	exec /srv/jenkins/bin/reproducible_fdroid_test.sh ; croak "Exec failed";
 elif [[ "$*" =~ ^reproducible_setup_fdroid_build_environment ]] ; then
 	exec /srv/jenkins/bin/reproducible_setup_fdroid_build_environment.sh ; croak "Exec failed";
 elif [[ "$*" =~ ^reproducible_setup_mock_fedora-23_x86_64 ]] ; then
diff --git a/bin/reproducible_fdroid_test.sh b/bin/reproducible_fdroid_test.sh
new file mode 100644
index 0000000..a7bd866
--- /dev/null
+++ b/bin/reproducible_fdroid_test.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+# Copyright © 2015-2017 Holger Levsen (holger at layer-acht.org)
+# Copyright © 2017 Hans-Christoph Steiner (hans at guardianproject.info)
+# released under the GPLv=2
+
+#
+#
+
+DEBUG=true
+. /srv/jenkins/bin/common-functions.sh
+common_init "$@"
+
+# common code
+. /srv/jenkins/bin/reproducible_common.sh
+
+GIT_REPO=https://gitlab.com/fdroid/fdroidserver
+
+# define and clean work space on the machine actually running the
+# build. jenkins.debian.net does not use Jenkins slaves.  Instead
+# /srv/jenkins/bin/jenkins_master_wrapper.sh runs this script on the
+# slave using a directly call to ssh, so this script has to do all
+# of the workspace setup.
+export WORKSPACE=$BASE/reproducible_fdroid_build_apps
+if [ -e $WORKSPACE/.git ]; then
+    # reuse the git repo if possible, to keep all the setup in fdroiddata/
+    cd $WORKSPACE
+    git remote set-url origin $GIT_REPO
+    git fetch --tags
+    git clean -fdx
+    git reset --hard
+    git checkout master
+    git reset --hard origin/master
+    git clean -fdx
+else
+    rm -rf $WORKSPACE
+    git clone $GIT_REPO $WORKSPACE
+    cd $WORKSPACE
+fi
+
+cleanup_all() {
+    # no long lived processes, nothing to be done
+    echo "$(date -u) - cleanup done."
+}
+trap cleanup_all INT TERM EXIT
+
+./jenkins-test
+
+# remove trap
+trap - INT TERM EXIT
+echo "$(date -u) - the end."
diff --git a/job-cfg/reproducible.yaml b/job-cfg/reproducible.yaml
index 0e9bd56..cf11fbb 100644
--- a/job-cfg/reproducible.yaml
+++ b/job-cfg/reproducible.yaml
@@ -701,6 +701,20 @@
             my_parse_rules: '/srv/jenkins/logparse/reproducible-extra.rules'
             my_naginator_regex: 'Caused by: hudson.plugins.git.GitException: Command "git fetch'
 
+        - '{name}_{otherproject_git_blocked}':
+            otherproject_git_blocked:
+                - 'fdroid_test':
+                    my_description: 'Run tests on all the built APKs for F-Droid.'
+                    my_timed: '42 23 1 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 michael.poehn at fsfe.org'
+                    my_blocker: '^reproducible_fdroid.*'
+            my_gitbranches: 'master'
+            my_shell: '/srv/jenkins/bin/jenkins_master_wrapper.sh'
+            my_parse_rules: '/srv/jenkins/logparse/reproducible-extra.rules'
+            my_naginator_regex: 'Caused by: hudson.plugins.git.GitException: Command "git fetch'
+
         - '{name}_{otherproject_git}':
             otherproject_git:
                 - 'reprotest_from_git_master':

-- 
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