diff options
-rw-r--r-- | classes/image_types_ostree.bbclass | 7 | ||||
-rw-r--r-- | classes/sota.bbclass | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index f3b1b33..134f5f5 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -224,6 +224,11 @@ IMAGE_CMD_garagesign () { | |||
224 | # Push may fail due to race condition when multiple build machines try to push simultaneously | 224 | # Push may fail due to race condition when multiple build machines try to push simultaneously |
225 | # in which case targets.json should be pulled again and the whole procedure repeated | 225 | # in which case targets.json should be pulled again and the whole procedure repeated |
226 | push_success=0 | 226 | push_success=0 |
227 | target_url="" | ||
228 | if [ -n "${GARAGE_TARGET_URL}" ]; then | ||
229 | target_url='--url ${GARAGE_TARGET_URL}' | ||
230 | fi | ||
231 | |||
227 | for push_retries in $( seq 3 ); do | 232 | for push_retries in $( seq 3 ); do |
228 | garage-sign targets pull --repo tufrepo \ | 233 | garage-sign targets pull --repo tufrepo \ |
229 | --home-dir ${GARAGE_SIGN_REPO} | 234 | --home-dir ${GARAGE_SIGN_REPO} |
@@ -233,7 +238,7 @@ IMAGE_CMD_garagesign () { | |||
233 | --format OSTREE \ | 238 | --format OSTREE \ |
234 | --version ${target_version} \ | 239 | --version ${target_version} \ |
235 | --length 0 \ | 240 | --length 0 \ |
236 | --url "${GARAGE_TARGET_URL}" \ | 241 | ${target_url} \ |
237 | --sha256 ${ostree_target_hash} \ | 242 | --sha256 ${ostree_target_hash} \ |
238 | --hardwareids ${SOTA_HARDWARE_ID} | 243 | --hardwareids ${SOTA_HARDWARE_ID} |
239 | garage-sign targets sign --repo tufrepo \ | 244 | garage-sign targets sign --repo tufrepo \ |
diff --git a/classes/sota.bbclass b/classes/sota.bbclass index 1517ceb..cb00a80 100644 --- a/classes/sota.bbclass +++ b/classes/sota.bbclass | |||
@@ -38,7 +38,7 @@ GARAGE_SIGN_REPO ?= "${DEPLOY_DIR_IMAGE}/garage_sign_repo" | |||
38 | GARAGE_SIGN_KEYNAME ?= "garage-key" | 38 | GARAGE_SIGN_KEYNAME ?= "garage-key" |
39 | GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}" | 39 | GARAGE_TARGET_NAME ?= "${OSTREE_BRANCHNAME}" |
40 | GARAGE_TARGET_VERSION ?= "" | 40 | GARAGE_TARGET_VERSION ?= "" |
41 | GARAGE_TARGET_URL ?= "https://example.com/" | 41 | GARAGE_TARGET_URL ?= "" |
42 | 42 | ||
43 | SOTA_MACHINE ??="none" | 43 | SOTA_MACHINE ??="none" |
44 | SOTA_MACHINE_rpi ?= "raspberrypi" | 44 | SOTA_MACHINE_rpi ?= "raspberrypi" |