X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ci%2Fci_build.ksh;h=9ee710d1ffb3a3efeab116990ee977d1f3e8aadb;hb=f447e29dffd0a24fcf02288b9591ce7d03a8fb9d;hp=40aa1f5c41675d280986f7d1c946dac564d2d035;hpb=f6f4f1241fddb0d1ee4ca935cc9a94d83afa277e;p=ric-plt%2Flib%2Frmr.git diff --git a/ci/ci_build.ksh b/ci/ci_build.ksh index 40aa1f5..9ee710d 100644 --- a/ci/ci_build.ksh +++ b/ci/ci_build.ksh @@ -42,15 +42,19 @@ # Date: 14 June 2019 # -------------------------------------------------------------------------------- -# stash a set of packages for a particular flavour ($1) +# stash a set of packages for a particular flavour ($1). Records what was kept +# in a yaml file for an external process to grab, and in a simple publication +# list for our internal publish script to gobble up. # function stash_pkgs { + mkdir -p $target_dir/exported + for pkg in deb rpm do ls .build/*.$pkg 2>/dev/null | while read f do - cp $f $target_dir/${f##*/} - echo " - $target_dir/${f##*/}" >>$yaml_file + cp $f $target_dir/exported/${f##*/} + echo " - $target_dir/exported/${f##*/}" >>$yaml_file done done @@ -70,6 +74,7 @@ do *) echo "$1 is not recognised" echo "" echo "usage: $0 [-t target-dir]" + echo " target dir defaults to /tmp and is where packages and lists are placed." exit 1 ;; esac @@ -79,8 +84,11 @@ done if [[ ! -d $target_dir ]] then - echo "[FAIL] cannot find directory: $target_dir" - exit 1 + if ! -mkdir -p $target_dir + then + echo "[FAIL] cannot find or create target directory: $target_dir" + exit 1 + fi fi if [[ ! -d ./ci ]] # verify we are in the root of the RMr repo filesystem, abort if not @@ -104,7 +112,7 @@ mkdir -p .build cd test # execute tests ksh unit_test.ksh # unit tests first cd app_test - ksh run_all.ksh # application based tests if units pass + ksh run_all.sh # application based tests if units pass ) printf "---\nfiles:\n" >$yaml_file # initialise the yaml file