Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2cf04a7
Upload test logs for Docker
kneumiller Jun 23, 2026
e1cf005
Using block scalar now
kneumiller Jun 24, 2026
abe192a
Removed unnecesary 'sh' call
kneumiller Jun 24, 2026
bc1dff7
'find' was missing so it didn't find anything. Trying to locate and u…
kneumiller Jun 24, 2026
89d1fb9
Trying to narrow down where the log files are. Commenting out the bui…
kneumiller Jun 24, 2026
7de36b7
More testing. Looking for log location
kneumiller Jun 24, 2026
8ca5208
Narrow search and added 'find' install to el8
kneumiller Jun 24, 2026
bd2b866
Using the Dockerfile to copy an image into a known location so that t…
kneumiller Jun 25, 2026
bcaeb04
Dockerfile should now copy the logs into the final image
kneumiller Jun 25, 2026
f5acbc5
Create the dir in the home directory (otherwise need write permissions)
kneumiller Jun 25, 2026
0ec981b
Dockerfile hack - won't run - WIP
jgallagher59701 Jun 25, 2026
aa48a3a
Refined the search to try and capture the logs
kneumiller Jun 26, 2026
d2f139e
Merge branch 'travis-test-logs' of https://github.com/opendap/bes int…
kneumiller Jun 26, 2026
0ada05c
Comments
kneumiller Jun 26, 2026
164ab12
Change ownership so that bes_user can write to directory
kneumiller Jun 26, 2026
b5ca860
Create tar ball in Dockerfile and then copy that from .travis.yml
kneumiller Jun 26, 2026
55fd838
Added debug output to see what is being found and tar'ed
kneumiller Jun 26, 2026
b384dc7
More debugging. Something is happening in .travis.yml...
kneumiller Jun 26, 2026
b21ce3e
Cleanup
kneumiller Jun 26, 2026
3b2f389
Simplify the travis copy command
kneumiller Jun 26, 2026
3d086ba
Instrumentation!
ndp-opendap Jul 1, 2026
0460c10
Instrumentation!
ndp-opendap Jul 1, 2026
d1aafd7
Rewind!
ndp-opendap Jul 1, 2026
2053791
Merge branch 'master' into travis-test-logs
ndp-opendap Jul 1, 2026
080182e
Sorting travis
ndp-opendap Jul 1, 2026
fe15299
Sorting travis
ndp-opendap Jul 1, 2026
1b31cb8
Fast Fail Time
ndp-opendap Jul 1, 2026
b85870c
Fast Fail Time
ndp-opendap Jul 1, 2026
920817e
Fast Fail Time
ndp-opendap Jul 1, 2026
a554769
Fast Fail Time
ndp-opendap Jul 1, 2026
32aeeed
Fast Fail Time
ndp-opendap Jul 1, 2026
625937c
Fast Fail Time
ndp-opendap Jul 2, 2026
76c0617
More rewinding
ndp-opendap Jul 2, 2026
cc1119a
Rewind: Fast Fail Time
ndp-opendap Jul 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ jobs:
export SNAPSHOT_IMAGE_TAG="opendap/${DOCKER_NAME}:snapshot-${DIST}"
export BES_REPO_DIR=${TRAVIS_BUILD_DIR}
- ./travis/build-rhel-docker.sh
# Note: Take the test log tarball that was created in the Dockerfile and copied to the final mount

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe: and copied to the --> and copy it to the

# and then run this copy command to copy it into Travis.
- |
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"
# Note: We need downstream access to the environment variable
# `BUILD_VERSION_TAG` that can only be determined AFTER the image
# is built:
Expand Down Expand Up @@ -215,6 +220,11 @@ jobs:
export SNAPSHOT_IMAGE_TAG="opendap/${DOCKER_NAME}:snapshot-${DIST}"
export BES_REPO_DIR=${TRAVIS_BUILD_DIR}
- ./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.
- |
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"
# Note: We need downstream access to the environment variable
# `BUILD_VERSION_TAG` that can only be determined AFTER the image
# is built:
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ 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 && \
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
#####
Expand All @@ -126,6 +133,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 /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
ARG LIBDAP_RPM_FILENAME
Expand Down
20 changes: 13 additions & 7 deletions travis/upload-test-results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
# 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
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

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
Expand All @@ -21,5 +27,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
Loading