From afca40052c85c04debc89e4ceff7b491f6872a84 Mon Sep 17 00:00:00 2001 From: m00133142 Date: Fri, 25 Sep 2015 17:32:46 +0800 Subject: add process of building PPA into daily job JIRA: COMPASS-80 Change-Id: Ib41f8fafa55c236e33ceef388ed89a6ce01cf378 Signed-off-by: m00133142 --- jjb/compass4nfv/compass4nfv.yml | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'jjb') diff --git a/jjb/compass4nfv/compass4nfv.yml b/jjb/compass4nfv/compass4nfv.yml index 57b6eabc6..30643f5dd 100644 --- a/jjb/compass4nfv/compass4nfv.yml +++ b/jjb/compass4nfv/compass4nfv.yml @@ -281,6 +281,7 @@ branch: 'master' builders: + - 'compass-make-ppa' - 'compass-build' - 'compass-upload-artifact' - 'compass-workspace-cleanup' @@ -362,6 +363,12 @@ - string: name: installer_ip default: "10.1.0.12" + - string: + name: PPA_REPO + default: "http://58.251.166.184:9999" + - string: + name: PPA_CACHE + default: "$WORKSPACE/work/repo/" ######################## # builder macros @@ -373,7 +380,30 @@ #!/bin/bash echo "Hello World!" - +- builder: + name: 'compass-make-ppa' + builders: + - shell: | + #!/bin/bash + set -x + set -o errexit + set -o nounset + set -o pipefail + # make ppa + cd $WORKSPACE/ + ./build/make_repo.sh + # calc MD5 of ppa + cd $PPA_CACHE + for i in `find *.gz *.iso *.img -type f` + do + md5="md5sum $i | cut -d ' ' -f1" + echo $md5 > $i.md5 + done + # upload PPA + for i in `find *.* -type f` + do + curl -T $i $PPA_REPO + done - builder: name: 'compass-build' @@ -397,6 +427,11 @@ export OPNFV_ARTIFACT_VERSION=$(date -u +"%Y-%m-%d_%H-%M-%S") # start the build + if [ -d $PPA_CACHE ] + then + cp $PPA_CACHE/*.tar.gz $PPA_CACHE/*.iso $PPA_CACHE/*.img $CACHE_DIRECTORY/ -f + fi + cd $WORKSPACE/ ./build.sh --iso-dir $BUILD_DIRECTORY/ --iso-name compass.iso -c $CACHE_DIRECTORY -- cgit 1.2.3-korg