Skip to content

Commit

Permalink
Merge branch 'cherry-pick-473be93e' into 'rc--2023-11-15_23-00'
Browse files Browse the repository at this point in the history
feat(ci): repro-check.sh - use HostOS .zst image instead of .gz

Tested with one revision
```
Build complete for revision d430f7a
2023/11/14 | 16:03:01 | 1699977781 [+] Built IC-OS successfully
2023/11/14 | 16:03:10 | 1699977790 [+] Check hash of locally built artifact matches the one fetched from the proposal/CDN
2023/11/14 | 16:03:10 | 1699977790 [+] Verification successful for GuestOS!     
2023/11/14 | 16:03:10 | 1699977790 [+] The shasum for GuestOS from the artifact built locally and the one fetched from the proposal/CDN match:
                                                Local = a809a701ba4dbe655fd156e449bd2a2d750dd962b06883c1ae527c2e79b4b983
                                                CDN   = a809a701ba4dbe655fd156e449bd2a2d750dd962b06883c1ae527c2e79b4b983
                                               
                                               
2023/11/14 | 16:03:10 | 1699977790 [+] Verification successful for HostOS!
2023/11/14 | 16:03:10 | 1699977790 [+] The shasum for HostOS from the artifact built locally and the one fetched from the proposal/CDN match:
                                                Local = 1ee54dd719b7fc27fe3fd77698e600ce5ee4171b6c58c66503cef54616250452
                                                CDN   = 1ee54dd719b7fc27fe3fd77698e600ce5ee4171b6c58c66503cef54616250452
                                                                                               
                                                                                                                                                                                              
2023/11/14 | 16:03:10 | 1699977790 [+] Verification successful for SetupOS!                                                                                                                   
2023/11/14 | 16:03:10 | 1699977790 [+] The shasum for SetupOS from the artifact built locally and the one fetched from the proposal/CDN match:
                                                Local = 251356d78ec40580c0726ebdcc1466e42e6c6fbfa558bcedad7bfec32fca7872
                                                CDN   = 251356d78ec40580c0726ebdcc1466e42e6c6fbfa558bcedad7bfec32fca7872
                                                                                               
                                               
2023/11/14 | 16:03:10 | 1699977790 [+] All images are validated successfully
``` 

See merge request dfinity-lab/public/ic!16091

(cherry picked from commit 473be93)

f2612e4 feat(ci): repro-check.sh - use HostOS .zst image instead of .gz 

See merge request dfinity-lab/public/ic!16158
  • Loading branch information
sasa-tomic committed Nov 16, 2023
2 parents e029d6c + 987cc3f commit 27ff924
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gitlab-ci/tools/repro-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,11 @@ download_ci_files() {
local os_url="${BASE_URL}/${os_type}/update-img/update-img.tar.gz"
local sha_url="${BASE_URL}/${os_type}/update-img/SHA256SUMS"

if [ "$os_type" == "host-os" ]; then
os_url="${BASE_URL}/${os_type}/update-img/update-img.tar.zst"
sha_url="${BASE_URL}/${os_type}/update-img/SHA256SUMS"
fi

if [ "$os_type" == "setup-os" ]; then
os_url="${BASE_URL}/${os_type}/disk-img/disk-img.tar.gz"
sha_url="${BASE_URL}/${os_type}/disk-img/SHA256SUMS"
Expand Down Expand Up @@ -304,7 +309,7 @@ check_ci_hash() {
log "Validating that uploaded image hashes match the provided proposal hashes"

check_ci_hash "guestos" "update-img.tar.gz" "ci_package_guestos_sha256_hex"
check_ci_hash "hostos" "update-img.tar.gz" "ci_package_hostos_sha256_hex"
check_ci_hash "hostos" "update-img.tar.zst" "ci_package_hostos_sha256_hex"
check_ci_hash "setupos" "disk-img.tar.gz" "ci_package_setupos_sha256_hex"

log_success "The CI's artifacts and hash match"
Expand Down Expand Up @@ -351,7 +356,7 @@ log "Build IC-OS"
log_success "Built IC-OS successfully"

mv artifacts/icos/guestos/update-img.tar.gz "$dev_out/guestos"
mv artifacts/icos/hostos/update-img.tar.gz "$dev_out/hostos"
mv artifacts/icos/hostos/update-img.tar.zst "$dev_out/hostos"
mv artifacts/icos/setupos/disk-img.tar.gz "$dev_out/setupos"

compute_dev_hash() {
Expand All @@ -367,7 +372,7 @@ compute_dev_hash() {
}

compute_dev_hash "guestos" "update-img.tar.gz" "dev_package_guestos_sha256_hex"
compute_dev_hash "hostos" "update-img.tar.gz" "dev_package_hostos_sha256_hex"
compute_dev_hash "hostos" "update-img.tar.zst" "dev_package_hostos_sha256_hex"
compute_dev_hash "setupos" "disk-img.tar.gz" "dev_package_setupos_sha256_hex"

compare_hashes() {
Expand Down

0 comments on commit 27ff924

Please sign in to comment.