Repository: ORNL/DataFed (language: python)

Issue:
Joshua s brown patch 1



Discussion / hints:

Fix patch:
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index abde6985a..57a3dc820 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,15 +1,18 @@
 stages:
   - ci-infrastructure-check
-  - build-infrastructure
+  - trigger-infrastructure
   - signal
   - clear-docker-cache
   - build-deploy-base
   - provision-client
-  - build-unit-test-deploy
+  - build
   - end-to-end-setup
   - end-to-end-test
   - end-to-end-teardown
 
+variables:
+  HARBOR_USER: 'robot$$datafed+harbor_datafed_gitlab_ci_registry'
+  REGISTRY: 'camden.ornl.gov'
 ################################################################################
 # STAGE: ci-infrastructure-check
 ################################################################################
@@ -21,19 +24,31 @@ check-ci-infrastructure:
   tags:
     - datafed-infrastructure
   script:
-    - ./scripts/ci_pipeline_setup.sh --compute-instance-name "ci-datafed-arangodb"
-    - ./scripts/ci_pipeline_setup.sh --compute-instance-name "ci-datafed-core"
-    - ./scripts/ci_pipeline_setup.sh --compute-instance-name "ci-datafed-globus2"
-    - ./scripts/ci_pipeline_setup.sh --compute-instance-name "ci-datafed-client"
+    - |
+      BUILD_INFRASTRUCTURE="FALSE"
+      COMPUTE_INSTANCE_NAMES=("ci-datafed-arangodb" "ci-datafed-core" "ci-datafed-globus2" "ci-datafed-client")
+      for INSTANCE_NAME in "${COMPUTE_INSTANCE_NAMES[@]}"; do
+        if ! ./scripts/ci_pipeline_setup.sh --compute-instance-name "$INSTANCE_NAME"; then
+          BUILD_INFRASTRUCTURE="TRUE"
+        fi
+      done
+      if [ "$BUILD_INFRASTRUCTURE" == "TRUE" ]
+      then
+        cp gitlab_templates/build_ci_infrastructure.yml ci_infrastructure.yml
+      else
+        cp gitlab_templates/skip_ci_infrastructure.yml ci_infrastructure.yml
+      fi
   resource_group: infrastructure_build
+  artifacts:
+    paths:
+      - ci_infrastructure.yml 
 
 run-trigger-job:
-  stage: build-infrastructure
-  rules:
-    - when: on_failure
+  stage: trigger-infrastructure
   trigger:
-    project: 8f4/datafedci
-    branch: main
+    include:
+      - artifact: ci_infrastructure.yml
+        job: check-ci-infrastructure
     strategy: depend
   resource_group: infrastructure_build
 
@@ -65,7 +80,7 @@ clear-core-cache:
   tags:
     - ci_1
   script:
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
     - docker system prune -f
     - ./scripts/ci_purge_images.sh
 
@@ -75,7 +90,7 @@ clear-repo-cache:
   tags:
     - ci_3
   script:
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
     - docker system prune -f
     - ./scripts/ci_purge_images.sh
 
@@ -90,38 +105,39 @@ clear-repo-cache:
 # NOTE GitLab is set to remove images after a month, so they will be forced to
 # rebuild at least once a month.
 build-ws-base:
+  needs: ["clear-core-cache"]
   stage: build-deploy-base
   variables:
-    IMAGE_TAG: "dlsw/datafed/ws-base"
+    IMAGE_TAG: "datafed/ws-base"
     GIT_STRATEGY: clone
   tags:
     - ci-datafed-core
     - docker
   script:
     - docker system prune -f
-    - docker build -f web/docker/Dockerfile.web-base.ubuntu -t code.ornl.gov:4567/${IMAGE_TAG} .
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
-    - docker push code.ornl.gov:4567/dlsw/datafed/ws-base
+    - docker build -f web/docker/Dockerfile.web-base.ubuntu -t "${REGISTRY}/${IMAGE_TAG}" .
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
+    - docker push "${REGISTRY}/${IMAGE_TAG}"
 
 build-core-base:
   needs: ["clear-core-cache"]
   stage: build-deploy-base
   variables:
-    IMAGE_TAG: "dlsw/datafed/core-base"
+    IMAGE_TAG: "datafed/core-base"
     GIT_STRATEGY: clone
   tags:
     - ci-datafed-core
     - docker
   script:
     - docker system prune -f
-    - docker build -f core/docker/Dockerfile.core-base.ubuntu -t code.ornl.gov:4567/${IMAGE_TAG} .
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
-    - docker push code.ornl.gov:4567/dlsw/datafed/core-base
+    - docker build -f core/docker/Dockerfile.core-base.ubuntu -t "${REGISTRY}/${IMAGE_TAG}" .
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
+    - docker push "${REGISTRY}/${IMAGE_TAG}"
 
 build-repo-base:
   needs: ["clear-repo-cache"]
   variables:
-    IMAGE_TAG: "dlsw/datafed/repo-base"
+    IMAGE_TAG: "datafed/repo-base"
     GIT_STRATEGY: clone
   stage: build-deploy-base
   tags:
@@ -129,9 +145,9 @@ build-repo-base:
     - docker
   script:
     - docker system prune -f
-    - docker build -f repository/docker/Dockerfile.repo-base.ubuntu -t code.ornl.gov:4567/${IMAGE_TAG} .
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
-    - docker push code.ornl.gov:4567/dlsw/datafed/repo-base
+    - docker build -f repository/docker/Dockerfile.repo-base.ubuntu -t "${REGISTRY}/${IMAGE_TAG}" .
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
+    - docker push "${REGISTRY}/${IMAGE_TAG}"
 
 
 build-gcs-base:
