-
Notifications
You must be signed in to change notification settings - Fork 1
Deepblue 466/refactor #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4e002f7
Upgrade and refactor
gkostin1966 2682052
TODO: Fix Demo Backend: Solr Race Condition on Startup
gkostin1966 ae026dc
Apply suggestions from code review
gkostin1966 8f9eda2
Resolves to Copilot code review
gkostin1966 4c106fb
Prepend "Minor Issues" task to the todo list
gkostin1966 c885705
Address Minor Issue from PR Review
gkostin1966 a311b5d
Only run Smoke tests once on pushes to pull request
gkostin1966 80d8daa
Resolve more pull request comments for Copilot
gkostin1966 3fa0d64
Minor change to README
gkostin1966 635304e
More resolutions to Copilot review comments
gkostin1966 23f6068
Make README consistant with CI workflows
gkostin1966 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Example .env file for dspace-containerization | ||
| # Copy to .env and adjust as needed. | ||
| # | ||
| # GITHUB_BRANCH: branch name in the mlibrary forks of DSpace and dspace-angular | ||
| # used to build the shared source image (Dockerfile). | ||
| # NOTE: this variable is only used locally (Makefile / docker build). In GitHub | ||
| # Actions CI the same value is stored as SOURCE_BRANCH to avoid the reserved | ||
| # GITHUB_* prefix, then forwarded as --build-arg GITHUB_BRANCH=${SOURCE_BRANCH}. | ||
| # DSPACE_VERSION: version tag suffix used by DSpace Docker Hub images (e.g. 7.6 → dspace-7.6). | ||
| # Target version: 7.6.6 (Dec 2025). See the repository build and deployment documentation. | ||
| # JDK_VERSION: Java version for the backend Tomcat image (17 required). | ||
| # DSPACE_UI_HOST: hostname the Angular SSR server binds to AND uses in server-side URLs. | ||
| # Use 0.0.0.0 for Docker local dev (Node.js 18+ resolves 'localhost' to ::1 which breaks | ||
| # Docker port-mapping). Set to the public hostname for staging/production deployments. | ||
| # DSPACE_REST_HOST: hostname the Angular SSR server uses to reach the backend REST API. | ||
| # Use 'backend' (Docker service name) for local dev so the SSR server (running inside the | ||
| # frontend container) can reach the backend over Docker internal DNS. | ||
| # Browser-side Angular re-uses the dspaceServer URL from the HAL root at runtime. | ||
| GITHUB_BRANCH=umich | ||
| DSPACE_VERSION=7.6 | ||
| JDK_VERSION=17 | ||
| DSPACE_UI_HOST=0.0.0.0 | ||
| DSPACE_REST_HOST=backend | ||
|
|
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| --- | ||
| name: CI | ||
|
|
||
| # Triggers: | ||
| # 1. Push to main — post-merge validation on the canonical branch. | ||
| # 2. Pull-requests targeting main — runs on every push to a PR branch so | ||
| # the merge result is validated before it lands. Because this covers | ||
| # PR branches via the pull_request event, the push trigger is scoped to | ||
| # main only; this avoids double-running the job when a PR branch is | ||
| # pushed (which would fire both push and pull_request events). | ||
| # NOTE: feature branches that have no open PR targeting main will NOT | ||
| # receive CI until a PR is opened. | ||
| # 3. Manual trigger with optional version overrides (workflow_dispatch). | ||
| # | ||
| # NOTE: "umich" here is the SOURCE_BRANCH build arg — the default branch | ||
| # in the mlibrary/DSpace and mlibrary/dspace-angular forks from which | ||
| # source code is cloned when building images. It is NOT a branch of this | ||
| # repository. In those forks, "umich" is the canonical development branch | ||
| # and always pulls from "main" (which tracks upstream official DSpace); | ||
| # it never pushes back to "main". | ||
| # | ||
| # NOTE: env vars that start with GITHUB_ are reserved by the GitHub Actions | ||
| # runner and will cause the workflow to fail if set in an env: block. | ||
| # The source-branch variable is therefore named SOURCE_BRANCH, and is passed | ||
| # to `docker build` as --build-arg GITHUB_BRANCH=... so that the Dockerfile | ||
| # and Makefile need no changes. | ||
| # | ||
| # NOTE: docker/setup-buildx-action is intentionally NOT used here. | ||
| # That action switches to the `docker-container` Buildx driver, which runs | ||
| # builds in an isolated container that cannot see images stored in the local | ||
| # Docker daemon. As a result `docker compose build` fails to resolve | ||
| # `dspace-containerization-source` (a local-only base image) and tries to | ||
| # pull it from Docker Hub, which does not exist. The default `docker` driver | ||
| # (used when no setup-buildx-action step is present) shares the daemon image | ||
| # store, so the source image built in step 1 is immediately available to | ||
| # `docker compose build` in step 2. | ||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| pull_request: | ||
| branches: ["main"] | ||
|
gkostin1966 marked this conversation as resolved.
|
||
| workflow_dispatch: | ||
| inputs: | ||
| dspace_version: | ||
| description: "DSpace Version (e.g. 7.6)" | ||
| required: false | ||
| default: "7.6" | ||
| jdk_version: | ||
| description: "JDK Version (17 recommended)" | ||
| required: false | ||
| default: "17" | ||
| source_branch: | ||
| description: "Source branch in mlibrary forks" | ||
| required: false | ||
| default: "umich" | ||
|
|
||
| jobs: | ||
| smoke-test: | ||
| name: Smoke tests – DSpace ${{ github.event.inputs.dspace_version || '7.6' }} | ||
| runs-on: ubuntu-latest | ||
| # Only run for the canonical repository; avoids wasting runner minutes on forks. | ||
| if: github.repository == 'mlibrary/dspace-containerization' | ||
|
|
||
| env: | ||
| # SOURCE_BRANCH replaces the former GITHUB_BRANCH (reserved prefix). | ||
| SOURCE_BRANCH: ${{ github.event.inputs.source_branch || 'umich' }} | ||
| DSPACE_VERSION: ${{ github.event.inputs.dspace_version || '7.6' }} | ||
| JDK_VERSION: ${{ github.event.inputs.jdk_version || '17' }} | ||
| BACKEND_URL: http://localhost:8080 | ||
| SOLR_URL: http://localhost:8983 | ||
| FRONTEND_URL: http://localhost:4000 | ||
| MAX_WAIT: "900" | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6.0.2 | ||
|
|
||
|
|
||
| # ── Build ────────────────────────────────────────────────────────────── | ||
| # The source image MUST be built before `docker compose build` because | ||
| # backend/solr/frontend dockerfiles reference `dspace-containerization-source` | ||
| # with a FROM instruction. Docker cannot pull this local-only image from | ||
| # Docker Hub and will otherwise fail with "pull access denied". | ||
| - name: Build shared source image | ||
| run: | | ||
| docker build -t dspace-containerization-source \ | ||
| --build-arg GITHUB_BRANCH=${SOURCE_BRANCH} \ | ||
| . | ||
|
|
||
| - name: Build compose service images | ||
| run: | | ||
| docker compose build | ||
|
|
||
| # ── Start ────────────────────────────────────────────────────────────── | ||
| - name: Start core services | ||
| run: docker compose up -d | ||
|
|
||
| # ── Wait ─────────────────────────────────────────────────────────────── | ||
| - name: Wait for stack to be ready | ||
| run: bash tests/wait-for-stack.sh | ||
|
|
||
| # ── Test ─────────────────────────────────────────────────────────────── | ||
| - name: Run smoke tests | ||
| run: bash tests/smoke.sh | ||
|
|
||
| # ── Debug (always runs, even on failure) ─────────────────────────────── | ||
| - name: Dump service logs on failure | ||
| if: failure() | ||
| run: docker compose logs --no-color | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.