diff options
| author | Laurent Bonnans <laurent.bonnans@here.com> | 2019-11-08 13:50:36 +0100 |
|---|---|---|
| committer | Laurent Bonnans <laurent.bonnans@here.com> | 2019-11-08 15:36:04 +0100 |
| commit | e2d78039bc847ad6230caa0fe1b4658e7e9690b2 (patch) | |
| tree | f6ae2bb7991b6f152d21c79c1559446c31e9eb03 | |
| parent | 21a463dc264434dc132ae79526a824e7955e0032 (diff) | |
| download | meta-updater-e2d78039bc847ad6230caa0fe1b4658e7e9690b2.tar.gz | |
Send a copy of repo manifest through garage-push
Signed-off-by: Laurent Bonnans <laurent.bonnans@here.com>
| -rw-r--r-- | classes/image_types_ostree.bbclass | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index 0e047b1..f10e523 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
| @@ -186,13 +186,19 @@ IMAGE_CMD_ostreecommit () { | |||
| 186 | IMAGE_TYPEDEP_ostreepush = "ostreecommit" | 186 | IMAGE_TYPEDEP_ostreepush = "ostreecommit" |
| 187 | do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot" | 187 | do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot" |
| 188 | IMAGE_CMD_ostreepush () { | 188 | IMAGE_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 | if [ -f ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml ]; then | ||
| 192 | SEND_MANIFEST="--repo-manifest ${IMAGE_ROOTFS}${sysconfdir}/manifest.xml" | ||
| 193 | fi | ||
| 194 | |||
| 190 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 195 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
| 191 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then | 196 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then |
| 192 | garage-push -vv --repo=${OSTREE_REPO} \ | 197 | garage-push -vv --repo=${OSTREE_REPO} \ |
| 193 | --ref=${OSTREE_BRANCHNAME} \ | 198 | --ref=${OSTREE_BRANCHNAME} \ |
| 194 | --credentials=${SOTA_PACKED_CREDENTIALS} \ | 199 | --credentials=${SOTA_PACKED_CREDENTIALS} \ |
| 195 | --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt | 200 | --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt \ |
| 201 | $SEND_MANIFEST | ||
| 196 | else | 202 | else |
| 197 | bbwarn "SOTA_PACKED_CREDENTIALS file does not exist." | 203 | bbwarn "SOTA_PACKED_CREDENTIALS file does not exist." |
| 198 | fi | 204 | fi |
