summaryrefslogtreecommitdiffstats
path: root/meta-sota/classes
diff options
context:
space:
mode:
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
+}