From 89268a528b912c9078b8f22f579bd897217822d4 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 19:25:55 -0800 Subject: [PATCH 01/36] Update the script for deploy and tweak the docker compose file for the client's server needs --- bin/deploy-hykudev.sh | 85 +++++++++++++++++++++++++++++++++++++++++ bin/submodule-update.sh | 53 ------------------------- deploy-hykudev.sh | 60 ----------------------------- docker-compose.yml | 5 ++- 4 files changed, 89 insertions(+), 114 deletions(-) create mode 100755 bin/deploy-hykudev.sh delete mode 100755 bin/submodule-update.sh delete mode 100755 deploy-hykudev.sh diff --git a/bin/deploy-hykudev.sh b/bin/deploy-hykudev.sh new file mode 100755 index 0000000..7cd2fbe --- /dev/null +++ b/bin/deploy-hykudev.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash +set -euo pipefail + +## Instructions: +## 0. Alias is already created and persisted at ~/.bashrc: +## alias dc='dotenv -e .env.development docker-compose' +## 1. Connect to WVU VPN via The Windows App +## 2. Connect via PuTTY to hykudev server: hykudev.lib.wvu.edu with your user name +## 3. Switch to ansible: sudo su - ansible +## 4. cd wvu_knapsack +## 5. ./deploy_hykudev.sh [optional-branch-name] + +PROJECT_ROOT="/home/ansible/wvu_knapsack" +HYRAX_APP_DIR="$PROJECT_ROOT/hyrax-webapp" +RESTORE_FILES=("Gemfile.lock" "config/metadata_profiles/m3_profile.yaml") + +log() { echo -e "$1"; } +die() { echo -e "โŒ $1" >&2; exit 1; } + +log "๐Ÿ“ Switching to project root..." +cd "$PROJECT_ROOT" || die "Project root not found: $PROJECT_ROOT" + +# --- prereq checks --- +command -v git >/dev/null 2>&1 || die "git not found on PATH" +command -v dc >/dev/null 2>&1 || die "'dc' command not found. Ensure your alias is loaded (source ~/.bashrc) and dotenv is installed." +git rev-parse --is-inside-work-tree >/dev/null 2>&1 || die "Not a git repository: $PROJECT_ROOT" + +BRANCH="${1:-$(git rev-parse --abbrev-ref HEAD)}" +log "๐Ÿ“Œ Deploying branch: $BRANCH" + +log "๐Ÿ”Ž Fetching latest refs..." +git fetch --all --prune + +# Ensure we have the branch locally; if not, try to track origin/ +if ! git show-ref --verify --quiet "refs/heads/$BRANCH"; then + if git show-ref --verify --quiet "refs/remotes/origin/$BRANCH"; then + log "๐ŸŒฟ Creating local branch '$BRANCH' tracking origin/$BRANCH..." + git checkout -b "$BRANCH" "origin/$BRANCH" + else + die "Branch '$BRANCH' not found locally or on origin." + fi +else + git checkout "$BRANCH" +fi + +log "๐Ÿ”„ Pulling latest code for '$BRANCH'..." +git pull --ff-only origin "$BRANCH" || die "Failed to pull branch '$BRANCH' (non-fast-forward?)." + +# If you *always* want main updates too, keep this; otherwise remove it. +if [ "$BRANCH" != "main" ]; then + log "โ„น๏ธ Note: You're deploying '$BRANCH'. If this branch needs new commits from 'main', merge/rebase it before deploying." +fi + +log "๐Ÿ“ฆ Syncing & updating submodules..." +git submodule sync --recursive +git submodule update --init --recursive --remote + +log "๐Ÿท๏ธ Updating TAG to latest commit SHA..." +TAG="$(git rev-parse --short=8 HEAD)" +export TAG +log "๐Ÿ”– TAG: $TAG" + +log "๐Ÿงน Stopping and cleaning up old containers..." +dc down --remove-orphans + +log "๐Ÿ”„ Resetting selected files to match repository..." +if [ -d "$HYRAX_APP_DIR" ]; then + cd "$HYRAX_APP_DIR" + git restore "${RESTORE_FILES[@]}" || die "Failed to restore one or more files in hyrax-webapp." + cd "$PROJECT_ROOT" +else + die "Expected directory not found: $HYRAX_APP_DIR" +fi + +log "๐Ÿณ Pulling latest Docker images..." +dc pull + +log "๐Ÿš€ Building and starting containers..." +dc build solr +dc up -d web + +log "โœ… Deploy complete. Containers are now running image tagged: $TAG" +log "" +log "๐Ÿ”— Admin Tenant: https://hykudev-admin.lib.wvu.edu" +log "๐Ÿ”— Default Tenant: https://hykudev.lib.wvu.edu" diff --git a/bin/submodule-update.sh b/bin/submodule-update.sh deleted file mode 100755 index 09c7f32..0000000 --- a/bin/submodule-update.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -# Hyku Submodule Setup Script -# -# Usage: -# bin/submodule_update.sh # Use latest main -# bin/submodule_update.sh abcdef12 # Use a specific commit SHA -# bin/submodule_update.sh v1.2.3 # Use a tag -# bin/submodule_update.sh my-feature # Use a branch - -TARGET_REF="${1:-}" - -# Ensure submodule is initialized -git submodule update --init hyrax-webapp - -cd hyrax-webapp - -if [[ -n "$TARGET_REF" ]]; then - echo "Checking out specified ref: $TARGET_REF" - git fetch origin - git checkout "$TARGET_REF" -else - echo "Checking out latest main" - git checkout main - git pull origin main -fi - -# Get short SHA for tagging -BASE_TAG=$(git rev-parse --short=8 HEAD) -cd .. - -# Write BASE_TAG to .env (which docker-compose auto-loads) -echo "Setting BASE_TAG=$BASE_TAG in .env" - -touch .env -if grep -q '^BASE_TAG=' .env; then - # Replace existing BASE_TAG line safely - awk -v new_tag="BASE_TAG=$BASE_TAG" ' - BEGIN { updated=0 } - /^BASE_TAG=/ { print new_tag; updated=1; next } - { print } - END { if (!updated) print new_tag } - ' .env > .env.tmp && mv .env.tmp .env -else - echo "BASE_TAG=$BASE_TAG" >> .env -fi - - -echo "BASE_TAG written to .env" -echo -echo "Setup complete. You can now run:" -echo " docker compose build" \ No newline at end of file diff --git a/deploy-hykudev.sh b/deploy-hykudev.sh deleted file mode 100755 index 4cef32f..0000000 --- a/deploy-hykudev.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -set -e - -## Instructions: -## 1. Connect to WVU VPN via The Windows App -## 2. SSH into the VM: ssh user_name@hykudev.lib.wvu.edu -## 3. Switch to ansible: sudo su - ansible -## 4. cd wvu_knapsack -## 5. ./deploy_hykudev.sh [optional-branch-name] - - - -echo "๐Ÿ“ Switching to project root..." -cd /home/ansible/wvu_knapsack - -BRANCH="${1:-$(git rev-parse --abbrev-ref HEAD)}" -echo "๐Ÿ“Œ Using branch: $BRANCH" - -if [ "$BRANCH" != "main" ]; then - echo "๐Ÿ”„ Pulling latest code from 'main'..." - git pull origin main - echo "๐Ÿ”„ Also pulling latest code from branch '$BRANCH'..." - git pull origin "$BRANCH" -else - echo "๐Ÿ”„ Pulling latest code from 'main'..." - git pull origin main -fi - -echo "๐Ÿ“ฆ Updating submodules..." -git submodule update --remote - -echo "๐Ÿท๏ธ Updating TAG to latest commit SHA..." -TAG=$(git rev-parse --short=8 HEAD) - -# Check the .env for a TAG and delete it then add new TAG -sed -i '/^TAG=/d' /home/ansible/wvu_knapsack/.env.development -echo "TAG=$TAG" >> /home/ansible/wvu_knapsack/.env.development -export TAG -echo "Tag is: $TAG" - -echo "๐Ÿงน Stopping and cleaning up old containers..." -docker compose down --remove-orphans - -echo "๐Ÿ”„ Resetting Gemfile.lock and m3_profile.yaml to match repository..." -cd /home/ansible/wvu_knapsack/hyrax-webapp -git restore Gemfile.lock config/metadata_profiles/m3_profile.yaml -cd .. - -echo "๐Ÿณ Pulling latest Docker images..." -docker compose pull - -echo "๐Ÿš€ Recreating containers from latest image..." -docker compose build -docker compose up -d - -echo "โœ… Deploy complete. Containers are now running image tagged: $TAG" -echo "" -echo "๐Ÿ”— Admin Tenant: https://hykudev-admin.lib.wvu.edu" -echo "๐Ÿ”— Default Tenant: https://hykudev.lib.wvu.edu" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 9458462..7e3d9b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,8 +49,9 @@ services: file: hyrax-webapp/docker-compose.yml service: zoo + solr: - image: ghcr.io/notch8/wvu_knapsack/solr:${TAG:-latest} + image: ghcr.io/samvera/hyku/solr:${TAG:-latest} extends: file: hyrax-webapp/docker-compose.yml service: solr @@ -79,6 +80,8 @@ services: extends: file: hyrax-webapp/docker-compose.yml service: web + ports: + - "127.0.0.1:3000:3000" # Uncomment command to access container with out starting bin/web. Useful for debugging or updating Gemfile.lock # command: sleep infinity From 148e0ae778e8dba003df4c825345d8c1b6a7c1a7 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 19:40:43 -0800 Subject: [PATCH 02/36] Update script --- bin/deploy-hykudev.sh | 58 ++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 40 deletions(-) diff --git a/bin/deploy-hykudev.sh b/bin/deploy-hykudev.sh index 7cd2fbe..138091f 100755 --- a/bin/deploy-hykudev.sh +++ b/bin/deploy-hykudev.sh @@ -2,7 +2,7 @@ set -euo pipefail ## Instructions: -## 0. Alias is already created and persisted at ~/.bashrc: +## 0. Alias was already created and persisted at ~/.bashrc: ## alias dc='dotenv -e .env.development docker-compose' ## 1. Connect to WVU VPN via The Windows App ## 2. Connect via PuTTY to hykudev server: hykudev.lib.wvu.edu with your user name @@ -12,74 +12,52 @@ set -euo pipefail PROJECT_ROOT="/home/ansible/wvu_knapsack" HYRAX_APP_DIR="$PROJECT_ROOT/hyrax-webapp" -RESTORE_FILES=("Gemfile.lock" "config/metadata_profiles/m3_profile.yaml") log() { echo -e "$1"; } die() { echo -e "โŒ $1" >&2; exit 1; } -log "๐Ÿ“ Switching to project root..." cd "$PROJECT_ROOT" || die "Project root not found: $PROJECT_ROOT" -# --- prereq checks --- +# Basic prereqs (keep it simple) +command -v dc >/dev/null 2>&1 || die "'dc' not found. Make sure your alias is loaded (source ~/.bashrc)." command -v git >/dev/null 2>&1 || die "git not found on PATH" -command -v dc >/dev/null 2>&1 || die "'dc' command not found. Ensure your alias is loaded (source ~/.bashrc) and dotenv is installed." -git rev-parse --is-inside-work-tree >/dev/null 2>&1 || die "Not a git repository: $PROJECT_ROOT" BRANCH="${1:-$(git rev-parse --abbrev-ref HEAD)}" log "๐Ÿ“Œ Deploying branch: $BRANCH" -log "๐Ÿ”Ž Fetching latest refs..." git fetch --all --prune -# Ensure we have the branch locally; if not, try to track origin/ -if ! git show-ref --verify --quiet "refs/heads/$BRANCH"; then - if git show-ref --verify --quiet "refs/remotes/origin/$BRANCH"; then - log "๐ŸŒฟ Creating local branch '$BRANCH' tracking origin/$BRANCH..." - git checkout -b "$BRANCH" "origin/$BRANCH" - else - die "Branch '$BRANCH' not found locally or on origin." - fi -else +# Checkout branch (create local tracking branch if needed) +if git show-ref --verify --quiet "refs/heads/$BRANCH"; then git checkout "$BRANCH" +elif git show-ref --verify --quiet "refs/remotes/origin/$BRANCH"; then + git checkout -b "$BRANCH" "origin/$BRANCH" +else + die "Branch '$BRANCH' not found locally or on origin." fi -log "๐Ÿ”„ Pulling latest code for '$BRANCH'..." -git pull --ff-only origin "$BRANCH" || die "Failed to pull branch '$BRANCH' (non-fast-forward?)." - -# If you *always* want main updates too, keep this; otherwise remove it. -if [ "$BRANCH" != "main" ]; then - log "โ„น๏ธ Note: You're deploying '$BRANCH'. If this branch needs new commits from 'main', merge/rebase it before deploying." -fi +git pull --ff-only origin "$BRANCH" || die "Failed to pull '$BRANCH' (non-fast-forward?)" -log "๐Ÿ“ฆ Syncing & updating submodules..." +log "๐Ÿ“ฆ Updating submodules..." git submodule sync --recursive git submodule update --init --recursive --remote -log "๐Ÿท๏ธ Updating TAG to latest commit SHA..." TAG="$(git rev-parse --short=8 HEAD)" export TAG log "๐Ÿ”– TAG: $TAG" -log "๐Ÿงน Stopping and cleaning up old containers..." +log "๐Ÿงน Restarting containers..." dc down --remove-orphans -log "๐Ÿ”„ Resetting selected files to match repository..." -if [ -d "$HYRAX_APP_DIR" ]; then - cd "$HYRAX_APP_DIR" - git restore "${RESTORE_FILES[@]}" || die "Failed to restore one or more files in hyrax-webapp." - cd "$PROJECT_ROOT" -else - die "Expected directory not found: $HYRAX_APP_DIR" -fi +log "๐Ÿ”„ Restoring lock/profile files..." +cd "$HYRAX_APP_DIR" || die "Expected directory not found: $HYRAX_APP_DIR" +git restore Gemfile.lock config/metadata_profiles/m3_profile.yaml +cd "$PROJECT_ROOT" -log "๐Ÿณ Pulling latest Docker images..." +log "๐Ÿณ Pull / build / start..." dc pull - -log "๐Ÿš€ Building and starting containers..." -dc build solr dc up -d web -log "โœ… Deploy complete. Containers are now running image tagged: $TAG" -log "" +log "โœ… Deploy complete (TAG: $TAG)" log "๐Ÿ”— Admin Tenant: https://hykudev-admin.lib.wvu.edu" log "๐Ÿ”— Default Tenant: https://hykudev.lib.wvu.edu" From 7615e601945f7eb09ba18c9ffe5e349352fdee24 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 19:44:07 -0800 Subject: [PATCH 03/36] Update script --- bin/deploy-hykudev.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/bin/deploy-hykudev.sh b/bin/deploy-hykudev.sh index 138091f..e7fa769 100755 --- a/bin/deploy-hykudev.sh +++ b/bin/deploy-hykudev.sh @@ -18,7 +18,6 @@ die() { echo -e "โŒ $1" >&2; exit 1; } cd "$PROJECT_ROOT" || die "Project root not found: $PROJECT_ROOT" -# Basic prereqs (keep it simple) command -v dc >/dev/null 2>&1 || die "'dc' not found. Make sure your alias is loaded (source ~/.bashrc)." command -v git >/dev/null 2>&1 || die "git not found on PATH" @@ -27,7 +26,6 @@ log "๐Ÿ“Œ Deploying branch: $BRANCH" git fetch --all --prune -# Checkout branch (create local tracking branch if needed) if git show-ref --verify --quiet "refs/heads/$BRANCH"; then git checkout "$BRANCH" elif git show-ref --verify --quiet "refs/remotes/origin/$BRANCH"; then @@ -38,6 +36,11 @@ fi git pull --ff-only origin "$BRANCH" || die "Failed to pull '$BRANCH' (non-fast-forward?)" +if [ -d "$HYRAX_APP_DIR" ]; then + log "๐Ÿ”„ Restoring known files in hyrax-webapp (pre-submodule update)..." + git -C "$HYRAX_APP_DIR" restore Gemfile.lock config/metadata_profiles/m3_profile.yaml 2>/dev/null || true +fi + log "๐Ÿ“ฆ Updating submodules..." git submodule sync --recursive git submodule update --init --recursive --remote @@ -48,13 +51,6 @@ log "๐Ÿ”– TAG: $TAG" log "๐Ÿงน Restarting containers..." dc down --remove-orphans - -log "๐Ÿ”„ Restoring lock/profile files..." -cd "$HYRAX_APP_DIR" || die "Expected directory not found: $HYRAX_APP_DIR" -git restore Gemfile.lock config/metadata_profiles/m3_profile.yaml -cd "$PROJECT_ROOT" - -log "๐Ÿณ Pull / build / start..." dc pull dc up -d web From 361ba5bea522b3280669432b5605d01b9ab837bf Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 19:48:22 -0800 Subject: [PATCH 04/36] Update script --- bin/deploy-hykudev.sh | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/bin/deploy-hykudev.sh b/bin/deploy-hykudev.sh index e7fa769..e0c1ba1 100755 --- a/bin/deploy-hykudev.sh +++ b/bin/deploy-hykudev.sh @@ -1,25 +1,16 @@ #!/usr/bin/env bash set -euo pipefail -## Instructions: -## 0. Alias was already created and persisted at ~/.bashrc: -## alias dc='dotenv -e .env.development docker-compose' -## 1. Connect to WVU VPN via The Windows App -## 2. Connect via PuTTY to hykudev server: hykudev.lib.wvu.edu with your user name -## 3. Switch to ansible: sudo su - ansible -## 4. cd wvu_knapsack -## 5. ./deploy_hykudev.sh [optional-branch-name] - PROJECT_ROOT="/home/ansible/wvu_knapsack" HYRAX_APP_DIR="$PROJECT_ROOT/hyrax-webapp" log() { echo -e "$1"; } die() { echo -e "โŒ $1" >&2; exit 1; } -cd "$PROJECT_ROOT" || die "Project root not found: $PROJECT_ROOT" +# โœ… Make dc deterministic in scripts (do NOT rely on aliases) +dc() { dotenv -e .env.development docker compose "$@"; } -command -v dc >/dev/null 2>&1 || die "'dc' not found. Make sure your alias is loaded (source ~/.bashrc)." -command -v git >/dev/null 2>&1 || die "git not found on PATH" +cd "$PROJECT_ROOT" || die "Project root not found: $PROJECT_ROOT" BRANCH="${1:-$(git rev-parse --abbrev-ref HEAD)}" log "๐Ÿ“Œ Deploying branch: $BRANCH" @@ -37,7 +28,6 @@ fi git pull --ff-only origin "$BRANCH" || die "Failed to pull '$BRANCH' (non-fast-forward?)" if [ -d "$HYRAX_APP_DIR" ]; then - log "๐Ÿ”„ Restoring known files in hyrax-webapp (pre-submodule update)..." git -C "$HYRAX_APP_DIR" restore Gemfile.lock config/metadata_profiles/m3_profile.yaml 2>/dev/null || true fi From 4b4ec5bc3308bd1ca44486cef9197304616af8b9 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 20:00:28 -0800 Subject: [PATCH 05/36] Update script --- bin/deploy-hykudev.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/deploy-hykudev.sh b/bin/deploy-hykudev.sh index e0c1ba1..85968e7 100755 --- a/bin/deploy-hykudev.sh +++ b/bin/deploy-hykudev.sh @@ -35,6 +35,8 @@ log "๐Ÿ“ฆ Updating submodules..." git submodule sync --recursive git submodule update --init --recursive --remote +dc pull solr + TAG="$(git rev-parse --short=8 HEAD)" export TAG log "๐Ÿ”– TAG: $TAG" From 9bf72986271a5489170f42a79a784e07d7592f35 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 20:06:16 -0800 Subject: [PATCH 06/36] Update script --- bin/deploy-hykudev.sh | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/bin/deploy-hykudev.sh b/bin/deploy-hykudev.sh index 85968e7..5f8da45 100755 --- a/bin/deploy-hykudev.sh +++ b/bin/deploy-hykudev.sh @@ -5,7 +5,7 @@ PROJECT_ROOT="/home/ansible/wvu_knapsack" HYRAX_APP_DIR="$PROJECT_ROOT/hyrax-webapp" log() { echo -e "$1"; } -die() { echo -e "โŒ $1" >&2; exit 1; } +die() { echo -e "$1" >&2; exit 1; } # โœ… Make dc deterministic in scripts (do NOT rely on aliases) dc() { dotenv -e .env.development docker compose "$@"; } @@ -13,7 +13,7 @@ dc() { dotenv -e .env.development docker compose "$@"; } cd "$PROJECT_ROOT" || die "Project root not found: $PROJECT_ROOT" BRANCH="${1:-$(git rev-parse --abbrev-ref HEAD)}" -log "๐Ÿ“Œ Deploying branch: $BRANCH" +log "Deploying branch: $BRANCH" git fetch --all --prune @@ -31,21 +31,29 @@ if [ -d "$HYRAX_APP_DIR" ]; then git -C "$HYRAX_APP_DIR" restore Gemfile.lock config/metadata_profiles/m3_profile.yaml 2>/dev/null || true fi -log "๐Ÿ“ฆ Updating submodules..." +log "Updating submodules..." git submodule sync --recursive git submodule update --init --recursive --remote -dc pull solr +# --- tags --- +export SOLR_TAG="latest" +export APP_TAG="$(git rev-parse --short=8 HEAD)" -TAG="$(git rev-parse --short=8 HEAD)" -export TAG -log "๐Ÿ”– TAG: $TAG" +log "APP_TAG: $APP_TAG" +log "SOLR_TAG: $SOLR_TAG" log "๐Ÿงน Restarting containers..." dc down --remove-orphans -dc pull + +log "Pulling images..." +dc pull solr +dc pull web # add worker/fits/etc if you have them, example: +# dc pull worker fits + +log "Starting services..." dc up -d web -log "โœ… Deploy complete (TAG: $TAG)" -log "๐Ÿ”— Admin Tenant: https://hykudev-admin.lib.wvu.edu" -log "๐Ÿ”— Default Tenant: https://hykudev.lib.wvu.edu" + +log "Deploy complete (TAG: $TAG)" +log "Admin Tenant: https://hykudev-admin.lib.wvu.edu" +log "Default Tenant: https://hykudev.lib.wvu.edu" From 8cf564fed739215c30cd640cb36a209c763b510e Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 20:09:11 -0800 Subject: [PATCH 07/36] Update script --- bin/deploy-hykudev.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/deploy-hykudev.sh b/bin/deploy-hykudev.sh index 5f8da45..1a769aa 100755 --- a/bin/deploy-hykudev.sh +++ b/bin/deploy-hykudev.sh @@ -42,13 +42,11 @@ export APP_TAG="$(git rev-parse --short=8 HEAD)" log "APP_TAG: $APP_TAG" log "SOLR_TAG: $SOLR_TAG" -log "๐Ÿงน Restarting containers..." +log "Restarting containers..." dc down --remove-orphans log "Pulling images..." -dc pull solr -dc pull web # add worker/fits/etc if you have them, example: -# dc pull worker fits +dc pull log "Starting services..." dc up -d web From 0942d07e5130b49bb6979c9b4aac8bf1f6c6471c Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 21:08:43 -0800 Subject: [PATCH 08/36] Updates the gha to pull latest actions --- .github/workflows/build-solr.yaml | 18 ------------------ .github/workflows/build-test-lint.yaml | 6 +++--- .github/workflows/deploy.yaml | 2 +- 3 files changed, 4 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/build-solr.yaml diff --git a/.github/workflows/build-solr.yaml b/.github/workflows/build-solr.yaml deleted file mode 100644 index f7f4e93..0000000 --- a/.github/workflows/build-solr.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Build Solr" -run-name: Build Solr of ${{ github.ref_name }} by @${{ github.actor }} -on: - workflow_dispatch: - inputs: - debug_enabled: - type: boolean - description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' - required: false - default: false - -jobs: - build: - uses: notch8/actions/.github/workflows/build.yaml@v1.0.4 - secrets: inherit - with: - platforms: "linux/amd64" - solrTarget: hyku-solr \ No newline at end of file diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 164524e..1590b31 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -22,7 +22,7 @@ on: jobs: build: - uses: notch8/actions/.github/workflows/build.yaml@v1.0.4 + uses: notch8/actions/.github/workflows/build.yaml@v1.0.7 secrets: inherit with: platforms: "linux/amd64" @@ -31,14 +31,14 @@ jobs: test: needs: build - uses: notch8/actions/.github/workflows/test.yaml@v1.0.4 + uses: notch8/actions/.github/workflows/test.yaml@v1.0.7 with: confdir: '/app/samvera/hyrax-webapp/solr/conf' rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" lint: needs: build - uses: notch8/actions/.github/workflows/lint.yaml@v1.0.4 + uses: notch8/actions/.github/workflows/lint.yaml@v1.0.7 with: webTarget: hyku-web workerTarget: hyku-worker diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a73a5c4..a4db48c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -18,5 +18,5 @@ on: jobs: deploy: - uses: notch8/actions/.github/workflows/deploy.yaml@v1.0.4 + uses: notch8/actions/.github/workflows/deploy.yaml@v1.0.7 secrets: inherit From b33f5ba56b9d7852c491e4003430950280137775 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 21:42:29 -0800 Subject: [PATCH 09/36] Update ghas --- .github/workflows/build-test-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 1590b31..388a9f6 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -22,7 +22,7 @@ on: jobs: build: - uses: notch8/actions/.github/workflows/build.yaml@v1.0.7 + uses: notch8/actions/.github/workflows/build.yaml@enter_the_matrix secrets: inherit with: platforms: "linux/amd64" From f6e6d14a3fed6736c6a662cc98cdd75d895535ac Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 21:48:40 -0800 Subject: [PATCH 10/36] update the remianing ghas to enter_the_matrix --- .github/workflows/build-test-lint.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 388a9f6..f20009b 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -31,14 +31,14 @@ jobs: test: needs: build - uses: notch8/actions/.github/workflows/test.yaml@v1.0.7 + uses: notch8/actions/.github/workflows/test.yaml@enter_the_matrix with: confdir: '/app/samvera/hyrax-webapp/solr/conf' rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" lint: needs: build - uses: notch8/actions/.github/workflows/lint.yaml@v1.0.7 + uses: notch8/actions/.github/workflows/lint.yaml@enter_the_matrix with: webTarget: hyku-web workerTarget: hyku-worker From 3763550042a62dbbb5f85e44ec307ad2cdb4143e Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 21:51:44 -0800 Subject: [PATCH 11/36] update the remianing ghas to enter_the_matrix --- .github/workflows/build-test-lint.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index f20009b..f58f65e 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -22,7 +22,7 @@ on: jobs: build: - uses: notch8/actions/.github/workflows/build.yaml@enter_the_matrix + uses: notch8/actions/.github/workflows/build.yaml@8b7865f6abec04eeb2bdb6b411f353d706f28af9 secrets: inherit with: platforms: "linux/amd64" @@ -31,14 +31,14 @@ jobs: test: needs: build - uses: notch8/actions/.github/workflows/test.yaml@enter_the_matrix + uses: notch8/actions/.github/workflows/test.yaml@8b7865f6abec04eeb2bdb6b411f353d706f28af9 with: - confdir: '/app/samvera/hyrax-webapp/solr/conf' + confdir: "/app/samvera/hyrax-webapp/solr/conf" rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" lint: needs: build - uses: notch8/actions/.github/workflows/lint.yaml@enter_the_matrix + uses: notch8/actions/.github/workflows/lint.yaml@8b7865f6abec04eeb2bdb6b411f353d706f28af9 with: webTarget: hyku-web workerTarget: hyku-worker From 185d6d512a253fd77bf29f2f701f3e03c7c954b1 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 22:11:15 -0800 Subject: [PATCH 12/36] target branch add-platform --- .github/workflows/build-test-lint.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index f58f65e..aca4a45 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -22,7 +22,7 @@ on: jobs: build: - uses: notch8/actions/.github/workflows/build.yaml@8b7865f6abec04eeb2bdb6b411f353d706f28af9 + uses: notch8/actions/.github/workflows/build.yaml@add-platform secrets: inherit with: platforms: "linux/amd64" @@ -31,14 +31,14 @@ jobs: test: needs: build - uses: notch8/actions/.github/workflows/test.yaml@8b7865f6abec04eeb2bdb6b411f353d706f28af9 + uses: notch8/actions/.github/workflows/test.yaml@1.0.7 with: confdir: "/app/samvera/hyrax-webapp/solr/conf" rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" lint: needs: build - uses: notch8/actions/.github/workflows/lint.yaml@8b7865f6abec04eeb2bdb6b411f353d706f28af9 + uses: notch8/actions/.github/workflows/lint.yaml@1.0.7 with: webTarget: hyku-web workerTarget: hyku-worker From 2f0c3c6068e3c2d0cf6e7273c3f144fa58a2444e Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 22:12:21 -0800 Subject: [PATCH 13/36] target branch add-platform --- .github/workflows/build-test-lint.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index aca4a45..55f609d 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -31,14 +31,14 @@ jobs: test: needs: build - uses: notch8/actions/.github/workflows/test.yaml@1.0.7 + uses: notch8/actions/.github/workflows/test.yaml@add-platform with: confdir: "/app/samvera/hyrax-webapp/solr/conf" rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" lint: needs: build - uses: notch8/actions/.github/workflows/lint.yaml@1.0.7 + uses: notch8/actions/.github/workflows/lint.yaml@add-platform with: webTarget: hyku-web workerTarget: hyku-worker From 15ee5b35c238924a532619cb18fe65563dff03dd Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 22:23:13 -0800 Subject: [PATCH 14/36] target branch add-platform --- .github/workflows/build-test-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 55f609d..aff6626 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -33,7 +33,7 @@ jobs: needs: build uses: notch8/actions/.github/workflows/test.yaml@add-platform with: - confdir: "/app/samvera/hyrax-webapp/solr/conf" + confdir: '/app/samvera/hyrax-webapp/solr/conf' rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" lint: From 87adeb75efda6c4d2ebc8cf4fc36a481ca41638e Mon Sep 17 00:00:00 2001 From: April Rieger Date: Tue, 6 Jan 2026 23:10:50 -0800 Subject: [PATCH 15/36] target branch add-platform --- .github/workflows/build-test-lint.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index aff6626..ba6c7c1 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -25,7 +25,6 @@ jobs: uses: notch8/actions/.github/workflows/build.yaml@add-platform secrets: inherit with: - platforms: "linux/amd64" webTarget: hyku-web workerTarget: hyku-worker From 7d5263290eec6b034eba8a1e122f0ef3416bd503 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Wed, 7 Jan 2026 00:14:05 -0800 Subject: [PATCH 16/36] target branch add-platform --- bin/deploy-hykudev.sh | 66 +++++++++++++------------------------------ 1 file changed, 20 insertions(+), 46 deletions(-) diff --git a/bin/deploy-hykudev.sh b/bin/deploy-hykudev.sh index 1a769aa..a5c1d1b 100755 --- a/bin/deploy-hykudev.sh +++ b/bin/deploy-hykudev.sh @@ -1,57 +1,31 @@ #!/usr/bin/env bash set -euo pipefail -PROJECT_ROOT="/home/ansible/wvu_knapsack" -HYRAX_APP_DIR="$PROJECT_ROOT/hyrax-webapp" - -log() { echo -e "$1"; } -die() { echo -e "$1" >&2; exit 1; } - -# โœ… Make dc deterministic in scripts (do NOT rely on aliases) -dc() { dotenv -e .env.development docker compose "$@"; } - -cd "$PROJECT_ROOT" || die "Project root not found: $PROJECT_ROOT" - -BRANCH="${1:-$(git rev-parse --abbrev-ref HEAD)}" -log "Deploying branch: $BRANCH" - -git fetch --all --prune - -if git show-ref --verify --quiet "refs/heads/$BRANCH"; then - git checkout "$BRANCH" -elif git show-ref --verify --quiet "refs/remotes/origin/$BRANCH"; then - git checkout -b "$BRANCH" "origin/$BRANCH" -else - die "Branch '$BRANCH' not found locally or on origin." -fi - -git pull --ff-only origin "$BRANCH" || die "Failed to pull '$BRANCH' (non-fast-forward?)" - -if [ -d "$HYRAX_APP_DIR" ]; then - git -C "$HYRAX_APP_DIR" restore Gemfile.lock config/metadata_profiles/m3_profile.yaml 2>/dev/null || true -fi - -log "Updating submodules..." +## Instructions: +## 0. Alias was already created and persisted at ~/.bashrc: +## alias dc='dotenv -e .env.development docker-compose' +## 1. Connect to WVU VPN via The Windows App +## 2. Connect via PuTTY to hykudev server: hykudev.lib.wvu.edu with your user name +## 3. Switch to ansible: sudo su - ansible +## 4. cd wvu_knapsack +## 5. git pull origin main (or branch name) +## 6. ./bin/deploy_hykudev.sh + +echo "Syncing & updating submodules..." git submodule sync --recursive git submodule update --init --recursive --remote -# --- tags --- -export SOLR_TAG="latest" -export APP_TAG="$(git rev-parse --short=8 HEAD)" - -log "APP_TAG: $APP_TAG" -log "SOLR_TAG: $SOLR_TAG" - -log "Restarting containers..." +echo "Stopping and cleaning up old containers..." dc down --remove-orphans -log "Pulling images..." -dc pull +echo "Pulling Docker images..." +TAG=latest dc pull solr +TAG="$(git rev-parse --short=8 HEAD)" dc pull web worker -log "Starting services..." +echo "Building and starting containers..." dc up -d web - -log "Deploy complete (TAG: $TAG)" -log "Admin Tenant: https://hykudev-admin.lib.wvu.edu" -log "Default Tenant: https://hykudev.lib.wvu.edu" +echo "Deploy complete. Containers are now running image tagged" +echo "" +echo "Admin Tenant: https://hykudev-admin.lib.wvu.edu" +echo "Default Tenant: https://hykudev.lib.wvu.edu" \ No newline at end of file From 3060a66ad66e51dfd1453bf7b25bff529ac2fc65 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Wed, 7 Jan 2026 09:32:46 -0800 Subject: [PATCH 17/36] target branch add-platform --- .github/workflows/build-solr.yaml | 18 ++++++++++++++++++ bin/deploy-hykudev.sh | 7 ++++--- docker-compose.yml | 2 +- 3 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build-solr.yaml diff --git a/.github/workflows/build-solr.yaml b/.github/workflows/build-solr.yaml new file mode 100644 index 0000000..474615c --- /dev/null +++ b/.github/workflows/build-solr.yaml @@ -0,0 +1,18 @@ +name: "Build Solr" +run-name: Build Solr of ${{ github.ref_name }} by @${{ github.actor }} +on: + workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + build: + uses: notch8/actions/.github/workflows/build.yaml@add-platform + secrets: inherit + with: + platforms: "linux/amd64" + solrTarget: hyku-solr \ No newline at end of file diff --git a/bin/deploy-hykudev.sh b/bin/deploy-hykudev.sh index a5c1d1b..320f134 100755 --- a/bin/deploy-hykudev.sh +++ b/bin/deploy-hykudev.sh @@ -19,11 +19,12 @@ echo "Stopping and cleaning up old containers..." dc down --remove-orphans echo "Pulling Docker images..." -TAG=latest dc pull solr -TAG="$(git rev-parse --short=8 HEAD)" dc pull web worker +# TAG=latest dc pull solr +TAG="$(git rev-parse --short=8 HEAD)" dc pull echo "Building and starting containers..." -dc up -d web +# TAG=latest dc up -d solr +TAG="$(git rev-parse --short=8 HEAD)" dc up -d web echo "Deploy complete. Containers are now running image tagged" echo "" diff --git a/docker-compose.yml b/docker-compose.yml index 7e3d9b7..5991be1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -51,7 +51,7 @@ services: solr: - image: ghcr.io/samvera/hyku/solr:${TAG:-latest} + image: ghcr.io/notch8/wvu_knapsack/solr:${TAG:-latest} extends: file: hyrax-webapp/docker-compose.yml service: solr From 182fd3e6e336fa3a4a4b1468d64c4bf5feae49f7 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Wed, 7 Jan 2026 11:38:17 -0800 Subject: [PATCH 18/36] target branch add-platform --- .github/workflows/build-solr.yaml | 18 ------------------ .github/workflows/build-test-lint.yaml | 1 + bin/deploy-hykudev.sh | 12 +++++------- docker-compose.yml | 1 + 4 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/build-solr.yaml diff --git a/.github/workflows/build-solr.yaml b/.github/workflows/build-solr.yaml deleted file mode 100644 index 474615c..0000000 --- a/.github/workflows/build-solr.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Build Solr" -run-name: Build Solr of ${{ github.ref_name }} by @${{ github.actor }} -on: - workflow_dispatch: - inputs: - debug_enabled: - type: boolean - description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' - required: false - default: false - -jobs: - build: - uses: notch8/actions/.github/workflows/build.yaml@add-platform - secrets: inherit - with: - platforms: "linux/amd64" - solrTarget: hyku-solr \ No newline at end of file diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index ba6c7c1..af9a1e9 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -27,6 +27,7 @@ jobs: with: webTarget: hyku-web workerTarget: hyku-worker + solrTarget: hyku-solr test: needs: build diff --git a/bin/deploy-hykudev.sh b/bin/deploy-hykudev.sh index 320f134..e07fd4f 100755 --- a/bin/deploy-hykudev.sh +++ b/bin/deploy-hykudev.sh @@ -11,20 +11,18 @@ set -euo pipefail ## 5. git pull origin main (or branch name) ## 6. ./bin/deploy_hykudev.sh -echo "Syncing & updating submodules..." +echo "Updating submodules..." git submodule sync --recursive -git submodule update --init --recursive --remote +git submodule update --init --recursive echo "Stopping and cleaning up old containers..." -dc down --remove-orphans +docker compose down --remove-orphans echo "Pulling Docker images..." -# TAG=latest dc pull solr -TAG="$(git rev-parse --short=8 HEAD)" dc pull +TAG="$(git rev-parse --short=8 HEAD)" dotenv -e .env.development docker compose pull echo "Building and starting containers..." -# TAG=latest dc up -d solr -TAG="$(git rev-parse --short=8 HEAD)" dc up -d web +TAG="$(git rev-parse --short=8 HEAD)" dotenv -e .env.development docker compose up -d web echo "Deploy complete. Containers are now running image tagged" echo "" diff --git a/docker-compose.yml b/docker-compose.yml index 5991be1..6f156e9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,6 +15,7 @@ x-app: &app # This line is what makes the knapsack include use the local code instead of the remote gem - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true + - BUNDLE_GIT_CLONE_NO_HARDLINKS=1 volumes: - node_modules:/app/samvera/hyrax-webapp/node_modules:cached - uploads:/app/samvera/hyrax-webapp/public/uploads:cached From 9b9d13dfd879a9ea0014e5f5053df3c1c53d2c38 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Wed, 7 Jan 2026 11:49:05 -0800 Subject: [PATCH 19/36] update to the latest actions release v1.0.8 --- .github/workflows/build-test-lint.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index af9a1e9..704a14c 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -22,7 +22,7 @@ on: jobs: build: - uses: notch8/actions/.github/workflows/build.yaml@add-platform + uses: notch8/actions/.github/workflows/build.yaml@v1.0.8 secrets: inherit with: webTarget: hyku-web @@ -31,14 +31,14 @@ jobs: test: needs: build - uses: notch8/actions/.github/workflows/test.yaml@add-platform + uses: notch8/actions/.github/workflows/test.yaml@v1.0.8 with: confdir: '/app/samvera/hyrax-webapp/solr/conf' rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" lint: needs: build - uses: notch8/actions/.github/workflows/lint.yaml@add-platform + uses: notch8/actions/.github/workflows/lint.yaml@v1.0.8 with: webTarget: hyku-web workerTarget: hyku-worker From a8f6afdcda9a2d6fcecf2a1de1e1af4ab9491043 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Wed, 7 Jan 2026 12:28:05 -0800 Subject: [PATCH 20/36] Update the deploy gha to v1.0.8 --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a4db48c..40a9cc8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -18,5 +18,5 @@ on: jobs: deploy: - uses: notch8/actions/.github/workflows/deploy.yaml@v1.0.7 + uses: notch8/actions/.github/workflows/deploy.yaml@v1.0.8 secrets: inherit From 69c1c438c08dc22ec9ba2bb2230b2e2893ac7948 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Thu, 8 Jan 2026 08:15:06 -0800 Subject: [PATCH 21/36] update to v1.0.8 to test ghas off main --- .github/workflows/build-solr.yaml | 2 +- .github/workflows/build-test-lint.yaml | 6 +++--- .github/workflows/deploy.yaml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-solr.yaml b/.github/workflows/build-solr.yaml index f7f4e93..14e8628 100644 --- a/.github/workflows/build-solr.yaml +++ b/.github/workflows/build-solr.yaml @@ -11,7 +11,7 @@ on: jobs: build: - uses: notch8/actions/.github/workflows/build.yaml@v1.0.4 + uses: notch8/actions/.github/workflows/build.yaml@v1.0.8 secrets: inherit with: platforms: "linux/amd64" diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 164524e..33c820b 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -22,7 +22,7 @@ on: jobs: build: - uses: notch8/actions/.github/workflows/build.yaml@v1.0.4 + uses: notch8/actions/.github/workflows/build.yaml@v1.0.8 secrets: inherit with: platforms: "linux/amd64" @@ -31,14 +31,14 @@ jobs: test: needs: build - uses: notch8/actions/.github/workflows/test.yaml@v1.0.4 + uses: notch8/actions/.github/workflows/test.yaml@v1.0.8 with: confdir: '/app/samvera/hyrax-webapp/solr/conf' rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" lint: needs: build - uses: notch8/actions/.github/workflows/lint.yaml@v1.0.4 + uses: notch8/actions/.github/workflows/lint.yaml@v1.0.8 with: webTarget: hyku-web workerTarget: hyku-worker diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a73a5c4..40a9cc8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -18,5 +18,5 @@ on: jobs: deploy: - uses: notch8/actions/.github/workflows/deploy.yaml@v1.0.4 + uses: notch8/actions/.github/workflows/deploy.yaml@v1.0.8 secrets: inherit From e8ac73df4c96d8daa4e428a7b9d8ccebe8b5b319 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Thu, 8 Jan 2026 09:22:59 -0800 Subject: [PATCH 22/36] Pass debug status --- .github/workflows/build-test-lint.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 33c820b..93b5baa 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -25,6 +25,7 @@ jobs: uses: notch8/actions/.github/workflows/build.yaml@v1.0.8 secrets: inherit with: + debug_step: ${{ inputs.debug_step }} platforms: "linux/amd64" webTarget: hyku-web workerTarget: hyku-worker @@ -33,6 +34,7 @@ jobs: needs: build uses: notch8/actions/.github/workflows/test.yaml@v1.0.8 with: + debug_step: ${{ inputs.debug_step }} confdir: '/app/samvera/hyrax-webapp/solr/conf' rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" @@ -40,6 +42,7 @@ jobs: needs: build uses: notch8/actions/.github/workflows/lint.yaml@v1.0.8 with: + debug_step: ${{ inputs.debug_step }} webTarget: hyku-web workerTarget: hyku-worker rubocop_cmd: "cd .. && bundle && bundle exec rubocop --parallel --format progress --format junit --out rubocop.xml" From 4a196086bfed8d42c60c81a30a0926823449ac64 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Thu, 8 Jan 2026 09:24:08 -0800 Subject: [PATCH 23/36] Pass debug status test only --- .github/workflows/build-test-lint.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 93b5baa..ec970c8 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -25,7 +25,6 @@ jobs: uses: notch8/actions/.github/workflows/build.yaml@v1.0.8 secrets: inherit with: - debug_step: ${{ inputs.debug_step }} platforms: "linux/amd64" webTarget: hyku-web workerTarget: hyku-worker @@ -42,7 +41,6 @@ jobs: needs: build uses: notch8/actions/.github/workflows/lint.yaml@v1.0.8 with: - debug_step: ${{ inputs.debug_step }} webTarget: hyku-web workerTarget: hyku-worker rubocop_cmd: "cd .. && bundle && bundle exec rubocop --parallel --format progress --format junit --out rubocop.xml" From 55277cf5ce74ff3888bc8de83a0946e9a79c323b Mon Sep 17 00:00:00 2001 From: April Rieger Date: Thu, 8 Jan 2026 10:03:38 -0800 Subject: [PATCH 24/36] Add debug --- .github/workflows/build-test-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index ec970c8..c2020ff 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -31,7 +31,7 @@ jobs: test: needs: build - uses: notch8/actions/.github/workflows/test.yaml@v1.0.8 + uses: notch8/actions/.github/workflows/test.yaml@add-debug-to-test with: debug_step: ${{ inputs.debug_step }} confdir: '/app/samvera/hyrax-webapp/solr/conf' From c3d1b366436fc7675e2b72a674c947293d12a372 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Thu, 8 Jan 2026 10:43:57 -0800 Subject: [PATCH 25/36] Fix BlacklightAdvancedSearch decorators and ensure bundle install runs at startup --- docker-compose.yml | 2 +- .../render_constraints_override_decorator.rb | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 9458462..42de4ea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -122,7 +122,7 @@ services: /app/samvera/bin/solrcloud-upload-configset.sh /app/samvera/hyrax-webapp/solr/conf && /app/samvera/bin/solrcloud-assign-configset.sh && SOLR_COLLECTION_NAME=hydra-test /app/samvera/bin/solrcloud-assign-configset.sh && - bundle && + bundle install && /app/samvera/bin/db-migrate-seed.sh redis: diff --git a/lib/blacklight_advanced_search/render_constraints_override_decorator.rb b/lib/blacklight_advanced_search/render_constraints_override_decorator.rb index 7dc2226..3ce1921 100644 --- a/lib/blacklight_advanced_search/render_constraints_override_decorator.rb +++ b/lib/blacklight_advanced_search/render_constraints_override_decorator.rb @@ -11,4 +11,14 @@ def render_constraints_filters(params_or_search_state = search_state) end end -BlacklightAdvancedSearch::RenderConstraintsOverride.prepend(BlacklightAdvancedSearch::RenderConstraintsOverrideDecorator) +if defined?(BlacklightAdvancedSearch::RenderConstraintsOverride) + # blacklight_advanced_search <= 7 (old hook point) + BlacklightAdvancedSearch::RenderConstraintsOverride.prepend( + BlacklightAdvancedSearch::RenderConstraintsOverrideDecorator + ) +elsif defined?(Blacklight::RenderConstraintsHelperBehavior) + # blacklight_advanced_search 8+ (RenderConstraintsOverride removed/renamed) + Blacklight::RenderConstraintsHelperBehavior.prepend( + BlacklightAdvancedSearch::RenderConstraintsOverrideDecorator + ) +end From ccd00683366d032293ea749812b58d2314fae95f Mon Sep 17 00:00:00 2001 From: April Rieger Date: Thu, 8 Jan 2026 10:59:12 -0800 Subject: [PATCH 26/36] actually commit it --- .../advanced_query_parser_decorator.rb | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lib/blacklight_advanced_search/advanced_query_parser_decorator.rb diff --git a/lib/blacklight_advanced_search/advanced_query_parser_decorator.rb b/lib/blacklight_advanced_search/advanced_query_parser_decorator.rb new file mode 100644 index 0000000..dfaa959 --- /dev/null +++ b/lib/blacklight_advanced_search/advanced_query_parser_decorator.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +module BlacklightAdvancedSearch + module AdvancedQueryParserDecorator + # OVERRIDE: BlacklightAdvancedSearch v7.0.0 + # + # Ensure @params has indifferent access. This resolves a bug where field-specific + # queries (e.g. { title: "foo" }) weren't working because: + # 1. @params was a Hash + # 2. @params[:search_field] was being invoked while the expected value was in @params['search_field'] + # 3. The advanced search logic was short-circuited in #keyword_queries because @params[:search_field] was nil + # + # Reading the code in BlacklightAdvancedSearch, it's clear that @params is intended to have indifferent + # access. Strangely, advanced search worked as expected in development mode; @params was a + # ActiveSupport::HashWithIndifferentAccess in development mode as opposed to a Hash in production mode. + # + # @see BlacklightAdvancedSearch::QueryParser#keyword_queries + # + # TODO: Remove this override after upgrading to BlacklightAdvancedSearch v8.x.x; + # it appears that @search_state will be used instead of @params. + + def initialize(params, config) + super + @params = @params.with_indifferent_access + end + end +end + + +if defined?(BlacklightAdvancedSearch::VERSION) && + Gem::Version.new(BlacklightAdvancedSearch::VERSION) < Gem::Version.new("8.0.0") && + defined?(BlacklightAdvancedSearch::QueryParser) + + unless BlacklightAdvancedSearch::QueryParser.ancestors.include?(BlacklightAdvancedSearch::AdvancedQueryParserDecorator) + BlacklightAdvancedSearch::QueryParser.prepend(BlacklightAdvancedSearch::AdvancedQueryParserDecorator) + end +end From 2cd73a57ad638cdcb91af3b724ca65c79cf83ee3 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Thu, 8 Jan 2026 15:24:11 -0800 Subject: [PATCH 27/36] Update submodule to branch on hyku from pr: https://github.com/samvera/hyku/pull/2871 --- hyrax-webapp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax-webapp b/hyrax-webapp index 9e2525a..86350be 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 9e2525a1d9a2a5257831493f30f1a435069af4bf +Subproject commit 86350beef41d8311f92535590d508748ee117f3d From fe208c6e0bae3f22051b5d5560c300c80636c435 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Thu, 8 Jan 2026 16:26:01 -0800 Subject: [PATCH 28/36] Update submodule for hyku update in pr --- hyrax-webapp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax-webapp b/hyrax-webapp index 86350be..477cb15 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 86350beef41d8311f92535590d508748ee117f3d +Subproject commit 477cb15bd214af790d6a74462d42d1f867eb47b7 From 1c6da8ca09839c7037202dc40855010c3e5f61af Mon Sep 17 00:00:00 2001 From: April Rieger Date: Thu, 8 Jan 2026 16:47:14 -0800 Subject: [PATCH 29/36] Update to remove additional support that is no longer needed --- .github/workflows/build-test-lint.yaml | 3 +-- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index c2020ff..33c820b 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -31,9 +31,8 @@ jobs: test: needs: build - uses: notch8/actions/.github/workflows/test.yaml@add-debug-to-test + uses: notch8/actions/.github/workflows/test.yaml@v1.0.8 with: - debug_step: ${{ inputs.debug_step }} confdir: '/app/samvera/hyrax-webapp/solr/conf' rspec_cmd: "cd .. && gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" diff --git a/docker-compose.yml b/docker-compose.yml index 42de4ea..9458462 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -122,7 +122,7 @@ services: /app/samvera/bin/solrcloud-upload-configset.sh /app/samvera/hyrax-webapp/solr/conf && /app/samvera/bin/solrcloud-assign-configset.sh && SOLR_COLLECTION_NAME=hydra-test /app/samvera/bin/solrcloud-assign-configset.sh && - bundle install && + bundle && /app/samvera/bin/db-migrate-seed.sh redis: From acd55254864b1481e946cbce84dcc46ec0156f46 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Thu, 8 Jan 2026 16:49:32 -0800 Subject: [PATCH 30/36] Remove local override since on hyku now --- .../advanced_query_parser_decorator.rb | 37 ------------------- 1 file changed, 37 deletions(-) delete mode 100644 lib/blacklight_advanced_search/advanced_query_parser_decorator.rb diff --git a/lib/blacklight_advanced_search/advanced_query_parser_decorator.rb b/lib/blacklight_advanced_search/advanced_query_parser_decorator.rb deleted file mode 100644 index dfaa959..0000000 --- a/lib/blacklight_advanced_search/advanced_query_parser_decorator.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -module BlacklightAdvancedSearch - module AdvancedQueryParserDecorator - # OVERRIDE: BlacklightAdvancedSearch v7.0.0 - # - # Ensure @params has indifferent access. This resolves a bug where field-specific - # queries (e.g. { title: "foo" }) weren't working because: - # 1. @params was a Hash - # 2. @params[:search_field] was being invoked while the expected value was in @params['search_field'] - # 3. The advanced search logic was short-circuited in #keyword_queries because @params[:search_field] was nil - # - # Reading the code in BlacklightAdvancedSearch, it's clear that @params is intended to have indifferent - # access. Strangely, advanced search worked as expected in development mode; @params was a - # ActiveSupport::HashWithIndifferentAccess in development mode as opposed to a Hash in production mode. - # - # @see BlacklightAdvancedSearch::QueryParser#keyword_queries - # - # TODO: Remove this override after upgrading to BlacklightAdvancedSearch v8.x.x; - # it appears that @search_state will be used instead of @params. - - def initialize(params, config) - super - @params = @params.with_indifferent_access - end - end -end - - -if defined?(BlacklightAdvancedSearch::VERSION) && - Gem::Version.new(BlacklightAdvancedSearch::VERSION) < Gem::Version.new("8.0.0") && - defined?(BlacklightAdvancedSearch::QueryParser) - - unless BlacklightAdvancedSearch::QueryParser.ancestors.include?(BlacklightAdvancedSearch::AdvancedQueryParserDecorator) - BlacklightAdvancedSearch::QueryParser.prepend(BlacklightAdvancedSearch::AdvancedQueryParserDecorator) - end -end From b9fe7823b9b8c48686ca78ea97e1003a064c268c Mon Sep 17 00:00:00 2001 From: April Rieger Date: Fri, 9 Jan 2026 11:50:04 -0800 Subject: [PATCH 31/36] Update submodule --- hyrax-webapp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax-webapp b/hyrax-webapp index 477cb15..2d57a12 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 477cb15bd214af790d6a74462d42d1f867eb47b7 +Subproject commit 2d57a1210bc7ff9826923891764ed9a4d44bfc42 From c5ba629dd72ff88b0a3af250cfc3dcfff01acf61 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Fri, 9 Jan 2026 12:14:37 -0800 Subject: [PATCH 32/36] Update submodule to main hyku --- hyrax-webapp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax-webapp b/hyrax-webapp index 9e2525a..2d57a12 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 9e2525a1d9a2a5257831493f30f1a435069af4bf +Subproject commit 2d57a1210bc7ff9826923891764ed9a4d44bfc42 From 3aab98d6da725da3a558467410341d22d0cba1a8 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Fri, 9 Jan 2026 12:41:30 -0800 Subject: [PATCH 33/36] removes - BUNDLE_GIT_CLONE_NO_HARDLINKS=1 --- docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6f156e9..7072198 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,6 @@ x-app: &app # This line is what makes the knapsack include use the local code instead of the remote gem - BUNDLE_LOCAL__HYKU_KNAPSACK=/app/samvera - BUNDLE_DISABLE_LOCAL_BRANCH_CHECK=true - - BUNDLE_GIT_CLONE_NO_HARDLINKS=1 volumes: - node_modules:/app/samvera/hyrax-webapp/node_modules:cached - uploads:/app/samvera/hyrax-webapp/public/uploads:cached @@ -50,7 +49,6 @@ services: file: hyrax-webapp/docker-compose.yml service: zoo - solr: image: ghcr.io/notch8/wvu_knapsack/solr:${TAG:-latest} extends: From ba9a256effaa6f211b973c6a4c4c935e4ed983b6 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Fri, 9 Jan 2026 13:28:08 -0800 Subject: [PATCH 34/36] Put solr back for test --- .github/workflows/build-solr.yaml | 28 ++++++++++++++++++++++++++ .github/workflows/build-test-lint.yaml | 1 - 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-solr.yaml diff --git a/.github/workflows/build-solr.yaml b/.github/workflows/build-solr.yaml new file mode 100644 index 0000000..ed8ad7d --- /dev/null +++ b/.github/workflows/build-solr.yaml @@ -0,0 +1,28 @@ +name: "Build Solr" +run-name: Build Solr of ${{ github.ref_name }} by @${{ github.actor }} +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + inputs: + debug_step: + required: false + description: 'Pause the selected step to debug using tmate' + type: choice + default: 'build' + options: + - build + +jobs: + build: + uses: notch8/actions/.github/workflows/build.yaml@v1.0.8 + secrets: inherit + with: + platforms: "linux/amd64" + solrTarget: hyku-solr + + diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 704a14c..fac9063 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -27,7 +27,6 @@ jobs: with: webTarget: hyku-web workerTarget: hyku-worker - solrTarget: hyku-solr test: needs: build From 200f7938788d19d82959630841315386f6a1c864 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Fri, 9 Jan 2026 14:34:24 -0800 Subject: [PATCH 35/36] Update the debug_step for deploy action as well just because --- .github/workflows/build-solr.yaml | 8 -------- .github/workflows/deploy.yaml | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/build-solr.yaml b/.github/workflows/build-solr.yaml index ed8ad7d..dc3aefc 100644 --- a/.github/workflows/build-solr.yaml +++ b/.github/workflows/build-solr.yaml @@ -1,12 +1,6 @@ name: "Build Solr" run-name: Build Solr of ${{ github.ref_name }} by @${{ github.actor }} on: - push: - branches: - - main - pull_request: - branches: - - main workflow_dispatch: inputs: debug_step: @@ -24,5 +18,3 @@ jobs: with: platforms: "linux/amd64" solrTarget: hyku-solr - - diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 40a9cc8..5ae66ff 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -10,7 +10,7 @@ on: type: choice options: - friends - debug_enabled: + debug_step: type: boolean description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' required: false From 4adeecc840014bdadff1db1372f82e02c121afd9 Mon Sep 17 00:00:00 2001 From: April Rieger Date: Fri, 9 Jan 2026 17:04:01 -0800 Subject: [PATCH 36/36] Update submodule --- hyrax-webapp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyrax-webapp b/hyrax-webapp index 2d57a12..d950398 160000 --- a/hyrax-webapp +++ b/hyrax-webapp @@ -1 +1 @@ -Subproject commit 2d57a1210bc7ff9826923891764ed9a4d44bfc42 +Subproject commit d950398d1c5f93590552defee1c5c62f112ddd51