summaryrefslogtreecommitdiffstats
path: root/meta-sota/classes
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2016-11-08 19:22:58 +0000
committerGerrit Code Review <gerrit@automotivelinux.org>2016-11-08 19:22:58 +0000
commitdbb8dfa077019a38037ff7c9a4316bfdde2391fb (patch)
tree0c3a6b15c45e9d9960fb04bd139d8d283646d8a5 /meta-sota/classes
parent3b8a56651fe1598c0c2e50a8c079f111ebb824fe (diff)
parent06f1d5958e368eb35a96b95260a23ff887d27d0b (diff)
Merge "A tool for uploading OSTree objects to a server together with integration code"
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
+}