summaryrefslogtreecommitdiffstats
path: root/meta-sota/classes
diff options
context:
space:
mode:
authorAnton Gerasimov <anton@advancedtelematic.com>2016-11-08 11:23:19 +0100
committerAnton Gerasimov <anton@advancedtelematic.com>2016-11-08 18:43:07 +0100
commit06f1d5958e368eb35a96b95260a23ff887d27d0b (patch)
treec51680358ecd3f030b5bc2da408090ad26cfbc30 /meta-sota/classes
parenta70d7107e8f0dad2104f6b8eb295c722ce02309b (diff)
A tool for uploading OSTree objects to a server together with
integration code Bug-AGL: SPEC-194 Change-Id: I650e190bbda67ad48233bc5aedc0c10ff14aa58f Signed-off-by: Anton Gerasimov <anton@advancedtelematic.com>
Diffstat (limited to 'meta-sota/classes')
-rw-r--r--meta-sota/classes/image_types_ostree.bbclass19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta-sota/classes/image_types_ostree.bbclass b/meta-sota/classes/image_types_ostree.bbclass
index fcba6d9..453692e 100644
--- a/meta-sota/classes/image_types_ostree.bbclass
+++ b/meta-sota/classes/image_types_ostree.bbclass
@@ -124,3 +124,22 @@ IMAGE_CMD_ostree () {
rm -rf ${OSTREE_ROOTFS}
}
+IMAGE_TYPEDEP_ostreepush = "ostree"
+IMAGE_DEPENDS_ostreepush = "sota-tools-native:do_populate_sysroot"
+IMAGE_CMD_ostreepush () {
+ if [ ${OSTREE_REMOTE_URL} ]; then
+ if [ -z ${OSTREE_REMOTE_USER} ]; then
+ bberror "OSTREE_REMOTE_PASSWORD isn't set"
+ fi
+
+ if [ -z ${OSTREE_REMOTE_PASSWORD} ]; then
+ bberror "OSTREE_REMOTE_PASSWORD isn't set"
+ fi
+
+ garage-push --repo=${OSTREE_REPO} \
+ --ref=${OSTREE_BRANCHNAME} \
+ --url=${OSTREE_REMOTE_URL} \
+ --user=${OSTREE_REMOTE_USER} \
+ --password=${OSTREE_REMOTE_PASSWORD}
+ fi
+}