Add caching for qtopenapi maven dependencies

Contains the .m2 folder from home after openapi build. Extracts it
to VM at same path.

Pick-to: 6.11
Change-Id: I3eb5858160db1c996f3c72fae2b91be1478f000c
Reviewed-by: Simo Fält <simo.falt@qt.io>
Reviewed-by: Elias Toivola <elias.toivola@qt.io>
This commit is contained in:
Toni Saario
2026-05-29 15:24:59 +03:00
parent 3f495a95ee
commit adc52dde71
2 changed files with 21 additions and 0 deletions

View File

@@ -22,3 +22,13 @@ sudo mv "$targetFile" "$targetFolder"
SetEnvVar "PATH" "$targetFolder:\$PATH"
# Extract baseline cache
sha1="e397b7934a8c892753166435aff8775c0b5aa5bf"
pkgname="maven_cache-openapi-$version.tar.gz"
internalUrl="http://ci-files01-hki.ci.qt.io/input/qtopenapi/maven/$pkgname"
targetFile="$HOME/$pkgname"
DownloadURL "$internalUrl" "$internalUrl" "$sha1" "$targetFile"
echo "Extracting maven cache to ~/.m2"
tar -xzf "$targetFile" -C "$HOME"
rm "$targetFile"

View File

@@ -25,3 +25,14 @@ Move-Item "$temp\$target_file" "$openapi_location\$target_file"
Prepend-Path "$openapi_location"
Write-Output "OpenAPI generator = $version" >> ~/versions.txt
# Extract baseline cache for openapi
$pkgname = "maven_cache-openapi-$version.tar.gz"
$url_cache = "http://ci-files01-hki.ci.qt.io/input/qtopenapi/maven/$pkgname"
$sha1 = "e397b7934a8c892753166435aff8775c0b5aa5bf"
Download $url_cache $url_cache "$temp\$pkgname"
Verify-Checksum "$temp\$pkgname" $sha1
$cache_location = "C:\Users\qt"
Write-Host "Extracting $pkgname to $cache_location"
Extract-tar_gz "$temp\$pkgname" "$cache_location"