From 5d6165d1114bd12b2379fb080ed4ddd86dfd1e8b Mon Sep 17 00:00:00 2001 From: Keith Ratcliffe Date: Fri, 4 Aug 2023 15:22:19 -0400 Subject: [PATCH] Fixes quickstart-build-and-test CI job in Github (#2055) (#2056) - Removes invalid .dockerignore symlink, which was inadvertently commited as part of #1796 (48e3e70) - For whatever reason, docker build in ubuntu-latest no longer accepts a symlinked .dockerignore in the root context, so using a full copy instead --- .dockerignore | 1 - contrib/datawave-quickstart/docker/.dockerignore | 6 +++--- contrib/datawave-quickstart/docker/Dockerfile | 2 -- contrib/datawave-quickstart/docker/docker-build.sh | 6 +++--- 4 files changed, 6 insertions(+), 9 deletions(-) delete mode 120000 .dockerignore diff --git a/.dockerignore b/.dockerignore deleted file mode 120000 index cd8c5279036..00000000000 --- a/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -/workspace/datawave/contrib/datawave-quickstart/docker/.dockerignore \ No newline at end of file diff --git a/contrib/datawave-quickstart/docker/.dockerignore b/contrib/datawave-quickstart/docker/.dockerignore index 7cea84fc8e5..502d36b8395 100644 --- a/contrib/datawave-quickstart/docker/.dockerignore +++ b/contrib/datawave-quickstart/docker/.dockerignore @@ -1,4 +1,4 @@ -# This .dockerignore gets symlinked temporarily from the datawave repo's +# This .dockerignore gets copied temporarily to the datawave repo's # root directory by docker-build.sh, since that directory is used as # the build context for the image. @@ -15,9 +15,9 @@ **/.project **/.settings -# Ignore temporary .dockerignore symlink in the root directory... +# Ignore temporary .dockerignore copy in the root directory... .dockerignore -# ...but don't ignore the actual .dockerignore file +# ...but don't ignore the actual .dockerignore source file !**/datawave-quickstart/docker/.dockerignore # Below, we mostly just ignore enviromnent-specific stuff that may have diff --git a/contrib/datawave-quickstart/docker/Dockerfile b/contrib/datawave-quickstart/docker/Dockerfile index 4f16a5def29..d936761d930 100644 --- a/contrib/datawave-quickstart/docker/Dockerfile +++ b/contrib/datawave-quickstart/docker/Dockerfile @@ -69,11 +69,9 @@ RUN /bin/bash -c "/usr/bin/nohup /usr/sbin/sshd -D &" && \ # Primary data volume (for HDFS, Accumulo, ZooKeeper, etc) VOLUME ["/opt/datawave/contrib/datawave-quickstart/data"] - # In case user wants to rebuild DW VOLUME ["$HOME/.m2/repository"] - VOLUME ["/opt/datawave/contrib/datawave-quickstart/hadoop/logs"] VOLUME ["/opt/datawave/contrib/datawave-quickstart/accumulo/logs"] VOLUME ["/opt/datawave/contrib/datawave-quickstart/wildfly/standalone/log"] diff --git a/contrib/datawave-quickstart/docker/docker-build.sh b/contrib/datawave-quickstart/docker/docker-build.sh index 8b6c06ad0fe..87ed6357db1 100755 --- a/contrib/datawave-quickstart/docker/docker-build.sh +++ b/contrib/datawave-quickstart/docker/docker-build.sh @@ -100,7 +100,7 @@ function removeDatawaveTarball() { function cleanBuildContext() { info "Cleaning up" - unlink ${DATAWAVE_SOURCE_DIR}/.dockerignore > /dev/null 2>&1 && info ".dockerignore symlink removed" + rm -f ${DATAWAVE_SOURCE_DIR}/.dockerignore > /dev/null 2>&1 && info ".dockerignore copy removed" # Remove any potentially stale DataWave tarballs from the DW service directory. Removal # will guarantee that a fresh Maven build is triggered whenever env.sh is sourced @@ -138,9 +138,9 @@ function prepareBuildContext() { datawaveBuildSucceeded || fatal "Most recent DataWave build failed. Cannot proceed with Docker build!" - # Set temporary .dockerignore symlink in DATAWAVE_SOURCE_DIR for context exclusions... + # Temporarily copy .dockerignore to DATAWAVE_SOURCE_DIR (i.e., root context for docker build)... - ln -s "${THIS_DIR}/.dockerignore" "${DATAWAVE_SOURCE_DIR}/.dockerignore" || fatal "Failed to set .dockerignore symlink" + cp "${THIS_DIR}/.dockerignore" "${DATAWAVE_SOURCE_DIR}/.dockerignore" || fatal "Failed to copy .dockerignore into place" sanityCheckTarball "${QUICKSTART_DIR}/bin/services/maven" "apache-maven*.tar.gz" "${DW_MAVEN_DIST_URI}" }