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.bbclass10
1 files changed, 8 insertions, 2 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass
index 660483e..bc44e33 100644
--- a/classes/image_types_ostree.bbclass
+++ b/classes/image_types_ostree.bbclass
@@ -200,6 +200,12 @@ IMAGE_CMD_garagesign () {
200 200
201 ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME}) 201 ostree_target_hash=$(cat ${OSTREE_REPO}/refs/heads/${OSTREE_BRANCHNAME})
202 202
203 # Use OSTree target hash as version if none was provided by the user
204 target_version=${ostree_target_hash}
205 if [ -n "${GARAGE_TARGET_VERSION}" ]; then
206 target_version=${GARAGE_TARGET_VERSION}
207 fi
208
203 # Push may fail due to race condition when multiple build machines try to push simultaneously 209 # Push may fail due to race condition when multiple build machines try to push simultaneously
204 # in which case targets.json should be pulled again and the whole procedure repeated 210 # in which case targets.json should be pulled again and the whole procedure repeated
205 push_success=0 211 push_success=0
@@ -210,9 +216,9 @@ IMAGE_CMD_garagesign () {
210 --home-dir ${GARAGE_SIGN_REPO} \ 216 --home-dir ${GARAGE_SIGN_REPO} \
211 --name ${GARAGE_TARGET_NAME} \ 217 --name ${GARAGE_TARGET_NAME} \
212 --format OSTREE \ 218 --format OSTREE \
213 --version ${ostree_target_hash} \ 219 --version ${target_version} \
214 --length 0 \ 220 --length 0 \
215 --url "https://example.com/" \ 221 --url "${GARAGE_TARGET_URL}" \
216 --sha256 ${ostree_target_hash} \ 222 --sha256 ${ostree_target_hash} \
217 --hardwareids ${MACHINE} 223 --hardwareids ${MACHINE}
218 garage-sign targets sign --repo tufrepo \ 224 garage-sign targets sign --repo tufrepo \