summaryrefslogtreecommitdiffstats
path: root/classes/image_types_ostree.bbclass
diff options
context:
space:
mode:
authorAnton Gerasimov <anton@advancedtelematic.com>2017-11-21 11:26:53 +0100
committerAnton Gerasimov <anton@advancedtelematic.com>2017-11-21 11:28:47 +0100
commit2ca5e74b17a01f5b0697382157241c595539b44f (patch)
tree19dc15c5936dfbf50ac6a52756ada3624a56b690 /classes/image_types_ostree.bbclass
parent3d5e35d7a1afc604a18587cb736a66c0cc9c3977 (diff)
downloadmeta-updater-2ca5e74b17a01f5b0697382157241c595539b44f.tar.gz
Check if the package and UPTANE target got to the backend
Diffstat (limited to 'classes/image_types_ostree.bbclass')
-rw-r--r--classes/image_types_ostree.bbclass17
1 files changed, 14 insertions, 3 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 172f2c8..db8cae6 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -183,7 +183,7 @@ IMAGE_DEPENDS_garagesign = "garage-sign-native:do_populate_sysroot"
183IMAGE_CMD_garagesign () { 183IMAGE_CMD_garagesign () {
184 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then 184 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
185 # if credentials are issued by a server that doesn't support offline signing, exit silently 185 # if credentials are issued by a server that doesn't support offline signing, exit silently
186 unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec 2>&1 >/dev/null || exit 0 186 unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec repo.url 2>&1 >/dev/null || exit 0
187 187
188 java_version=$( java -version 2>&1 | awk -F '"' '/version/ {print $2}' ) 188 java_version=$( java -version 2>&1 | awk -F '"' '/version/ {print $2}' )
189 if [ "${java_version}" = "" ]; then 189 if [ "${java_version}" = "" ]; then
@@ -227,9 +227,20 @@ IMAGE_CMD_garagesign () {
227 bberror "Couldn't push to garage repository" 227 bberror "Couldn't push to garage repository"
228 exit 1 228 exit 1
229 fi 229 fi
230 else
231 bbwarn "SOTA_PACKED_CREDENTIALS not set. Please add SOTA_PACKED_CREDENTIALS."
232 fi 230 fi
233} 231}
234 232
233IMAGE_TYPEDEP_garagecheck = "ostreepush garagesign"
234IMAGE_DEPENDS_garagecheck = "aktualizr-native:do_populate_sysroot"
235IMAGE_CMD_garagecheck () {
236 if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then
237 # if credentials are issued by a server that doesn't support offline signing, exit silently
238 unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec repo.url 2>&1 >/dev/null || exit 0
239 ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME})
240
241 garage-check --ref=${ostree_target_hash} \
242 --credentials=${SOTA_PACKED_CREDENTIALS} \
243 --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt
244 fi
245}
235# vim:set ts=4 sw=4 sts=4 expandtab: 246# vim:set ts=4 sw=4 sts=4 expandtab: