]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
script: update repo url for multi-arch builds
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 4 Jun 2021 16:31:19 +0000 (09:31 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 4 Jun 2021 16:31:19 +0000 (09:31 -0700)
Brad suggested this change based on his commit [1]. Thank you!

[1] https://github.com/ceph/ceph-ansible/commit/267cce9e8360fc8cb9c192fde2406e5dca724610

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/script/ceph-debug-docker.sh

index dc6eebeb2d1e4519a66bb0454f3f16529ea0b9f8..7941cd46844bb1af7c392a1962842270b61a0a34 100755 (executable)
@@ -84,7 +84,11 @@ function main {
 
     T=$(mktemp -d)
     pushd "$T"
-    repo_url="https://shaman.ceph.com/api/repos/ceph/${branch}/${sha}/${env/://}/flavors/${FLAVOR}/repo"
+    distro="${env/://}"
+    api_url="https://shaman.ceph.com/api/search/?status=ready&project=ceph&flavor=${FLAVOR}&distros=${distro}/x86_64&ref=${branch}&sha1=${sha}"
+    repo_url="$(wget -O - "$api_url" | jq -r '.[0].chacra_url')repo"
+    # validate url:
+    wget -O /dev/null "$repo_url"
     if grep ubuntu <<<"$env" > /dev/null 2>&1; then
         # Docker makes it impossible to access anything outside the CWD : /
         wget -O cephdev.asc 'https://download.ceph.com/keys/autobuild.asc'