]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-pull-requests: update file to use new bwc functions
authorJohn Mulligan <phlogistonjohn@asynchrono.us>
Mon, 16 Mar 2026 20:41:34 +0000 (16:41 -0400)
committerJohn Mulligan <phlogistonjohn@asynchrono.us>
Mon, 16 Mar 2026 20:44:09 +0000 (16:44 -0400)
Replace the existing "open coded" implementation with calls to the
recently created bwc.sh functions. This avoids duplication and improves
reuse.

Signed-off-by: John Mulligan <phlogistonjohn@asynchrono.us>
ceph-pull-requests/build/build
ceph-pull-requests/config/definitions/ceph-pull-requests.yml

index 5d71edb4516bbdade8191c7f4735ecea2a9a59d1..ec8cc8071fe017cd2a0475553497f0aeb2aa6427 100644 (file)
@@ -18,38 +18,9 @@ WITH_RBD_RWL=true
 JENKINS_HOME=${JENKINS_HOME}
 REWRITE_COVERAGE_ROOTDIR=${PWD}/src/pybind/mgr/dashboard/frontend
 EOF
-# TODO: enable (read-only?) sccache support
-npm_cache_info() {
-    echo '===== npm cache info ======='
-    du -sh "${NPMCACHE}" || echo "${NPMCACHE} not present"
-    echo '============================'
-}
-bwc() {
-    # specify timeout in hours for $1
-    local timeout=$(($1*60*60))
-    shift
-    timeout "${timeout}" ./src/script/build-with-container.py \
-        -d "${DISTRO_BASE:-jammy}" \
-        --env-file="${PWD}/.env" \
-        --current-branch="${GIT_BRANCH:-main}" \
-        -t+amd64 \
-        --npm-cache-path="${NPMCACHE}" \
-        "${@}"
-}
 
-podman login -u ${DOCKER_HUB_USERNAME} -p ${DOCKER_HUB_PASSWORD} docker.io
-
-npm_cache_info
-bwc 1 -e configure
-# try to pre-load the npm cache so that it doesn't fail during the normal build
-# step
-for i in {0..5}; do
-    bwc 1 -e custom -- \
-        cmake --build build -t mgr-dashboard-frontend-deps && break
-    echo "Warning: Attempt $((i+1)) to cache npm packages failed."
-    sleep $((10 + 30 * i))
-done
-npm_cache_info
+bwc_login
+bwc_populate_npm_cache
 bwc 4 -e tests
 npm_cache_info
 sleep 5
index 9a0066b292d3c75e9579627b014d9cb608a2448a..c8d815082826ff3953ca8ae9fc9f07dedf6a0eed 100644 (file)
@@ -62,6 +62,7 @@
     - shell:
         !include-raw-verbatim:
           - ../../../scripts/build_utils.sh
+          - ../../../scripts/bwc.sh
           - ../../../scripts/setup_container_runtime.sh
           - ../../build/build