From: garciadeblas Date: Mon, 19 Mar 2018 13:42:49 +0000 (+0100) Subject: gen-lxdimages: changing permissions to lxd image files; adding rsync options X-Git-Tag: v3.0.3~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=8857f000a9cfa0ac6c7d9346b7177892c2e4e32e;p=osm%2Fdevops.git gen-lxdimages: changing permissions to lxd image files; adding rsync options Change-Id: I0e1621ce679de00d18e4862f14b3e467cef99c46 Signed-off-by: garciadeblas --- diff --git a/tools/gen-lxdimages.sh b/tools/gen-lxdimages.sh index f3a639ca..80d7ec42 100755 --- a/tools/gen-lxdimages.sh +++ b/tools/gen-lxdimages.sh @@ -67,14 +67,15 @@ echo "Exporting images as targz" mkdir -p "${RELEASE}" #trap 'rm -rf "$RELEASE"' EXIT -[ -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}" +[ -n "$GEN_RO" ] && lxc image export "${OSM_RO_IMAGE}" "${RELEASE}"/"${OSM_RO_IMAGE}" || echo "Failed to export RO" +[ -n "$GEN_VCA" ] && lxc image export "${OSM_VCA_IMAGE}" "${RELEASE}"/"${OSM_VCA_IMAGE}" || echo "Failed to export VCA" +[ -n "$GEN_SOUI" ] && lxc image export "${OSM_SOUI_IMAGE}" "${RELEASE}"/"${OSM_SOUI_IMAGE}" || echo "Failed to export SOUI" +#[ -n "$GEN_MON" ] && lxc image export "${OSM_MON_IMAGE}" "${RELEASE}"/"${OSM_MON_IMAGE}" || echo "Failed to export MON" +chmod 664 "${RELEASE}"/*.tar.gz echo "Pushing images to ETSI FTP server" RSYNC_USER_HOST=osmusers@osm-download.etsi.org -RSYNC_OPTIONS="--delete --progress" +RSYNC_OPTIONS="--delete --progress --password-file rsync.pass" rsync -avR "$RSYNC_OPTIONS" "$RELEASE" rsync://$RSYNC_USER_HOST/repos/osm/lxd