@@ -140,9 +156,9 @@ build-gcs-base:
     GIT_SUBMODULE_STRATEGY: recursive
     GIT_STRATEGY: clone
     DISTRO: "ubuntu:focal"
-    GCS_TAG: "code.ornl.gov:4567/dlsw/datafed/gcs-ubuntu-focal"
-    IMAGE_TAG2: "dlsw/datafed/gcs-authz-base"
-    IMAGE_TAG3: "dlsw/datafed/gcs-authz"
+    GCS_TAG: "${REGISTRY}/datafed/gcs-ubuntu-focal"
+    IMAGE_TAG2: "datafed/gcs-authz-base"
+    IMAGE_TAG3: "datafed/gcs-authz"
   stage: build-deploy-base
   tags:
     - ci-datafed-globus
@@ -153,13 +169,13 @@ build-gcs-base:
     - ./docker-build-gcs.sh "${DISTRO}"
     - LATEST_IMAGE=$(docker images | grep ubuntu-focal | head -n1 | awk '{print $3}')
     - docker tag "$LATEST_IMAGE" "$GCS_TAG" 
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
     - docker push "$GCS_TAG"
     - cd ../../../ # back too root of project
-    - docker build -f repository/docker/Dockerfile.gcs-authz-base.ubuntu -t code.ornl.gov:4567/${IMAGE_TAG2} .
-    - docker push code.ornl.gov:4567/${IMAGE_TAG2}
-    - docker build -f repository/docker/Dockerfile.gcs-authz.ubuntu -t code.ornl.gov:4567/${IMAGE_TAG3} .
-    - docker push code.ornl.gov:4567/${IMAGE_TAG3}
+    - docker build -f repository/docker/Dockerfile.gcs-authz-base.ubuntu -t "${REGISTRY}/${IMAGE_TAG2}" .
+    - docker push "${REGISTRY}/${IMAGE_TAG2}"
+    - docker build -f repository/docker/Dockerfile.gcs-authz.ubuntu -t "${REGISTRY}/${IMAGE_TAG3}" .
+    - docker push "${REGISTRY}/${IMAGE_TAG3}"
 
 ################################################################################
 # STAGE: provision client
@@ -167,12 +183,14 @@ build-gcs-base:
 provision-client:
   needs: ["signal"]
   variables:
-    IMAGE_TAG: "dlsw/datafed/repo-base"
+    IMAGE_TAG: "datafed/repo-base"
     GIT_STRATEGY: clone
+    DATAFED_DEPENDENCIES_INSTALL_PATH: "${CI_PROJECT_DIR}/install"
   stage: provision-client
   tags:
     - ci-datafed-client
   script:
+    - ./scripts/generate_datafed.sh
     - ./scripts/install_client_dependencies.sh
 
 ################################################################################
@@ -180,10 +198,11 @@ provision-client:
 ################################################################################
 # Building containers for running services
 build-ws:
+  needs: ["build-ws-base"]
+  stage: build
   variables:
-    IMAGE_TAG: "dlsw/datafed/ws-"
+    IMAGE_TAG: "datafed/ws-"
     GIT_STRATEGY: clone
-  stage: build-unit-test-deploy
   tags:
     - ci-datafed-core
     - docker
