From 2cf04a7138a7036f47e2e51557e51b5bc2804ecb Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Tue, 23 Jun 2026 17:50:44 -0600 Subject: [PATCH 01/32] Upload test logs for Docker --- .travis.yml | 14 ++++++++++++++ travis/upload-test-results.sh | 19 ++++++++++++------- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d8375a7d0f..856c798454 100644 --- a/.travis.yml +++ b/.travis.yml @@ -185,6 +185,13 @@ jobs: export SNAPSHOT_IMAGE_TAG="opendap/${DOCKER_NAME}:snapshot-${DIST}" export BES_REPO_DIR=${TRAVIS_BUILD_DIR} - ./travis/build-rhel-docker.sh + # Note: Create a tmp container mounted at "/scratch". + # Then, pipe the log files into tar and copy them to the tmp dir. + # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG + - mkdir -p /tmp/bes-docker-logs + - docker run --rm -v /tmp/bes-docker-logs:/scratch ${SNAPSHOT_IMAGE_TAG} \ + sh -c 'tar -czf /tmp/${LOG_FILE_TGZ} find . -name timing -prune -o -name '*.log' -print -o -name '*site_map.txt' -print' + - cp /tmp/bes-docker-logs/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz /tmp/ # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: @@ -215,6 +222,13 @@ jobs: export SNAPSHOT_IMAGE_TAG="opendap/${DOCKER_NAME}:snapshot-${DIST}" export BES_REPO_DIR=${TRAVIS_BUILD_DIR} - ./travis/build-rhel-docker.sh + # Note: Create a tmp container mounted at "/scratch". + # Then, pipe the log files into tar and copy them to the tmp dir. + # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG + - mkdir -p /tmp/bes-docker-logs + - docker run --rm -v /tmp/bes-docker-logs:/scratch ${SNAPSHOT_IMAGE_TAG} \ + sh -c 'tar -czf /tmp/${LOG_FILE_TGZ} find . -name timing -prune -o -name '*.log' -print -o -name '*site_map.txt' -print' + - cp /tmp/bes-docker-logs/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz /tmp/ # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: diff --git a/travis/upload-test-results.sh b/travis/upload-test-results.sh index d1196f8c34..2dab723c8a 100755 --- a/travis/upload-test-results.sh +++ b/travis/upload-test-results.sh @@ -3,16 +3,21 @@ # Upload the results of tests after running a build on Travis LOG_FILE_TGZ=bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz +S3_BUCKET="s3://opendap.travis.tests" + if test "$BES_BUILD" = main -o "$BES_BUILD" = distcheck -o "$BES_BUILD" = "docker-el8" -o "$BES_BUILD" = "docker-el9" then - echo "Packaging log files for '$BES_BUILD'" - tar -czf /tmp/${LOG_FILE_TGZ} `find . -name timing -prune -o -name '*.log' -print -o -name '*site_map.txt' -print` + echo "Packaging log files for '$BES_BUILD'" - # using: 'test -z "$AWS_ACCESS_KEY_ID" || ...' keeps after_script from running - # the aws cli for forked PRs (where secure env vars are null). I could've used - # an 'if' to block out the whole script, but I didn't... jhrg 3/21/18 + # Create a tarball for non-docker builds from local files - kln 6/23/26 + if ! test -f /tmp/${LOG_FILE_TGZ}; then + tar -czf /tmp/${LOG_FILE_TGZ} $(find . -name timing -prune -o -name '*.log' -print -o -name '*site_map.txt' -print) + fi - test -z "$AWS_ACCESS_KEY_ID" || aws s3 cp /tmp/${LOG_FILE_TGZ} s3://opendap.travis.tests/ + # using: 'test -z "$AWS_ACCESS_KEY_ID" || ...' keeps after_script from running + # the aws cli for forked PRs (where secure env vars are null). I could've used + # an 'if' to block out the whole script, but I didn't... jhrg 3/21/18 + test -z "$AWS_ACCESS_KEY_ID" || aws s3 cp /tmp/${LOG_FILE_TGZ} ${S3_BUCKET} fi # A quick hack to get the gcovr report to S3. jhrg 4/20/23 @@ -21,5 +26,5 @@ then # using: 'test -z "$AWS_ACCESS_KEY_ID" || ...' keeps after_script from running # the aws cli for forked PRs (where secure env vars are null). I could've used # an 'if' to block out the whole script, but I didn't... jhrg 3/21/18 - test -z "$AWS_ACCESS_KEY_ID" || aws s3 cp ./gcovr_report.txt s3://opendap.travis.tests/bes-gcov-${TRAVIS_JOB_NUMBER}.txt + test -z "$AWS_ACCESS_KEY_ID" || aws s3 cp ./gcovr_report.txt ${S3_BUCKET}/bes-gcov-${TRAVIS_JOB_NUMBER}.txt fi From e1cf0054f0c2825cc8249805cf5cef1951ba38fa Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Wed, 24 Jun 2026 01:13:07 -0600 Subject: [PATCH 02/32] Using block scalar now --- .travis.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 856c798454..b894180397 100644 --- a/.travis.yml +++ b/.travis.yml @@ -188,10 +188,9 @@ jobs: # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG - - mkdir -p /tmp/bes-docker-logs - - docker run --rm -v /tmp/bes-docker-logs:/scratch ${SNAPSHOT_IMAGE_TAG} \ - sh -c 'tar -czf /tmp/${LOG_FILE_TGZ} find . -name timing -prune -o -name '*.log' -print -o -name '*site_map.txt' -print' - - cp /tmp/bes-docker-logs/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz /tmp/ + - | + docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ + sh -c 'find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: @@ -225,10 +224,10 @@ jobs: # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG - - mkdir -p /tmp/bes-docker-logs - - docker run --rm -v /tmp/bes-docker-logs:/scratch ${SNAPSHOT_IMAGE_TAG} \ - sh -c 'tar -czf /tmp/${LOG_FILE_TGZ} find . -name timing -prune -o -name '*.log' -print -o -name '*site_map.txt' -print' - - cp /tmp/bes-docker-logs/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz /tmp/ + - | + docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ + sh -c 'find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' + # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: From abe192acc6d50c3994a55b7f90b7aea03ce1a53b Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Wed, 24 Jun 2026 09:18:36 -0600 Subject: [PATCH 03/32] Removed unnecesary 'sh' call --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b894180397..bc03d5ee51 100644 --- a/.travis.yml +++ b/.travis.yml @@ -190,7 +190,7 @@ jobs: # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - sh -c 'find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' + -c 'find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: @@ -226,8 +226,7 @@ jobs: # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - sh -c 'find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' - + -c 'find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: From bc1dff7f802e0017b110c3e00908349c1ab42ede Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Wed, 24 Jun 2026 14:49:11 -0600 Subject: [PATCH 04/32] 'find' was missing so it didn't find anything. Trying to locate and use 'find'. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bc03d5ee51..4a1b6a7458 100644 --- a/.travis.yml +++ b/.travis.yml @@ -188,9 +188,10 @@ jobs: # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG + - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'which find || type find || /usr/bin/find --version && pwd && ls' - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' + -c 'PATH=/usr/bin:/bin:/usr/sbin:/sbin find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: From 89d1fb9c86d7eee92a0aadf62860bcc5b8740dd7 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Wed, 24 Jun 2026 16:07:06 -0600 Subject: [PATCH 05/32] Trying to narrow down where the log files are. Commenting out the build-and-test to speed things up --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a1b6a7458..486b40e8d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -124,7 +124,7 @@ before_script: # stages can be simplified. jhrg 3/2/22 stages: - - name: build-and-test + #- name: build-and-test - name: build-docker - name: scan if: branch = master @@ -225,9 +225,10 @@ jobs: # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG + - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'which find || type find || /usr/bin/find --version && pwd && ls' - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' + -c 'PATH=/usr/bin:/bin:/usr/sbin:/sbin find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: From 7de36b78e954150654821ca552375c402f51a08e Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Wed, 24 Jun 2026 16:40:31 -0600 Subject: [PATCH 06/32] More testing. Looking for log location --- .travis.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 486b40e8d9..5515079052 100644 --- a/.travis.yml +++ b/.travis.yml @@ -188,10 +188,11 @@ jobs: # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG - - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'which find || type find || /usr/bin/find --version && pwd && ls' + - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'dnf install -y findutils 2>/dev/null && pwd && ls' + - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'dnf install -y findutils 2>/dev/null && find / -name "*.log" -o -name "*site_map.txt" 2>/dev/null | head -20' - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'PATH=/usr/bin:/bin:/usr/sbin:/sbin find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' + -c 'dnf install -y findutils 2>/dev/null && find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: @@ -225,7 +226,7 @@ jobs: # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG - - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'which find || type find || /usr/bin/find --version && pwd && ls' + - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c '//bin/find / -name "*.log" -o -name "*site_map.txt" 2>/dev/null | head -20' - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ -c 'PATH=/usr/bin:/bin:/usr/sbin:/sbin find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' From 8ca52081cf02c3afc40cdf2105ae0f19abcb0680 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Wed, 24 Jun 2026 17:17:23 -0600 Subject: [PATCH 07/32] Narrow search and added 'find' install to el8 --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5515079052..10c0e45274 100644 --- a/.travis.yml +++ b/.travis.yml @@ -189,10 +189,10 @@ jobs: # Then, pipe the log files into tar and copy them to the tmp dir. # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'dnf install -y findutils 2>/dev/null && pwd && ls' - - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'dnf install -y findutils 2>/dev/null && find / -name "*.log" -o -name "*site_map.txt" 2>/dev/null | head -20' + - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c '//bin/find / -name "*site_map.txt" 2>/dev/null' - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'dnf install -y findutils 2>/dev/null && find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' + -c 'find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: @@ -226,7 +226,7 @@ jobs: # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG - - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c '//bin/find / -name "*.log" -o -name "*site_map.txt" 2>/dev/null | head -20' + - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c '//bin/find / -name "*site_map.txt" 2>/dev/null' - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ -c 'PATH=/usr/bin:/bin:/usr/sbin:/sbin find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' From bd2b866cb363e75f979e90a5b89c4b6332b04f09 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Thu, 25 Jun 2026 02:25:40 -0600 Subject: [PATCH 08/32] Using the Dockerfile to copy an image into a known location so that the .travis.yml file knows where to look. --- .travis.yml | 7 ++----- Dockerfile | 3 +++ 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 10c0e45274..8f68ec3c9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -188,11 +188,9 @@ jobs: # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG - - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c 'dnf install -y findutils 2>/dev/null && pwd && ls' - - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c '//bin/find / -name "*site_map.txt" 2>/dev/null' - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' + -c 'tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz /bes-test-logs/' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: @@ -226,10 +224,9 @@ jobs: # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG - - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c '//bin/find / -name "*site_map.txt" 2>/dev/null' - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'PATH=/usr/bin:/bin:/usr/sbin:/sbin find . -name timing -prune -o -name "*.log" -print -o -name "*site_map.txt" -print | tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz -T -' + -c 'tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz /bes-test-logs/' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: diff --git a/Dockerfile b/Dockerfile index 06b51f1e4b..ad0a0ef157 100644 --- a/Dockerfile +++ b/Dockerfile @@ -108,6 +108,9 @@ RUN if [ "$DIST" == "el9" ]; then \ else \ make check -j$(nproc --ignore=1); \ fi +# Copy test logs to a known location for extraction after build +RUN mkdir -p /bes-test-logs && \ + find . -name "*.log" -o -name "*site_map.txt" | xargs -I{} cp --parents {} /bes-test-logs/ 2>/dev/null || true # ...and turn off the besdaemon. We want to turn this on/off regardless of # whether we run the tests From bcaeb04dfe1332a7626aa4f793d84dc4a81b4e57 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Thu, 25 Jun 2026 13:16:04 -0600 Subject: [PATCH 09/32] Dockerfile should now copy the logs into the final image --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index ad0a0ef157..6badffc319 100644 --- a/Dockerfile +++ b/Dockerfile @@ -129,6 +129,9 @@ RUN if [ -z "$FINAL_BASE_IMAGE" ]; then \ exit 1; \ fi +# Copy the log files so that they can be accessed from outside of this docker build (i.e. Travis) +COPY --from=builder /bes-test-logs/ /bes-test-logs/ + # Duplicated from installation above, this time on a slimmer base image... # Install the libdap rpms ARG LIBDAP_RPM_FILENAME From f5acbc572af1ab9cba94c1a0fd6c7eb4fd3d051a Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Thu, 25 Jun 2026 13:40:28 -0600 Subject: [PATCH 10/32] Create the dir in the home directory (otherwise need write permissions) --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6badffc319..58506ffa5a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -109,7 +109,7 @@ RUN if [ "$DIST" == "el9" ]; then \ make check -j$(nproc --ignore=1); \ fi # Copy test logs to a known location for extraction after build -RUN mkdir -p /bes-test-logs && \ +RUN mkdir -p ~/bes-test-logs && \ find . -name "*.log" -o -name "*site_map.txt" | xargs -I{} cp --parents {} /bes-test-logs/ 2>/dev/null || true # ...and turn off the besdaemon. We want to turn this on/off regardless of @@ -130,7 +130,7 @@ RUN if [ -z "$FINAL_BASE_IMAGE" ]; then \ fi # Copy the log files so that they can be accessed from outside of this docker build (i.e. Travis) -COPY --from=builder /bes-test-logs/ /bes-test-logs/ +COPY --from=builder /home/bes_user/bes-test-logs/ /bes-test-logs/ # Duplicated from installation above, this time on a slimmer base image... # Install the libdap rpms From 0ec981be0701d6ff0cc9725c728bd41498ba7de9 Mon Sep 17 00:00:00 2001 From: James Gallagher Date: Thu, 25 Jun 2026 17:45:13 -0600 Subject: [PATCH 11/32] Dockerfile hack - won't run - WIP --- Dockerfile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 58506ffa5a..9380682b64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -100,15 +100,20 @@ RUN sudo setfacl -R -m u:$BES_USER:rwx $PREFIX/var \ # ...next, the daemon has to be started as root. RUN sudo -s --preserve-env=PATH besctl start +## Mount a directory in this container to a directory in the host here. + # ...now run the tests. ARG DIST ENV DIST=${DIST:-el8} -RUN if [ "$DIST" == "el9" ]; then \ +RUN --mount=bind,source=.,target=/tmp \ + if [ "$DIST" == "el9" ]; then \ echo "# Warning: Skipping make check because of undiagnosed el9 errors; ref https://github.com/OPENDAP/bes/issues/1299"; \ else \ make check -j$(nproc --ignore=1); \ + ## tar the logs here and write that to the container directory mounted on line 103 fi -# Copy test logs to a known location for extraction after build + + # Copy test logs to a known location for extraction after build RUN mkdir -p ~/bes-test-logs && \ find . -name "*.log" -o -name "*site_map.txt" | xargs -I{} cp --parents {} /bes-test-logs/ 2>/dev/null || true From aa48a3a484dfa2361c47d34cc890a2152f81be21 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Fri, 26 Jun 2026 09:15:50 -0600 Subject: [PATCH 12/32] Refined the search to try and capture the logs --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 58506ffa5a..7a075f634c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -109,8 +109,9 @@ RUN if [ "$DIST" == "el9" ]; then \ make check -j$(nproc --ignore=1); \ fi # Copy test logs to a known location for extraction after build -RUN mkdir -p ~/bes-test-logs && \ - find . -name "*.log" -o -name "*site_map.txt" | xargs -I{} cp --parents {} /bes-test-logs/ 2>/dev/null || true +RUN sudo mkdir -p /home/bes_user/bes-test-logs && \ + find . \( -name "*.log" -o -name "*site_map.txt" \) -print && \ + find . \( -name "*.log" -o -name "*site_map.txt" \) -print | xargs -I{} cp --parents {} /home/bes_user/bes-test-logs/ # ...and turn off the besdaemon. We want to turn this on/off regardless of # whether we run the tests From 0ada05c2498c492333fa3de928e5767b6e577130 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Fri, 26 Jun 2026 09:43:57 -0600 Subject: [PATCH 13/32] Comments --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8f68ec3c9f..861be96a77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -187,7 +187,7 @@ jobs: - ./travis/build-rhel-docker.sh # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. - # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG + # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG when uploading the results - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ -c 'tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz /bes-test-logs/' @@ -223,7 +223,7 @@ jobs: - ./travis/build-rhel-docker.sh # Note: Create a tmp container mounted at "/scratch". # Then, pipe the log files into tar and copy them to the tmp dir. - # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG + # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG when uploading the results - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ -c 'tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz /bes-test-logs/' From 164ab123ed46992b8e52fd7ad42cda7c388939ed Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Fri, 26 Jun 2026 10:14:17 -0600 Subject: [PATCH 14/32] Change ownership so that bes_user can write to directory --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7a075f634c..3afe21d9c2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -110,7 +110,7 @@ RUN if [ "$DIST" == "el9" ]; then \ fi # Copy test logs to a known location for extraction after build RUN sudo mkdir -p /home/bes_user/bes-test-logs && \ - find . \( -name "*.log" -o -name "*site_map.txt" \) -print && \ + sudo chown $BES_USER:$BES_USER /home/bes_user/bes-test-logs && \ find . \( -name "*.log" -o -name "*site_map.txt" \) -print | xargs -I{} cp --parents {} /home/bes_user/bes-test-logs/ # ...and turn off the besdaemon. We want to turn this on/off regardless of From b5ca8601aae6c74b941c06b28505151023b74942 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Fri, 26 Jun 2026 11:21:35 -0600 Subject: [PATCH 15/32] Create tar ball in Dockerfile and then copy that from .travis.yml --- .travis.yml | 4 ++-- Dockerfile | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 861be96a77..97e157507a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -190,7 +190,7 @@ jobs: # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG when uploading the results - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz /bes-test-logs/' + -c 'cp /bes-test-logs/bes-test-logs.tar.gz /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: @@ -226,7 +226,7 @@ jobs: # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG when uploading the results - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'tar -czf /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz /bes-test-logs/' + -c 'cp /bes-test-logs/bes-test-logs.tar.gz /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz' # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: diff --git a/Dockerfile b/Dockerfile index 3afe21d9c2..e42ce5e32e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -108,10 +108,6 @@ RUN if [ "$DIST" == "el9" ]; then \ else \ make check -j$(nproc --ignore=1); \ fi -# Copy test logs to a known location for extraction after build -RUN sudo mkdir -p /home/bes_user/bes-test-logs && \ - sudo chown $BES_USER:$BES_USER /home/bes_user/bes-test-logs && \ - find . \( -name "*.log" -o -name "*site_map.txt" \) -print | xargs -I{} cp --parents {} /home/bes_user/bes-test-logs/ # ...and turn off the besdaemon. We want to turn this on/off regardless of # whether we run the tests @@ -119,6 +115,12 @@ RUN sudo -s --preserve-env=PATH besctl stop RUN cat libdap4-snapshot | cut -d ' ' -f 1 | sed 's/libdap4-//' > libdap_VERSION +# Copy test logs to a known location for extraction after build +RUN sudo mkdir -p /home/bes_user/bes-test-logs && \ + sudo chown $BES_USER:$BES_USER /home/bes_user/bes-test-logs && \ + find . \( -name "*.log" -o -name "*site_map.txt" \) -print | \ + tar -czf /home/bes_user/bes-test-logs/bes-test-logs.tar.gz -T - + ##### ##### Final layer: libdap + hyrax-dependencies + bes ##### @@ -131,7 +133,7 @@ RUN if [ -z "$FINAL_BASE_IMAGE" ]; then \ fi # Copy the log files so that they can be accessed from outside of this docker build (i.e. Travis) -COPY --from=builder /home/bes_user/bes-test-logs/ /bes-test-logs/ +COPY --from=builder /home/bes_user/bes-test-logs/bes-test-logs.tar.gz /bes-test-logs/bes-test-logs.tar.gz # Duplicated from installation above, this time on a slimmer base image... # Install the libdap rpms From 55fd8385735c7a32172e6feb3994caf0a9010367 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Fri, 26 Jun 2026 12:06:06 -0600 Subject: [PATCH 16/32] Added debug output to see what is being found and tar'ed --- .travis.yml | 6 ++++++ Dockerfile | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97e157507a..22399640ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -191,6 +191,12 @@ jobs: - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ -c 'cp /bes-test-logs/bes-test-logs.tar.gz /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz' + # DEBUG: Display contents + - | + echo "Host /tmp tarball:" + ls -lh /tmp/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz + echo "Contents:" + tar -tzf /tmp/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz | head -200 # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: diff --git a/Dockerfile b/Dockerfile index e42ce5e32e..8f68f36476 100644 --- a/Dockerfile +++ b/Dockerfile @@ -118,8 +118,11 @@ RUN cat libdap4-snapshot | cut -d ' ' -f 1 | sed 's/libdap4-//' > libdap_VERSION # Copy test logs to a known location for extraction after build RUN sudo mkdir -p /home/bes_user/bes-test-logs && \ sudo chown $BES_USER:$BES_USER /home/bes_user/bes-test-logs && \ - find . \( -name "*.log" -o -name "*site_map.txt" \) -print | \ - tar -czf /home/bes_user/bes-test-logs/bes-test-logs.tar.gz -T - + echo "Files being added to bes-test-logs.tar.gz:" && \ + find . \( -name "*.log" -o -name "*site_map.txt" \) -print | tee /tmp/bes-log-file-list.txt && \ + tar -czf /home/bes_user/bes-test-logs/bes-test-logs.tar.gz -T /tmp/bes-log-file-list.txt && \ + echo "Tarball contents:" && \ + tar -tzf /home/bes_user/bes-test-logs/bes-test-logs.tar.gz | head -200 ##### ##### Final layer: libdap + hyrax-dependencies + bes From b384dc73465e47429216e62232694a8337fdbcf2 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Fri, 26 Jun 2026 12:36:04 -0600 Subject: [PATCH 17/32] More debugging. Something is happening in .travis.yml... --- .travis.yml | 3 ++- travis/upload-test-results.sh | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 22399640ed..9293141ff8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -190,7 +190,8 @@ jobs: # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG when uploading the results - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'cp /bes-test-logs/bes-test-logs.tar.gz /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz' + -c 'cp /bes-test-logs/bes-test-logs.tar.gz "$1"' \ + sh "/scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz" # DEBUG: Display contents - | echo "Host /tmp tarball:" diff --git a/travis/upload-test-results.sh b/travis/upload-test-results.sh index 2dab723c8a..f206aad10c 100755 --- a/travis/upload-test-results.sh +++ b/travis/upload-test-results.sh @@ -11,6 +11,7 @@ then # Create a tarball for non-docker builds from local files - kln 6/23/26 if ! test -f /tmp/${LOG_FILE_TGZ}; then + echo "Creating tarball of test logs" tar -czf /tmp/${LOG_FILE_TGZ} $(find . -name timing -prune -o -name '*.log' -print -o -name '*site_map.txt' -print) fi From b21ce3eb68853a63a1496088861345646569a6d3 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Fri, 26 Jun 2026 13:57:51 -0600 Subject: [PATCH 18/32] Cleanup --- .travis.yml | 25 +++++++++---------------- Dockerfile | 8 +++----- travis/upload-test-results.sh | 4 ++-- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9293141ff8..e938ad5d44 100644 --- a/.travis.yml +++ b/.travis.yml @@ -124,7 +124,7 @@ before_script: # stages can be simplified. jhrg 3/2/22 stages: - #- name: build-and-test + - name: build-and-test - name: build-docker - name: scan if: branch = master @@ -185,19 +185,12 @@ jobs: export SNAPSHOT_IMAGE_TAG="opendap/${DOCKER_NAME}:snapshot-${DIST}" export BES_REPO_DIR=${TRAVIS_BUILD_DIR} - ./travis/build-rhel-docker.sh - # Note: Create a tmp container mounted at "/scratch". - # Then, pipe the log files into tar and copy them to the tmp dir. - # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG when uploading the results + # Note: Take the test log tarball that was created in the Dockerfile and copied to the final mount + # and then run this copy command to copy it into Travis. + # Use "$1" because Single quotes prevent the host shell (Travis) from expanding ${TRAVIS_JOB_NUMBER} before invoking - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'cp /bes-test-logs/bes-test-logs.tar.gz "$1"' \ - sh "/scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz" - # DEBUG: Display contents - - | - echo "Host /tmp tarball:" - ls -lh /tmp/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz - echo "Contents:" - tar -tzf /tmp/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz | head -200 + -c 'cp /bes-test-logs/bes-test-logs.tar.gz "$1"' sh "/scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz" # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: @@ -228,12 +221,12 @@ jobs: export SNAPSHOT_IMAGE_TAG="opendap/${DOCKER_NAME}:snapshot-${DIST}" export BES_REPO_DIR=${TRAVIS_BUILD_DIR} - ./travis/build-rhel-docker.sh - # Note: Create a tmp container mounted at "/scratch". - # Then, pipe the log files into tar and copy them to the tmp dir. - # We want to create the log files here because we can use $SNAPSHOT_IMAGE_TAG when uploading the results + # Note: Take the test log tarball that was created in the Dockerfile and copied to the final mount + # and then run this copy command to copy it into Travis. + # Use "$1" because Single quotes prevent the host shell (Travis) from expanding ${TRAVIS_JOB_NUMBER} before invoking - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'cp /bes-test-logs/bes-test-logs.tar.gz /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz' + -c 'cp /bes-test-logs/bes-test-logs.tar.gz "$1"' sh "/scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz" # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: diff --git a/Dockerfile b/Dockerfile index 8f68f36476..7dfb2237f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -118,11 +118,9 @@ RUN cat libdap4-snapshot | cut -d ' ' -f 1 | sed 's/libdap4-//' > libdap_VERSION # Copy test logs to a known location for extraction after build RUN sudo mkdir -p /home/bes_user/bes-test-logs && \ sudo chown $BES_USER:$BES_USER /home/bes_user/bes-test-logs && \ - echo "Files being added to bes-test-logs.tar.gz:" && \ - find . \( -name "*.log" -o -name "*site_map.txt" \) -print | tee /tmp/bes-log-file-list.txt && \ - tar -czf /home/bes_user/bes-test-logs/bes-test-logs.tar.gz -T /tmp/bes-log-file-list.txt && \ - echo "Tarball contents:" && \ - tar -tzf /home/bes_user/bes-test-logs/bes-test-logs.tar.gz | head -200 + echo "Bundling test logs and site_maps:" && \ + find . \( -name "*.log" -o -name "*site_map.txt" \) -print > /tmp/bes-log-file-list.txt && \ + tar -czf /home/bes_user/bes-test-logs/bes-test-logs.tar.gz -T /tmp/bes-log-file-list.txt ##### ##### Final layer: libdap + hyrax-dependencies + bes diff --git a/travis/upload-test-results.sh b/travis/upload-test-results.sh index f206aad10c..d339f31725 100755 --- a/travis/upload-test-results.sh +++ b/travis/upload-test-results.sh @@ -11,8 +11,8 @@ then # Create a tarball for non-docker builds from local files - kln 6/23/26 if ! test -f /tmp/${LOG_FILE_TGZ}; then - echo "Creating tarball of test logs" - tar -czf /tmp/${LOG_FILE_TGZ} $(find . -name timing -prune -o -name '*.log' -print -o -name '*site_map.txt' -print) + echo "No tarball found, creating a new tarball of test logs" + tar -czf /tmp/${LOG_FILE_TGZ} $(find . \( -name "*.log" -o -name "*site_map.txt" \) -print) fi # using: 'test -z "$AWS_ACCESS_KEY_ID" || ...' keeps after_script from running From 3b2f3897610fc2467234bc7691ef535645ed17a2 Mon Sep 17 00:00:00 2001 From: Kodi Neumiller Date: Fri, 26 Jun 2026 16:12:30 -0600 Subject: [PATCH 19/32] Simplify the travis copy command --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e938ad5d44..60ac0d44fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -187,10 +187,9 @@ jobs: - ./travis/build-rhel-docker.sh # Note: Take the test log tarball that was created in the Dockerfile and copied to the final mount # and then run this copy command to copy it into Travis. - # Use "$1" because Single quotes prevent the host shell (Travis) from expanding ${TRAVIS_JOB_NUMBER} before invoking - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'cp /bes-test-logs/bes-test-logs.tar.gz "$1"' sh "/scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz" + -c "cp /bes-test-logs/bes-test-logs.tar.gz /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz" # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: @@ -223,10 +222,9 @@ jobs: - ./travis/build-rhel-docker.sh # Note: Take the test log tarball that was created in the Dockerfile and copied to the final mount # and then run this copy command to copy it into Travis. - # Use "$1" because Single quotes prevent the host shell (Travis) from expanding ${TRAVIS_JOB_NUMBER} before invoking - | docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - -c 'cp /bes-test-logs/bes-test-logs.tar.gz "$1"' sh "/scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz" + -c "cp /bes-test-logs/bes-test-logs.tar.gz /scratch/bes-autotest-${TRAVIS_JOB_NUMBER}-logs.tar.gz" # Note: We need downstream access to the environment variable # `BUILD_VERSION_TAG` that can only be determined AFTER the image # is built: From 3d086ba30af59bff847e1dda7ff528f54aeead46 Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 08:23:48 -0700 Subject: [PATCH 20/32] Instrumentation! --- .travis.yml | 7 +++++++ Dockerfile | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/.travis.yml b/.travis.yml index 60ac0d44fb..52c0c0f295 100644 --- a/.travis.yml +++ b/.travis.yml @@ -233,6 +233,13 @@ jobs: export BUILD_VERSION_TAG="opendap/${DOCKER_NAME}:${BES_VERSION}-${DIST}" echo "Tagging image with BES version: ${BUILD_VERSION_TAG}" docker tag ${SNAPSHOT_IMAGE_TAG} ${BUILD_VERSION_TAG} + # + # + # + echo "# test logs ####################################################" + docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ + /bin/bash -c "ls -l /bes-test-logs" + echo "################################################################" - stage: scan name: "scan bes" diff --git a/Dockerfile b/Dockerfile index 7dfb2237f6..fba0fad10f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -122,11 +122,19 @@ RUN sudo mkdir -p /home/bes_user/bes-test-logs && \ find . \( -name "*.log" -o -name "*site_map.txt" \) -print > /tmp/bes-log-file-list.txt && \ tar -czf /home/bes_user/bes-test-logs/bes-test-logs.tar.gz -T /tmp/bes-log-file-list.txt +RUN echo "BEFORE ###########################################"\ + && find . \( -name "*.log" -o -name "*site_map.txt" \) -print >&2 \ + echo "BEFORE ###########################################" \ + ##### ##### Final layer: libdap + hyrax-dependencies + bes ##### FROM ${FINAL_BASE_IMAGE:-rockylinux:8} AS bes_core +RUN echo "AFTER ###########################################"\ + && find . \( -name "*.log" -o -name "*site_map.txt" \) -print >&2 \ + echo "AFTER ###########################################" \ + ARG FINAL_BASE_IMAGE RUN if [ -z "$FINAL_BASE_IMAGE" ]; then \ echo "Error: Non-empty FINAL_BASE_IMAGE must be specified. Exiting."; \ From 0460c100b2c574cab2be948b7d47b73856b4afcd Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 10:35:58 -0700 Subject: [PATCH 21/32] Instrumentation! --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index fba0fad10f..d3cc979d3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -124,7 +124,7 @@ RUN sudo mkdir -p /home/bes_user/bes-test-logs && \ RUN echo "BEFORE ###########################################"\ && find . \( -name "*.log" -o -name "*site_map.txt" \) -print >&2 \ - echo "BEFORE ###########################################" \ + echo "BEFORE ###########################################" ##### ##### Final layer: libdap + hyrax-dependencies + bes @@ -133,7 +133,7 @@ FROM ${FINAL_BASE_IMAGE:-rockylinux:8} AS bes_core RUN echo "AFTER ###########################################"\ && find . \( -name "*.log" -o -name "*site_map.txt" \) -print >&2 \ - echo "AFTER ###########################################" \ + echo "AFTER ###########################################" ARG FINAL_BASE_IMAGE RUN if [ -z "$FINAL_BASE_IMAGE" ]; then \ From d1aafd7960d2631b360478c1d3a62ba34a0dae93 Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 11:20:13 -0700 Subject: [PATCH 22/32] Rewind! --- Dockerfile | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index d3cc979d3f..61f55986cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -122,26 +122,19 @@ RUN sudo mkdir -p /home/bes_user/bes-test-logs && \ find . \( -name "*.log" -o -name "*site_map.txt" \) -print > /tmp/bes-log-file-list.txt && \ tar -czf /home/bes_user/bes-test-logs/bes-test-logs.tar.gz -T /tmp/bes-log-file-list.txt -RUN echo "BEFORE ###########################################"\ - && find . \( -name "*.log" -o -name "*site_map.txt" \) -print >&2 \ - echo "BEFORE ###########################################" ##### ##### Final layer: libdap + hyrax-dependencies + bes ##### FROM ${FINAL_BASE_IMAGE:-rockylinux:8} AS bes_core -RUN echo "AFTER ###########################################"\ - && find . \( -name "*.log" -o -name "*site_map.txt" \) -print >&2 \ - echo "AFTER ###########################################" - ARG FINAL_BASE_IMAGE RUN if [ -z "$FINAL_BASE_IMAGE" ]; then \ echo "Error: Non-empty FINAL_BASE_IMAGE must be specified. Exiting."; \ exit 1; \ fi -# Copy the log files so that they can be accessed from outside of this docker build (i.e. Travis) +# Copy the log files so tha t they can be accessed from outside of this docker build (i.e. Travis) COPY --from=builder /home/bes_user/bes-test-logs/bes-test-logs.tar.gz /bes-test-logs/bes-test-logs.tar.gz # Duplicated from installation above, this time on a slimmer base image... From 080182e215ee1c930401e96753240f5b2db6b30f Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 13:42:05 -0700 Subject: [PATCH 23/32] Sorting travis --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 52c0c0f295..40243ed24c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -237,8 +237,7 @@ jobs: # # echo "# test logs ####################################################" - docker run --rm -v /tmp:/scratch ${SNAPSHOT_IMAGE_TAG} \ - /bin/bash -c "ls -l /bes-test-logs" + docker run --rm ${SNAPSHOT_IMAGE_TAG} /bin/bash -c "ls -l /bes-test-logs" echo "################################################################" - stage: scan From fe15299b718127a085274d5f4331eb2b0798359d Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 13:45:22 -0700 Subject: [PATCH 24/32] Sorting travis --- .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 40243ed24c..db3a3d9d46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -236,9 +236,11 @@ jobs: # # # - echo "# test logs ####################################################" + echo "# test logs in docker image #############################################################" docker run --rm ${SNAPSHOT_IMAGE_TAG} /bin/bash -c "ls -l /bes-test-logs" - echo "################################################################" + echo "# test logs on host /tmp ################################################################" + ls -l /tmp" + echo "#########################################################################################" - stage: scan name: "scan bes" From 1b31cb8aad17ef4b437037293858a32f7b887723 Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 13:59:56 -0700 Subject: [PATCH 25/32] Fast Fail Time --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index db3a3d9d46..a11b3b7839 100644 --- a/.travis.yml +++ b/.travis.yml @@ -136,7 +136,8 @@ stages: jobs: include: - - stage: build-and-test + # build-and-test + - stage: never name: "check" script: - export BES_BUILD=main @@ -147,7 +148,8 @@ jobs: - echo "LD_LIBRARY_PATH - $LD_LIBRARY_PATH" >&2 - make -j16 && make install && besctl start -d cerr,curl,http && make check -j16 && besctl stop - - stage: build-and-test + # build-and-test + - stage: never name: "distcheck" script: - export BES_BUILD=distcheck @@ -155,7 +157,8 @@ jobs: - ./configure $CONFIGURE_OPTIONS --disable-dependency-tracking --prefix=$prefix --with-dependencies=$prefix/deps --enable-developer - make distcheck -j16 GZIP_ENV=--fast - - stage: build-and-test + # build-and-test + - stage: never name: "dist" script: - export BES_BUILD=srcdist From b85870c8d6857f98128d1b152a1f3476db9a91c2 Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 14:24:29 -0700 Subject: [PATCH 26/32] Fast Fail Time --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index a11b3b7839..0d51a42bab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -239,6 +239,7 @@ jobs: # # # + docker image inspect ${SNAPSHOT_IMAGE_TAG} --format '{{.Architecture}}' echo "# test logs in docker image #############################################################" docker run --rm ${SNAPSHOT_IMAGE_TAG} /bin/bash -c "ls -l /bes-test-logs" echo "# test logs on host /tmp ################################################################" From 920817e39d0d1fb32a318aed11b7a429d7c8ee95 Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 15:40:10 -0700 Subject: [PATCH 27/32] Fast Fail Time --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0d51a42bab..e28f8cffd8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -241,7 +241,7 @@ jobs: # docker image inspect ${SNAPSHOT_IMAGE_TAG} --format '{{.Architecture}}' echo "# test logs in docker image #############################################################" - docker run --rm ${SNAPSHOT_IMAGE_TAG} /bin/bash -c "ls -l /bes-test-logs" + docker run --rm --platform linux/amd64 ${SNAPSHOT_IMAGE_TAG} /bin/bash -c "ls -l /bes-test-logs" echo "# test logs on host /tmp ################################################################" ls -l /tmp" echo "#########################################################################################" From a5547697ff38eb74ca9d4e4ec4d00cd3c2db0adf Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 15:59:08 -0700 Subject: [PATCH 28/32] Fast Fail Time --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e28f8cffd8..1c25821b09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -241,7 +241,7 @@ jobs: # docker image inspect ${SNAPSHOT_IMAGE_TAG} --format '{{.Architecture}}' echo "# test logs in docker image #############################################################" - docker run --rm --platform linux/amd64 ${SNAPSHOT_IMAGE_TAG} /bin/bash -c "ls -l /bes-test-logs" + docker run --rm --platform linux/amd64 ${SNAPSHOT_IMAGE_TAG} -c "ls -l /bes-test-logs" echo "# test logs on host /tmp ################################################################" ls -l /tmp" echo "#########################################################################################" From 32aeeed7019137e3701a904132ad0bf2e0a69264 Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 16:14:34 -0700 Subject: [PATCH 29/32] Fast Fail Time --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1c25821b09..053debb5d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -242,8 +242,8 @@ jobs: docker image inspect ${SNAPSHOT_IMAGE_TAG} --format '{{.Architecture}}' echo "# test logs in docker image #############################################################" docker run --rm --platform linux/amd64 ${SNAPSHOT_IMAGE_TAG} -c "ls -l /bes-test-logs" - echo "# test logs on host /tmp ################################################################" - ls -l /tmp" + echo "# test logs on host /tmp ################################################################" + ls -l /tmp echo "#########################################################################################" - stage: scan From 625937c50e861dfca9bbab2f13421cee4178b11d Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Wed, 1 Jul 2026 17:08:44 -0700 Subject: [PATCH 30/32] Fast Fail Time --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 053debb5d0..80a9c91440 100644 --- a/.travis.yml +++ b/.travis.yml @@ -242,7 +242,7 @@ jobs: docker image inspect ${SNAPSHOT_IMAGE_TAG} --format '{{.Architecture}}' echo "# test logs in docker image #############################################################" docker run --rm --platform linux/amd64 ${SNAPSHOT_IMAGE_TAG} -c "ls -l /bes-test-logs" - echo "# test logs on host /tmp ################################################################" + echo "# test logs on host /tmp ################################################################" ls -l /tmp echo "#########################################################################################" From 76c0617646ae5a2124500f0a18f70c91d061fafa Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Thu, 2 Jul 2026 08:00:20 -0700 Subject: [PATCH 31/32] More rewinding --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 80a9c91440..e82951915a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -241,7 +241,7 @@ jobs: # docker image inspect ${SNAPSHOT_IMAGE_TAG} --format '{{.Architecture}}' echo "# test logs in docker image #############################################################" - docker run --rm --platform linux/amd64 ${SNAPSHOT_IMAGE_TAG} -c "ls -l /bes-test-logs" + docker run --rm ${SNAPSHOT_IMAGE_TAG} -c "ls -l /bes-test-logs" echo "# test logs on host /tmp ################################################################" ls -l /tmp echo "#########################################################################################" From cc1119ab01b2aa2be294b8d5141a301dbce13fb9 Mon Sep 17 00:00:00 2001 From: ndp-opendap Date: Thu, 2 Jul 2026 08:22:55 -0700 Subject: [PATCH 32/32] Rewind: Fast Fail Time --- .travis.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index e82951915a..d6d0aedf9c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -137,7 +137,7 @@ stages: jobs: include: # build-and-test - - stage: never + - stage: build-and-test name: "check" script: - export BES_BUILD=main @@ -149,7 +149,7 @@ jobs: - make -j16 && make install && besctl start -d cerr,curl,http && make check -j16 && besctl stop # build-and-test - - stage: never + - stage: build-and-test name: "distcheck" script: - export BES_BUILD=distcheck @@ -158,7 +158,7 @@ jobs: - make distcheck -j16 GZIP_ENV=--fast # build-and-test - - stage: never + - stage: build-and-test name: "dist" script: - export BES_BUILD=srcdist @@ -236,15 +236,6 @@ jobs: export BUILD_VERSION_TAG="opendap/${DOCKER_NAME}:${BES_VERSION}-${DIST}" echo "Tagging image with BES version: ${BUILD_VERSION_TAG}" docker tag ${SNAPSHOT_IMAGE_TAG} ${BUILD_VERSION_TAG} - # - # - # - docker image inspect ${SNAPSHOT_IMAGE_TAG} --format '{{.Architecture}}' - echo "# test logs in docker image #############################################################" - docker run --rm ${SNAPSHOT_IMAGE_TAG} -c "ls -l /bes-test-logs" - echo "# test logs on host /tmp ################################################################" - ls -l /tmp - echo "#########################################################################################" - stage: scan name: "scan bes"