summaryrefslogtreecommitdiffstats
path: root/classes/image_types_ostree.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/image_types_ostree.bbclass')
-rw-r--r--classes/image_types_ostree.bbclass11
1 files changed, 9 insertions, 2 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 0e047b1..0f0fd28 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -186,13 +186,20 @@ IMAGE_CMD_ostreecommit () {
186IMAGE_TYPEDEP_ostreepush = "ostreecommit" 186IMAGE_TYPEDEP_ostreepush = "ostreecommit"
187do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot" 187do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot"
188IMAGE_CMD_ostreepush () { 188IMAGE_CMD_ostreepush () {
189 # Print warnings if credetials are not set or if the file has not been found. 189 # send a copy of the repo manifest to backend if available
190 local SEND_MANIFEST=""
191 # check if garage-push supports the --repo-manifest option before trying
192 if $(garage-push --help | grep -q '^\s*--repo-manifest') && [ -f ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml ]; then
193 SEND_MANIFEST="--repo-manifest ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml"
194 fi
195
190 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 196 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
191 if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then 197 if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then
192 garage-push -vv --repo=${OSTREE_REPO} \ 198 garage-push -vv --repo=${OSTREE_REPO} \
193 --ref=${OSTREE_BRANCHNAME} \ 199 --ref=${OSTREE_BRANCHNAME} \
194 --credentials=${SOTA_PACKED_CREDENTIALS} \ 200 --credentials=${SOTA_PACKED_CREDENTIALS} \
195 --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt 201 --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt \
202 $SEND_MANIFEST
196 else 203 else
197 bbwarn "SOTA_PACKED_CREDENTIALS file does not exist." 204 bbwarn "SOTA_PACKED_CREDENTIALS file does not exist."
198 fi 205 fi