@@ -194,23 +213,24 @@ build-ws:
         - web/*
         - common/proto/*
         - .gitlab-ci.yml
-      when: always
+      when: on_success
     - exists:
         - deploy-ws-base
-      when: always
+      when: on_success
   script:
     - BRANCH_LOWER=$(echo "$CI_COMMIT_REF_NAME" | tr '[:upper:]' '[:lower:]')
     - echo "$BRANCH_LOWER"
     - ./scripts/generate_datafed.sh
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
-    - docker build -f web/docker/Dockerfile.web.ubuntu -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" .
-    - docker push "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}"
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
+    - docker build -f web/docker/Dockerfile.web.ubuntu -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" .
+    - docker push "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}"
 
 build-core:
+  needs: ["build-core-base"]
+  stage: build
   variables:
-    IMAGE_TAG: "dlsw/datafed/core-"
+    IMAGE_TAG: "datafed/core-"
     GIT_STRATEGY: clone
-  stage: build-unit-test-deploy
   tags:
     - ci-datafed-core
     - docker
@@ -221,23 +241,24 @@ build-core:
         - common/*
         - core/*
         - .gitlab-ci.yml
-      when: always
+      when: on_success
   script:
     - BRANCH_LOWER=$(echo "$CI_COMMIT_REF_NAME" | tr '[:upper:]' '[:lower:]')
     - echo "$BRANCH_LOWER"
     - env
     - ./scripts/generate_datafed.sh
     - cat ./config/datafed.sh
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
-    - docker build -f core/docker/Dockerfile.core.ubuntu -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" .
-    - docker push "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}"
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
+    - docker build -f core/docker/Dockerfile.core.ubuntu -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" .
+    - docker push "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}"
 
 build-foxx:
+  stage: build
+  needs: ["signal"]
   variables:
     GIT_STRATEGY: clone
     DATAFED_DATABASE_PASSWORD: "${CI_DATAFED_DATABASE_PASSWORD}"
     DATAFED_ZEROMQ_SYSTEM_SECRET: "${CI_DATAFED_ZEROMQ_SYSTEM_SECRET}"
-  stage: build-unit-test-deploy
   tags:
     - ci-datafed-arango
   rules:
@@ -246,7 +267,7 @@ build-foxx:
         - scripts/*
         - core/database/*
         - .gitlab-ci.yml
-      when: always
+      when: on_success
   script:
     - arangod --version
     - sudo systemctl status arangodb3
@@ -269,9 +290,10 @@ build-foxx:
 
 build-repo:
   variables:
-    IMAGE_TAG: "dlsw/datafed/repo-"
+    IMAGE_TAG: "datafed/repo-"
     GIT_STRATEGY: clone
-  stage: build-unit-test-deploy
+  needs: ["build-repo-base"]
+  stage: build
   tags:
     - ci-datafed-repo
     - docker
@@ -282,20 +304,21 @@ build-repo:
         - common/*
         - repository/*
         - .gitlab-ci.yml
-      when: always
+      when: on_success
   script:
     - BRANCH_LOWER=$(echo "$CI_COMMIT_REF_NAME" | tr '[:upper:]' '[:lower:]')
     - echo "$BRANCH_LOWER"
     - ./scripts/generate_datafed.sh
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
-    - docker build -f repository/docker/Dockerfile.repo.ubuntu -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" .
-    - docker push "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}"
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
+    - docker build -f repository/docker/Dockerfile.repo.ubuntu -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" .
+    - docker push "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}"
 
 build-gcs-authz:
+  needs: ["build-gcs-base"]
+  stage: build
   variables:
-    IMAGE_TAG: "dlsw/datafed/gcs-authz-"
+    IMAGE_TAG: "datafed/gcs-authz-"
     GIT_STRATEGY: clone
-  stage: build-unit-test-deploy
   tags:
     - ci-datafed-globus
     - docker
@@ -303,9 +326,9 @@ build-gcs-authz:
     - BRANCH_LOWER=$(echo "$CI_COMMIT_REF_NAME" | tr '[:upper:]' '[:lower:]')
     - echo "$BRANCH_LOWER"
     - ./scripts/generate_datafed.sh
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
-    - docker build -f repository/docker/Dockerfile.gcs-authz.ubuntu -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" .
-    - docker push "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}"
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
+    - docker build -f repository/docker/Dockerfile.gcs-authz.ubuntu -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" .
+    - docker push "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}"
 
 ################################################################################
 # STAGE: Integration
@@ -313,7 +336,7 @@ build-gcs-authz:
 
 end-to-end-ws-setup:
   variables:
-    IMAGE_TAG: "dlsw/datafed/ws-"
+    IMAGE_TAG: "datafed/ws-"
     GIT_STRATEGY: clone
     HOST_LOG_FILE_PATH: "$CI_PROJECT_DIR/logs"
     CONTAINER_LOG_FILE_PATH: "/datafed/logs"
@@ -327,10 +350,10 @@ end-to-end-ws-setup:
     - mkdir -p "$HOST_LOG_FILE_PATH"
     - chown gitlab-runner "$HOST_LOG_FILE_PATH"
     - ./scripts/generate_datafed.sh
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
+    - docker login  "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
     - CERT_FILE_NAME=$(basename "${CI_DATAFED_WEB_CERT_PATH}")
     - KEY_FILE_NAME=$(basename "${CI_DATAFED_WEB_KEY_PATH}")
-    - ./scripts/container_stop.sh -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}"
+    - ./scripts/container_stop.sh -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}"
     - random_string=$(bash -c "cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w "10" | head -n 1")
     - >
       docker run -d
@@ -348,15 +371,15 @@ end-to-end-ws-setup:
       -v "${CI_DATAFED_CORE_PUB_KEY}:/source/install/keys/datafed-core-key.pub"
       -v "${CI_DATAFED_WEB_CERT_PATH}:/datafed/install/keys/${CERT_FILE_NAME}"
       -v "${CI_DATAFED_WEB_KEY_PATH}:/datafed/install/keys/${KEY_FILE_NAME}"
-      -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}"
+      -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}"
        </dev/null &>/dev/null &
-    - ./scripts/container_run_test.sh -e -c "1" -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" 
+    - ./scripts/container_run_test.sh -e -c "1" -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" 
 
 # Note here we use network=host to run the docker container this is
 # because we do not need it to communicate with an external port 
 end-to-end-core-setup:
   variables:
-    IMAGE_TAG: "dlsw/datafed/core-"
+    IMAGE_TAG: "datafed/core-"
     GIT_STRATEGY: clone
     HOST_LOG_FILE_PATH: "$CI_PROJECT_DIR/logs"
     CONTAINER_LOG_FILE_PATH: "/datafed/logs"
@@ -370,8 +393,8 @@ end-to-end-core-setup:
     - chown gitlab-runner "$HOST_LOG_FILE_PATH"
     - echo "$BRANCH_LOWER"
     - ./scripts/generate_datafed.sh
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
-    - ./scripts/container_stop.sh -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}"
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
+    - ./scripts/container_stop.sh -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}"
     - random_string=$(bash -c "cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w "10" | head -n 1")
     - >
       docker run -d
@@ -388,14 +411,14 @@ end-to-end-core-setup:
       -v "${HOST_LOG_FILE_PATH}:${CONTAINER_LOG_FILE_PATH}"
       -v "$CI_DATAFED_CORE_PUB_KEY":/source/install/keys/datafed-core-key.pub
       -v "$CI_DATAFED_CORE_PRIV_KEY":/source/install/keys/datafed-core-key.priv
-      -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" 
+      -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" 
        </dev/null &>/dev/null &
-    - ./scripts/container_run_test.sh -e -c "1" -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" 
+    - ./scripts/container_run_test.sh -e -c "1" -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" 
 
 
 end-to-end-repo-setup:
   variables:
-    IMAGE_TAG: "dlsw/datafed/repo-"
+    IMAGE_TAG: "datafed/repo-"
     GIT_STRATEGY: clone
     HOST_LOG_FILE_PATH: "$CI_PROJECT_DIR/logs"
     CONTAINER_LOG_FILE_PATH: "/datafed/logs"
@@ -409,8 +432,8 @@ end-to-end-repo-setup:
     - mkdir -p "$HOST_LOG_FILE_PATH"
     - chown gitlab-runner "$HOST_LOG_FILE_PATH"
     - ./scripts/generate_datafed.sh
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
-    - ./scripts/container_stop.sh -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}"
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
+    - ./scripts/container_stop.sh -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}"
     - random_string=$(bash -c "cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w "10" | head -n 1")
     - >
       docker run -d
@@ -423,13 +446,13 @@ end-to-end-repo-setup:
       -v "${HOST_LOG_FILE_PATH}:${CONTAINER_LOG_FILE_PATH}"
       -v "$CI_DATAFED_REPO_PUB_KEY":/source/install/keys/datafed-repo-key.pub
       -v "$CI_DATAFED_REPO_PRIV_KEY":/source/install/keys/datafed-repo-key.priv
-      -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" 
+      -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" 
        </dev/null &>/dev/null &
-    - ./scripts/container_run_test.sh -e -c "1" -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" 
+    - ./scripts/container_run_test.sh -e -c "1" -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" 
 
 end-to-end-gcs-authz-setup:
   variables:
-    IMAGE_TAG: "dlsw/datafed/gcs-authz-"
+    IMAGE_TAG: "datafed/gcs-authz-"
     HOST_LOG_FILE_PATH: "$CI_PROJECT_DIR/logs"
     CONTAINER_LOG_FILE_PATH: "/datafed/logs"
     GIT_STRATEGY: clone
@@ -443,8 +466,8 @@ end-to-end-gcs-authz-setup:
     - mkdir -p "$HOST_LOG_FILE_PATH"
     - chown gitlab-runner "$HOST_LOG_FILE_PATH"
     - ./scripts/generate_datafed.sh
-    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN code.ornl.gov:4567
-    - ./scripts/container_stop.sh -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}"
+    - docker login "${REGISTRY}" -u "${HARBOR_USER}" -p "${HARBOR_DATAFED_GITLAB_CI_REGISTRY}"
+    - ./scripts/container_stop.sh -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}"
     - random_string=$(bash -c "cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w "10" | head -n 1")
     - >
       docker run -d
@@ -457,9 +480,9 @@ end-to-end-gcs-authz-setup:
       -v "${HOST_LOG_FILE_PATH}:${CONTAINER_LOG_FILE_PATH}"
       -v "$CI_DATAFED_REPO_PUB_KEY":/source/install/keys/datafed-repo-key.pub
       -v "$CI_DATAFED_REPO_PRIV_KEY":/source/install/keys/datafed-repo-key.priv
-      -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" 
+      -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" 
        </dev/null &>/dev/null &
-    - ./scripts/container_run_test.sh -e -c "1" -t "code.ornl.gov:4567/${IMAGE_TAG}${BRANCH_LOWER}" 
+    - ./scripts/container_run_test.sh -e -c "1" -t "${REGISTRY}/${IMAGE_TAG}${BRANCH_LOWER}" 
 
 end-to-end-arango-setup:
   variables:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 10d75ac71..e01683530 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,8 @@
 4. [917] - Add additional files to .gitignore
 5. [915] - Refactor CI to use pipelines Gitlab feature along with pipelines 
 6. [927] - Add vim swp files to .gitignore
+7. [935] - Fixed CI branching with dynamic children, swiched to Harbor registry.
+   Moved Blake's files into the correct folders.
 
 # v2023.10.23.15.50
 
diff --git a/core/Dockerfile b/core/docker/Dockerfile
similarity index 95%
rename from core/Dockerfile
rename to core/docker/Dockerfile
index 82d9ee69d..79b0120f9 100644
--- a/core/Dockerfile
+++ b/core/docker/Dockerfile
@@ -1,3 +1,7 @@
+# NOTE this image must be built with respect to the base of the project i.e.
+# cd ${PROJECT_ROOT} or cd DataFed
+# docker build -f core/docker/Dockerfile .
+
 ARG           BUILD_BASE="ubuntu:focal"
 ARG         DEPENDENCIES="dependencies"
 ARG              RUNTIME="runtime"
diff --git a/core/docker/Dockerfile.core-base.ubuntu b/core/docker/Dockerfile.core-base.ubuntu
index d9a52aa66..9f3eed307 100644
--- a/core/docker/Dockerfile.core-base.ubuntu
+++ b/core/docker/Dockerfile.core-base.ubuntu
@@ -7,9 +7,11 @@ RUN mkdir -p ${BUILD_DIR}
 
 WORKDIR ${BUILD_DIR}
 
+COPY ./scripts/generate_datafed.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_install_functions.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_versions.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/install_core_dependencies.sh ${BUILD_DIR}/scripts/
 
 RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo && chmod +x /usr/bin/sudo
+RUN ${BUILD_DIR}/scripts/generate_datafed.sh
 RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_core_dependencies.sh
diff --git a/core/docker/Dockerfile.core.ubuntu b/core/docker/Dockerfile.core.ubuntu
index 666bbfa89..60a8891b5 100644
--- a/core/docker/Dockerfile.core.ubuntu
+++ b/core/docker/Dockerfile.core.ubuntu
@@ -1,4 +1,4 @@
-FROM code.ornl.gov:4567/dlsw/datafed/core-base:latest as build
+FROM camden.ornl.gov/datafed/core-base:latest as build
 
 ARG DATAFED_DIR="/datafed"
 ARG BUILD_DIR="/datafed/source"
diff --git a/doc_source/source/admin/general.rst b/doc_source/source/admin/general.rst
index 9b33e9d1e..1b9062e20 100644
--- a/doc_source/source/admin/general.rst
+++ b/doc_source/source/admin/general.rst
@@ -178,7 +178,7 @@ Building the compiling the core service::
                     -DBUILD_DOCS=False -DBUILD_PYTHON_CLIENT=False \
                     -DBUILD_FOXX=False
     cmake --build build --parallel 6
-    sudo cmake --build --target install
+    sudo cmake --build build --target install
 
 Example datafed-core.cfg file::
 
@@ -230,7 +230,7 @@ Building the web service::
                     -DBUILD_DOCS=False -DBUILD_PYTHON_CLIENT=False \
                     -DBUILD_FOXX=False
     cmake --build build --parallel 6
-    sudo cmake --build --target install
+    sudo cmake --build build --target install
 
 It should start automatically with an install but to run the web service, you
 can also interact with it via systemctl::
@@ -278,7 +278,7 @@ Building the repo service::
                     -DBUILD_DOCS=False -DBUILD_PYTHON_CLIENT=False \
                     -DBUILD_FOXX=False
     cmake --build build --parallel 6
-    sudo cmake --build --target install
+    sudo cmake --build build --target install
 
 It should start automatically with an install but to run the repo service, you
 can also interact with it via systemctl::
diff --git a/gitlab_templates/build_ci_infrastructure.yml b/gitlab_templates/build_ci_infrastructure.yml
new file mode 100644
index 000000000..8d79d3dbf
--- /dev/null
+++ b/gitlab_templates/build_ci_infrastructure.yml
@@ -0,0 +1,11 @@
+stages:
+  - build-infrastructure
+
+build-infrastructure-job:
+  stage: build-infrastructure
+  trigger:
+    project: dlsw/datafed/ci
+    branch: main
+    strategy: depend
+
+
diff --git a/gitlab_templates/skip_ci_infrastructure.yml b/gitlab_templates/skip_ci_infrastructure.yml
new file mode 100644
index 000000000..e4b3e9819
--- /dev/null
+++ b/gitlab_templates/skip_ci_infrastructure.yml
@@ -0,0 +1,10 @@
+stages:
+  - skip-infrastructure-build
+
+skip-build-infrastructure:
+  stage: skip-infrastructure-build
+  tags:
+    - datafed-infrastructure
+  script:
+    - echo "Infrastructure is already running!"
+
diff --git a/repository/Dockerfile b/repository/docker/Dockerfile
similarity index 95%
rename from repository/Dockerfile
rename to repository/docker/Dockerfile
index 49a286045..73a73ff47 100644
--- a/repository/Dockerfile
+++ b/repository/docker/Dockerfile
@@ -1,3 +1,7 @@
+# NOTE this image must be built with respect to the base of the project i.e.
+# cd ${PROJECT_ROOT} or cd DataFed
+# docker build -f repository/docker/Dockerfile .
+
 ARG           BUILD_BASE="ubuntu:focal"
 ARG         DEPENDENCIES="dependencies"
 ARG              RUNTIME="runtime"
diff --git a/repository/gcs.Dockerfile b/repository/docker/Dockerfile.gcs
similarity index 95%
rename from repository/gcs.Dockerfile
rename to repository/docker/Dockerfile.gcs
index a0d83aca3..7fd8604ac 100644
--- a/repository/gcs.Dockerfile
+++ b/repository/docker/Dockerfile.gcs
@@ -1,3 +1,6 @@
+# NOTE this image must be built with respect to the base of the project i.e.
+# cd ${PROJECT_ROOT} or cd DataFed
+# docker build -f repository/docker/Dockerfile.gcs .
 ARG           BUILD_BASE="ubuntu:focal"
 ARG         DEPENDENCIES="dependencies"
 ARG              RUNTIME="runtime"
@@ -43,11 +46,13 @@ RUN adduser --disabled-password --gecos "" datafed
 
 RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo && chmod +x /usr/bin/sudo
 
+COPY ./scripts/generate_datafed.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_versions.sh          ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_install_functions.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/install_authz_dependencies.sh   ${BUILD_DIR}/scripts/
 COPY ./scripts/copy_dependency.sh   ${BUILD_DIR}/scripts/
 
+RUN ${BUILD_DIR}/scripts/generate_datafed.sh
 RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_authz_dependencies.sh unify
 
 
@@ -56,7 +61,6 @@ RUN chown -R datafed:root ${DATAFED_DIR}
 
 COPY --chown=datafed:root ./scripts/dependency_versions.sh        ${BUILD_DIR}/scripts/
 COPY --chown=datafed:root ./scripts/generate_authz_config.sh      ${BUILD_DIR}/scripts/generate_authz_config.sh
-COPY --chown=datafed:root ./scripts/generate_datafed.sh           ${BUILD_DIR}/scripts/generate_datafed.sh
 COPY --chown=datafed:root ./CMakeLists.txt                        ${BUILD_DIR}
 COPY --chown=datafed:root ./cmake                                 ${BUILD_DIR}/cmake
 COPY --chown=datafed:root ./repository/CMakeLists.txt             ${BUILD_DIR}/repository/CMakeLists.txt
@@ -89,8 +93,6 @@ RUN ${BUILD_DIR}/scripts/copy_dependency.sh protoc to
 RUN ${BUILD_DIR}/scripts/copy_dependency.sh libzmq to
 RUN ${BUILD_DIR}/scripts/copy_dependency.sh libsodium to
 
-RUN ${BUILD_DIR}/scripts/generate_datafed.sh
-
 RUN ${BUILD_DIR}/scripts/generate_authz_config.sh &&	\
 	cmake -S. -B build						\
 		-DBUILD_REPO_SERVER=False		\
diff --git a/repository/docker/Dockerfile.gcs-authz-base.ubuntu b/repository/docker/Dockerfile.gcs-authz-base.ubuntu
index 73444ea20..fd62494e4 100644
--- a/repository/docker/Dockerfile.gcs-authz-base.ubuntu
+++ b/repository/docker/Dockerfile.gcs-authz-base.ubuntu
@@ -1,6 +1,4 @@
-#FROM code.ornl.gov:4567/dlsw/datafed/gcs-base:latest as build
-FROM code.ornl.gov:4567/dlsw/datafed/gcs-ubuntu-focal
-#FROM ubuntu:focal as build
+FROM camden.ornl.gov/datafed/gcs-ubuntu-focal
 
 ARG DATAFED_DIR="/datafed"
 ARG BUILD_DIR="/datafed/source"
@@ -9,11 +7,13 @@ RUN mkdir -p ${BUILD_DIR}
 
 WORKDIR ${BUILD_DIR}
 
+COPY ./scripts/generate_datafed.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_versions.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_install_functions.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/install_authz_dependencies.sh ${BUILD_DIR}/scripts/
 
 RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo && chmod +x /usr/bin/sudo
+RUN ${BUILD_DIR}/scripts/generate_datafed.sh
 RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_authz_dependencies.sh
 
 
diff --git a/repository/docker/Dockerfile.gcs-authz.ubuntu b/repository/docker/Dockerfile.gcs-authz.ubuntu
index c069458a4..56ec69e2d 100644
--- a/repository/docker/Dockerfile.gcs-authz.ubuntu
+++ b/repository/docker/Dockerfile.gcs-authz.ubuntu
@@ -1,4 +1,4 @@
-FROM code.ornl.gov:4567/dlsw/datafed/gcs-authz-base:latest as build
+FROM camden.ornl.gov/datafed/gcs-authz-base:latest as build
 
 ARG DATAFED_DIR="/datafed"
 ARG BUILD_DIR="/datafed/source"
diff --git a/repository/docker/Dockerfile.gcs-base.ubuntu b/repository/docker/Dockerfile.gcs-base.ubuntu
index f4ac21c05..3456a0906 100644
--- a/repository/docker/Dockerfile.gcs-base.ubuntu
+++ b/repository/docker/Dockerfile.gcs-base.ubuntu
@@ -7,8 +7,10 @@ RUN mkdir -p ${BUILD_DIR}
 
 WORKDIR ${BUILD_DIR}
 
+COPY ./scripts/generate_datafed.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_versions.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/install_gcs.sh ${BUILD_DIR}/scripts/
 
 RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo && chmod +x /usr/bin/sudo
+RUN ${BUILD_DIR}/scripts/generate_datafed.sh
 RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_gcs.sh
diff --git a/repository/docker/Dockerfile.repo-base.ubuntu b/repository/docker/Dockerfile.repo-base.ubuntu
index 6bce6e39d..4c6b40d21 100644
--- a/repository/docker/Dockerfile.repo-base.ubuntu
+++ b/repository/docker/Dockerfile.repo-base.ubuntu
@@ -7,9 +7,11 @@ RUN mkdir -p ${BUILD_DIR}/repository/server
 
 WORKDIR ${BUILD_DIR}
 
+COPY ./scripts/generate_datafed.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_versions.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_install_functions.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/install_repo_dependencies.sh ${BUILD_DIR}/scripts/
 
 RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo && chmod +x /usr/bin/sudo
+RUN ${BUILD_DIR}/scripts/generate_datafed.sh
 RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_repo_dependencies.sh
diff --git a/repository/docker/Dockerfile.repo.ubuntu b/repository/docker/Dockerfile.repo.ubuntu
index 65ea2c049..4e663c37d 100644
--- a/repository/docker/Dockerfile.repo.ubuntu
+++ b/repository/docker/Dockerfile.repo.ubuntu
@@ -1,4 +1,4 @@
-FROM code.ornl.gov:4567/dlsw/datafed/repo-base:latest as build
+FROM camden.ornl.gov/datafed/repo-base:latest as build
 
 ARG DATAFED_DIR="/datafed"
 ARG BUILD_DIR="/datafed/source"
diff --git a/scripts/dependency_install_functions.sh b/scripts/dependency_install_functions.sh
index c464572cd..1699548f5 100644
--- a/scripts/dependency_install_functions.sh
+++ b/scripts/dependency_install_functions.sh
@@ -8,6 +8,18 @@ apt_file_path="/tmp/apt_deps"
 # these are the dependencies to be installed and built via cmake
 ext_file_path="/tmp/ext_deps"
 
+if [ ! -e "${PROJECT_ROOT}/config/datafed.sh" ]
+then
+  echo "Please run generate_datafed.sh before installing dependencies"
+  exit 1
+fi
+
+source "${PROJECT_ROOT}/config/datafed.sh"
+
+if [ ! -e "$DATAFED_DEPENDENCIES_INSTALL_PATH" ] || [ ! -d "$DATAFED_DEPENDENCIES_INSTALL_PATH" ]; then
+    mkdir -p "$DATAFED_DEPENDENCIES_INSTALL_PATH"
+fi
+
 install_cmake() {
   if [ ! -e ".cmake_installed-${DATAFED_CMAKE_VERSION}" ]; then
     wget https://github.com/Kitware/CMake/releases/download/v${DATAFED_CMAKE_VERSION}/cmake-${DATAFED_CMAKE_VERSION}-Linux-x86_64.tar.gz
@@ -149,6 +161,56 @@ install_gcs() {
   fi
 }
 
+install_nvm() {
+  # By default this will place NVM in $HOME/.nvm
+  if [ ! -e ".nvm_installed-${DATAFED_NVM_VERSION}" ]; then
+    # By setting NVM_DIR beforehand when the scirpt is run it 
+    # will use it to set the install path
+    export NVM_DIR="${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm"
+    mkdir -p "${NVM_DIR}"
+    curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/${DATAFED_NVM_VERSION}/install.sh" | bash
+    # Mark nvm as installed
+    touch ".nvm_installed-${DATAFED_NVM_VERSION}"
+  fi
+}
+
+install_node() {
+  # By default this will place NVM in $HOME/.nvm
+  if [ ! -e ".nvm_installed-${DATAFED_NVM_VERSION}" ]; then
+    echo "You must first install nvm before installing node."
+    exit 1
+  fi
+  if [ ! -e ".node_installed-${DATAFED_NODE_VERSION}" ]; then
+
+    export NVM_DIR="${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm"
+
+    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
+    nvm install "$DATAFED_NODE_VERSION"
+    # Mark node as installed
+    touch ".node_installed-${DATAFED_NODE_VERSION}"
+  fi
+}
+
+install_foxx_cli() {
+  if [ ! -e ".nvm_installed-${DATAFED_NVM_VERSION}" ]; then
+    echo "You must first install nvm before installing foxx_cli."
+    exit 1
+  fi
+  if [ ! -e ".node_installed-${DATAFED_NODE_VERSION}" ]; then
+    echo "You must first install node before installing foxx_cli"
+    exit 1
+  fi
+  # By default this will place NVM in $HOME/.nvm
+  if [ ! -e ".foxx_cli_installed" ]; then
+    export NVM_DIR="${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm"
+    [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
+    export NODE_VERSION="$DATAFED_NODE_VERSION"
+    "$NVM_DIR/nvm-exec" npm install --global foxx-cli --prefix "${DATAFED_DEPENDENCIES_INSTALL_PATH}/npm"
+    # Mark foxx_cli as installed
+    touch ".foxx_cli_installed"
+  fi
+}
+
 install_arangodb() {
   curl -OL https://download.arangodb.com/arangodb38/DEBIAN/Release.key
   sudo apt-key add - < Release.key
diff --git a/scripts/dependency_versions.sh b/scripts/dependency_versions.sh
index 884179b73..91a2cdb9c 100644
--- a/scripts/dependency_versions.sh
+++ b/scripts/dependency_versions.sh
@@ -11,7 +11,7 @@ DATAFED_LIBZMQ_VERSION="4.3.4"
 # this version is different from above due to the fact libzmq names its shared library diffrently than the actual api version
 DATAFED_LIB_LIBZMQ_VERSION="5.2.4"
 DATAFED_NODE_VERSION="v14.21.3"
-DATAFED_NVM_VERSION="v13.14.0"
+DATAFED_NVM_VERSION="v0.39.7"
 DATAFED_PROTOBUF_VERSION="3.17.3"
 DATAFED_FULL_PROTOBUF_VERSION="3.17.3.0"
 DATAFED_LIBCURL="7.68.0"
diff --git a/scripts/generate_datafed.sh b/scripts/generate_datafed.sh
index 4ba27a1c8..1e53c704a 100755
--- a/scripts/generate_datafed.sh
+++ b/scripts/generate_datafed.sh
@@ -18,6 +18,15 @@ else
   local_DATAFED_INSTALL_PATH=$(printenv DATAFED_INSTALL_PATH)
 fi
 
+# This is a build config variable
+local_DATAFED_DEPENDENCIES_INSTALL_PATH=""
+if [ -z "${DATAFED_DEPENDENCIES_INSTALL_PATH}" ]
+then
+  local_DATAFED_DEPENDENCIES_INSTALL_PATH="/opt/datafed/dependencies"
+else
+  local_DATAFED_DEPENDENCIES_INSTALL_PATH=$(printenv DATAFED_DEPENDENCIES_INSTALL_PATH)
+fi
+
 local_DATAFED_DEFAULT_LOG_PATH=""
 if [ -z "${DATAFED_DEFAULT_LOG_PATH}" ]
 then
@@ -171,6 +180,10 @@ export DATAFED_DEFAULT_LOG_PATH="$local_DATAFED_DEFAULT_LOG_PATH"
 # by default it will install to:
 # /opt/datafed
 export DATAFED_INSTALL_PATH="$local_DATAFED_INSTALL_PATH"
+# This is the folder where datafed dependencies will be installed
+# by default it will install to:
+# /opt/datafed/dependencies
+export DATAFED_DEPENDENCIES_INSTALL_PATH="$local_DATAFED_DEPENDENCIES_INSTALL_PATH"
 # ************************************************
 # Env Variables for Core & Web Server
 # ************************************************
diff --git a/scripts/install_foxx.sh b/scripts/install_foxx.sh
index 84023f9e7..09ad12519 100755
--- a/scripts/install_foxx.sh
+++ b/scripts/install_foxx.sh
@@ -7,8 +7,9 @@ set -f -o pipefail
 SCRIPT=$(realpath "$0")
 SOURCE=$(dirname "$SCRIPT")
 PROJECT_ROOT=$(realpath ${SOURCE}/..)
-source ${PROJECT_ROOT}/config/datafed.sh
-source ${SOURCE}/dependency_versions.sh
+source "${PROJECT_ROOT}/config/datafed.sh"
+source "${SOURCE}/dependency_versions.sh"
+source "${SOURCE}/dependency_install_functions.sh"
 
 Help()
 {
@@ -240,34 +241,24 @@ actual_version=$(node --version)
 semantic_version_compatible "$actual_version" "$DATAFED_NODE_VERSION"
 compatible=$?
 
-if [ "$compatible" -eq "0" ]
-then
+#if [ "$compatible" -eq "0" ]
+#then
   # 1. Install nvm which will allow us to update node
-  if [ ! -d "$HOME/.nvm" ]
-  then
-    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
-  fi
-
-  export NVM_DIR="$HOME/.nvm"
-  [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
-
-  nvm install "$DATAFED_NODE_VERSION"
-  nvm use "$DATAFED_NODE_VERSION"
-
-  # Install foxx service node module
-  "$NVM_DIR/nvm-exec" npm install --global foxx-cli --prefix ~/
-else 
+install_nvm
+install_node
+install_foxx_cli
+#else 
   # We are assuming that if the correct version of node is installed then the
   # correct version of npm is also installed
-  npm install --global foxx-cli --prefix ~/
-fi
+#  npm install --global foxx-cli --prefix ~/
+#fi
 
 FOXX_PREFIX=""
 {
 	# Determine if exists globally first
 	which foxx
 } || {
-	FOXX_PREFIX="~/bin/"
+	FOXX_PREFIX="${NPM_CONFIG_PREFIX}/bin/"
 }
 
 PATH_TO_PASSWD_FILE="${SOURCE}/database_temp.password"
diff --git a/scripts/install_ws_dependencies.sh b/scripts/install_ws_dependencies.sh
index d8c8b73bf..1d1d425a1 100755
--- a/scripts/install_ws_dependencies.sh
+++ b/scripts/install_ws_dependencies.sh
@@ -20,11 +20,15 @@ Help()
   echo "Syntax: $(basename $0) [-h|n]"
   echo "options:"
   echo "-h, --help                        Print this help message"
-  echo "-n, --node_install_dir            Install directory, defaults to $HOME"
+  echo "-n, --node_install_dir            Install directory, defaults to"
+  echo "                                  whatever is defined in the datafed.sh file"
+  echo "                                  DATAFED_DEPENDENCIES_INSTALL_PATH"
+  echo "                                  ${DATAFED_DEPENDENCIES_INSTALL_PATH}"
   echo "-u, --unify                       Unifies install scripts to be used in docker builds"
 }
 
-local_NODE_INSTALL="$HOME"
+# Equivalent to the .nvm directory
+local_NODE_INSTALL="$DATAFED_DEPENDENCIES_INSTALL_PATH"
 local_UNIFY=false
 
 VALID_ARGS=$(getopt -o hn: --long 'help',node_install_dir: -- "$@")
@@ -72,21 +76,9 @@ fi
 # but instead will install ourselves
 
 # 1. Install nvm which will allow us to update node
-if [[ -z "$NVM_DIR" ]];
-then
-  export NVM_DIR="$local_NODE_INSTALL/.nvm"
-fi
-
-if [ ! -d "$NVM_DIR" ]
-then
-  echo "==========INSTALLING NVM============"
-  mkdir -p "$NVM_DIR"
-  curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
-fi
-
-[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
-
-nvm install $DATAFED_NODE_VERSION
-nvm use $DATAFED_NODE_VERSION
+install_nvm
+install_node
 
-npm --prefix ${PROJECT_ROOT}/web install ${PROJECT_ROOT}/web
+export NVM_DIR="${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm"
+export NODE_VERSION="$DATAFED_NODE_VERSION"
+"$NVM_DIR/nvm-exec" npm --prefix "${PROJECT_ROOT}/web" install "${PROJECT_ROOT}/web"
diff --git a/web/Dockerfile b/web/docker/Dockerfile
similarity index 95%
rename from web/Dockerfile
rename to web/docker/Dockerfile
index 9f5da62e0..a8c3f1609 100644
--- a/web/Dockerfile
+++ b/web/docker/Dockerfile
@@ -1,3 +1,6 @@
+# NOTE this image must be built with respect to the base of the project i.e.
+# cd ${PROJECT_ROOT} or cd DataFed
+# docker build -f web/docker/Dockerfile .
 ARG           BUILD_BASE="ubuntu:focal"
 ARG         DEPENDENCIES="dependencies"
 ARG              RUNTIME="runtime"
diff --git a/web/docker/Dockerfile.web-base.ubuntu b/web/docker/Dockerfile.web-base.ubuntu
index 49bb16cb1..b504c455f 100644
--- a/web/docker/Dockerfile.web-base.ubuntu
+++ b/web/docker/Dockerfile.web-base.ubuntu
@@ -8,12 +8,14 @@ RUN mkdir -p ${BUILD_DIR}/common/proto
 
 WORKDIR ${BUILD_DIR}
 
+COPY ./scripts/generate_datafed.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_install_functions.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/dependency_versions.sh ${BUILD_DIR}/scripts/
 COPY ./scripts/install_ws_dependencies.sh ${BUILD_DIR}/scripts/
 
 # Docker dependency
 RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo && chmod +x /usr/bin/sudo
+RUN ${BUILD_DIR}/scripts/generate_datafed.sh
 RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC ${BUILD_DIR}/scripts/install_ws_dependencies.sh -n "${DATAFED_DIR}"
 
 RUN echo "web-base complete"
diff --git a/web/docker/Dockerfile.web.ubuntu b/web/docker/Dockerfile.web.ubuntu
index 97404c7b2..ff4c5c0f5 100644
--- a/web/docker/Dockerfile.web.ubuntu
+++ b/web/docker/Dockerfile.web.ubuntu
@@ -1,4 +1,4 @@
-FROM code.ornl.gov:4567/dlsw/datafed/ws-base:latest as build
+FROM camden.ornl.gov/datafed/ws-base:latest as build
 
 ARG DATAFED_DIR="/datafed"
 ARG BUILD_DIR="/datafed/source"


Test patch:
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index 0e6f4e016..4b6eede64 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -10,6 +10,7 @@ jobs:
         run: sudo apt-get update
       - name: Install dependencies
         run: |
+          ./scripts/generate_datafed.sh
           sudo ./scripts/install_core_dependencies.sh
           ./scripts/generate_datafed.sh
       - name: Build