From: garciadeblas Date: Thu, 21 Dec 2017 14:32:32 +0000 (+0100) Subject: Minor bug fixes in lxd images generation X-Git-Tag: v3.0.3~11 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F04%2F5804%2F2;p=osm%2Fdevops.git Minor bug fixes in lxd images generation Change-Id: I96ab9d55d377b574736bc24031ac2a3014ab6803 Signed-off-by: garciadeblas --- diff --git a/tools/gen-lxdimages.sh b/tools/gen-lxdimages.sh index 0ad99659..f3a639ca 100755 --- a/tools/gen-lxdimages.sh +++ b/tools/gen-lxdimages.sh @@ -64,23 +64,17 @@ OSM_MON_IMAGE="osm-mon" #[ -n "$GEN_MON" ] && lxc image copy ${OSM_MON_IMAGE} remote: echo "Exporting images as targz" -TEMPDIR="$(mktemp -d -q --tmpdir "osmlxd.XXXXXX")" -trap 'rm -rf "$TEMPDIR"' EXIT -RELEASE_DIR="${TEMPDIR}/${RELEASE}" -mkdir -p ${RELEASE_DIR} +mkdir -p "${RELEASE}" +#trap 'rm -rf "$RELEASE"' EXIT -[ -n "$GEN_RO" ] && lxc image export ${OSM_RO_IMAGE} $RELEASE_DIR/${OSM_RO_IMAGE} -[ -n "$GEN_VCA" ] && lxc image export ${OSM_VCA_IMAGE} $RELEASE_DIR/${OSM_VCA_IMAGE} -[ -n "$GEN_SOUI" ] && lxc image export ${OSM_SOUI_IMAGE} $RELEASE_DIR/${OSM_SOUI_IMAGE} -#[ -n "$GEN_MON" ] && lxc image export ${OSM_MON_IMAGE} $RELEASE_DIR/${OSM_MON_IMAGE} -[ -n "$GEN_RO" ] && chmod +r $RELEASE_DIR/${OSM_RO_IMAGE}.tar.gz -[ -n "$GEN_VCA" ] && chmod +r $RELEASE_DIR/${OSM_VCA_IMAGE}.tar.gz -[ -n "$GEN_SOUI" ] && chmod +r $RELEASE_DIR/${OSM_SOUI_IMAGE}.tar.gz -#[ -n "$GEN_MON" ] && chmod +r $RELEASE_DIR/${OSM_MON_IMAGE}.tar.gz +[ -n "$GEN_RO" ] && lxc image export "${OSM_RO_IMAGE}" "${RELEASE}"/"${OSM_RO_IMAGE}" +[ -n "$GEN_VCA" ] && lxc image export "${OSM_VCA_IMAGE}" "${RELEASE}"/"${OSM_VCA_IMAGE}" +[ -n "$GEN_SOUI" ] && lxc image export "${OSM_SOUI_IMAGE}" "${RELEASE}"/"${OSM_SOUI_IMAGE}" +#[ -n "$GEN_MON" ] && lxc image export "${OSM_MON_IMAGE}" "${RELEASE}"/"${OSM_MON_IMAGE}" echo "Pushing images to ETSI FTP server" RSYNC_USER_HOST=osmusers@osm-download.etsi.org RSYNC_OPTIONS="--delete --progress" -cd $TEMPDIR && rsync -avR $RSYNC_OPTIONS $RELEASE rsync://$RSYNC_USER_HOST/repos/osm/lxd +rsync -avR "$RSYNC_OPTIONS" "$RELEASE" rsync://$RSYNC_USER_HOST/repos/osm/lxd