tests: run docker login script hs-test jobs 53/43153/2
authorDave Wallace <[email protected]>
Fri, 13 Jun 2025 04:09:20 +0000 (00:09 -0400)
committerFlorin Coras <[email protected]>
Fri, 13 Jun 2025 15:47:31 +0000 (15:47 +0000)
- login to docker hub in the CI to avoid hitting
  the docker hub rate-limiter

Type: test

Change-Id: I4f6a854136b9bae9da1493a2aaa88576a64b314d
Signed-off-by: Dave Wallace <[email protected]>
extras/hs-test/docker/setup-local-registry.sh
extras/hs-test/script/build-images.sh
extras/hs-test/script/build_hst.sh

index 684f858..638a2f8 100755 (executable)
@@ -3,6 +3,11 @@
 
 set -e
 
+DOCKER_LOGIN_SCRIPT="/scratch/nomad/.docker-ro/dlogin.sh"
+if [ -x "$DOCKER_LOGIN_SCRIPT" ] ; then
+  $DOCKER_LOGIN_SCRIPT
+fi
+
 # Check if Docker is running
 if ! docker info &>/dev/null; then
     echo "Error: Docker is not running. Please start Docker and try again."
index 86398f8..74bb2eb 100755 (executable)
@@ -10,10 +10,15 @@ ARCH=${OS_ARCH:-$(dpkg --print-architecture)}
 DOCKER_BUILD_DIR="/scratch/docker-build"
 DOCKER_CACHE_DIR="${DOCKER_BUILD_DIR}/docker_cache"
 DOCKER_HST_BUILDER="hst_builder"
+DOCKER_LOGIN_SCRIPT="/scratch/nomad/.docker-ro/dlogin.sh"
 
 if [ -d "${DOCKER_BUILD_DIR}" ] ; then
   mkdir -p "${DOCKER_CACHE_DIR}"
 
+  if [ -x "$DOCKER_LOGIN_SCRIPT" ] ; then
+    $DOCKER_LOGIN_SCRIPT
+  fi
+
   # Create buildx builder if it doesn't exist
   if ! docker buildx ls --format "{{.Name}}" | grep -q "${DOCKER_HST_BUILDER}"; then
     docker buildx create --use \
index 0e76563..a36037c 100755 (executable)
@@ -38,6 +38,10 @@ fi
 OS_ARCH="$(uname -m)"
 DOCKER_BUILD_DIR="/scratch/docker-build"
 DOCKER_CACHE_DIR="${DOCKER_BUILD_DIR}/docker_cache"
+DOCKER_LOGIN_SCRIPT="/scratch/nomad/.docker-ro/dlogin.sh"
+if [ -x "$DOCKER_LOGIN_SCRIPT" ] ; then
+  $DOCKER_LOGIN_SCRIPT
+fi
 
 # Set up the local registry before creating containers
 echo "=== Setting up local registry ==="