diff options
-rwxr-xr-x | bin/reproducible_build.sh | 13 | ||||
-rw-r--r-- | job-cfg/reproducible.yaml | 11 |
2 files changed, 22 insertions, 2 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 7861078b..c4df8396 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -25,13 +25,24 @@ set -x grep deb-src /etc/apt/sources.list | grep sid sudo apt-get update +# if $1 is an integer, build $1 random packages +if [[ $1 =~ ^-?[0-9]+$ ]] ; then + TMPFILE=$(mktemp) + curl http://ftp.de.debian.org/debian/dists/sid/main/source/Sources.xz > $TMPFILE + AMOUNT=$1 + PACKAGES=$(xzcat $TMPFILE | grep "^Package" | cut -d " " -f2 | sort -R | head -$AMOUNT | xargs echo) + rm $TMPFILE +else + PACKAGES="$@" +fi + COUNT_TOTAL=0 COUNT_GOOD=0 COUNT_BAD=0 GOOD="" BAD="" SOURCELESS="" -for SRCPACKAGE in "$@" ; do +for SRCPACKAGE in $PACKAGES ; do let "COUNT_TOTAL=COUNT_TOTAL+1" rm b1 b2 -rf set +e diff --git a/job-cfg/reproducible.yaml b/job-cfg/reproducible.yaml index dfed6119..8b8cf4e6 100644 --- a/job-cfg/reproducible.yaml +++ b/job-cfg/reproducible.yaml @@ -54,6 +54,10 @@ - job-template: defaults: reproducible + name: '{name}_build_random_packages' + +- job-template: + defaults: reproducible name: '{name}_build_core' - job-template: @@ -113,9 +117,14 @@ jobs: - '{name}_setup': my_description: 'Setup pbuilder for reproducible builds as described in https://wiki.debian.org/ReproducibleBuilds#Usage_example' - my_timed: '42 0 1,2,3,4,5,6,7,16,17,18,19,20,21,22 * *' + my_timed: '42 0 * * *' my_shell: '/srv/jenkins/bin/reproducible_setup.sh' my_packages: '' + - '{name}_build_random_packages': + my_description: 'Reproducible build 50 random packages each day.' + my_timed: '23 3 * * *' + my_shell: '/srv/jenkins/bin/reproducible_build.sh' + my_packages: '50' - '{name}_build_test_reproducibility': my_description: 'Reproducible build of a few packages, some we know will succeed and some we know which "should" fail: ' my_timed: '' |