Skip to content

Commit 33a84fb

Browse files
Merged dspace-cris-2024_02_x into task/dspace-cris-2024_02_x/DSC-2529
2 parents d1d2db1 + 9a87649 commit 33a84fb

66 files changed

Lines changed: 618 additions & 175 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -203,79 +203,72 @@ jobs:
203203
# If it does, then SSR is working.
204204
- name: Verify SSR on a Community page
205205
run: |
206-
result=$(wget -O- -q http://127.0.0.1:4000/communities/0958c910-2037-42a9-81c7-dca80e3892b4)
206+
result=$(wget -O- -q http://127.0.0.1:4000/communities/a30b75e4-1682-4b4d-85fd-a47fc78dbcf6)
207207
echo "$result"
208-
echo "$result" | grep -oE "<h1 [^>]*>[^><]*</h1>" | grep Publications
208+
echo "$result" | grep -oE "<h1 [^>]*>[^><]*</h1>" | grep "CRIS Community"
209209
210-
# Get a specific collection in our test data and verify that the "<h1>" tag includes "Articles" (the collection name).
210+
# Get a specific collection in our test data and verify that the "<h1>" tag includes "Publications" (the collection name).
211211
# If it does, then SSR is working.
212212
- name: Verify SSR on a Collection page
213213
run: |
214-
result=$(wget -O- -q http://127.0.0.1:4000/collections/282164f5-d325-4740-8dd1-fa4d6d3e7200)
214+
result=$(wget -O- -q http://127.0.0.1:4000/collections/caf04bfa-b2f6-40d3-90d2-aa0b86d92f8d)
215215
echo "$result"
216-
echo "$result" | grep -oE "<h1 [^>]*>[^><]*</h1>" | grep Articles
216+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Publications"
217217
218218
# Get a specific publication in our test data and verify that the <meta name="title"> tag includes
219219
# the title of this publication. If it does, then SSR is working.
220220
- name: Verify SSR on a Publication page
221221
run: |
222-
result=$(wget -O- -q http://127.0.0.1:4000/entities/publication/6160810f-1e53-40db-81ef-f6621a727398)
222+
result=$(wget -O- -q http://127.0.0.1:4000/entities/publication/1df533fd-5385-4820-babd-b5fabdb82101)
223223
echo "$result"
224-
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "An Economic Model of Mortality Salience"
224+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "test publication with pdf version 1"
225225
226226
# Get a specific person in our test data and verify that the <meta name="title"> tag includes
227227
# the name of the person. If it does, then SSR is working.
228228
- name: Verify SSR on a Person page
229229
run: |
230-
result=$(wget -O- -q http://127.0.0.1:4000/entities/person/b1b2c768-bda1-448a-a073-fc541e8b24d9)
230+
result=$(wget -O- -q http://127.0.0.1:4000/entities/person/98cea993-d448-4200-99d5-f6fab8967bf8)
231231
echo "$result"
232-
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Simmons, Cameron"
232+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Submitter Dspace"
233233
234234
# Get a specific project in our test data and verify that the <meta name="title"> tag includes
235235
# the name of the project. If it does, then SSR is working.
236236
- name: Verify SSR on a Project page
237237
run: |
238-
result=$(wget -O- -q http://127.0.0.1:4000/entities/project/46ccb608-a74c-4bf6-bc7a-e29cc7defea9)
238+
result=$(wget -O- -q http://127.0.0.1:4000/entities/project/1e3451e4-60d7-46a8-962e-5b94b62c63ff)
239239
echo "$result"
240-
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "University Research Fellowship"
240+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Test DSC-1819"
241241
242242
# Get a specific orgunit in our test data and verify that the <meta name="title"> tag includes
243243
# the name of the orgunit. If it does, then SSR is working.
244244
- name: Verify SSR on an OrgUnit page
245245
run: |
246-
result=$(wget -O- -q http://127.0.0.1:4000/entities/orgunit/9851674d-bd9a-467b-8d84-068deb568ccf)
246+
result=$(wget -O- -q http://127.0.0.1:4000/entities/orgunit/6d4abaee-eedb-458d-a29b-35db82037dfa)
247247
echo "$result"
248-
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Law and Development"
248+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "4Science"
249249
250250
# Get a specific journal in our test data and verify that the <meta name="title"> tag includes
251251
# the name of the journal. If it does, then SSR is working.
252252
- name: Verify SSR on a Journal page
253253
run: |
254-
result=$(wget -O- -q http://127.0.0.1:4000/entities/journal/d4af6c3e-53d0-4757-81eb-566f3b45d63a)
254+
result=$(wget -O- -q http://127.0.0.1:4000/entities/journal/f05c4530-b1b8-4459-a048-ea1c60089a1e)
255255
echo "$result"
256-
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Environmental &amp; Architectural Phenomenology"
256+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Journal 4S"
257257
258-
# Get a specific journal volume in our test data and verify that the <meta name="title"> tag includes
259-
# the name of the volume. If it does, then SSR is working.
260-
- name: Verify SSR on a Journal Volume page
258+
# Get a specific funding in our test data and verify that the <meta name="title"> tag includes
259+
# the name of the funding. If it does, then SSR is working.
260+
- name: Verify SSR on a Funding page
261261
run: |
262-
result=$(wget -O- -q http://127.0.0.1:4000/entities/journalvolume/07c6249f-4bf7-494d-9ce3-6ffdb2aed538)
262+
result=$(wget -O- -q http://127.0.0.1:4000/entities/funding/640d35ba-6172-44c0-9e11-bf5da417cdc8)
263263
echo "$result"
264-
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Environmental &amp; Architectural Phenomenology Volume 28 (2017)"
264+
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "test funding"
265265
266-
# Get a specific journal issue in our test data and verify that the <meta name="title"> tag includes
267-
# the name of the issue. If it does, then SSR is working.
268-
- name: Verify SSR on a Journal Issue page
269-
run: |
270-
result=$(wget -O- -q http://127.0.0.1:4000/entities/journalissue/44c29473-5de2-48fa-b005-e5029aa1a50b)
271-
echo "$result"
272-
echo "$result" | grep -oE "<meta name=\"title\" [^>]*>" | grep "Environmental &amp; Architectural Phenomenology Vol. 28, No. 1"
273266
274267
# Verify 301 Handle redirect behavior
275268
# Note: /handle/123456789/260 is the same test Publication used by our e2e tests
276269
- name: Verify 301 redirect from '/handle' URLs
277270
run: |
278-
result=$(wget --server-response --quiet http://127.0.0.1:4000/handle/123456789/260 2>&1 | head -1 | awk '{print $2}')
271+
result=$(wget --server-response --quiet http://127.0.0.1:4000/handle/123456789/71 2>&1 | head -1 | awk '{print $2}')
279272
echo "$result"
280273
[[ "$result" -eq "301" ]]
281274

.github/workflows/docker.yml

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,66 @@ name: Docker images
99
on:
1010
push:
1111
branches:
12-
- main
13-
- 'dspace-**'
12+
- main-cris
13+
- 'dspace-cris-*_02_x'
1414
tags:
15-
- 'dspace-**'
15+
- 'dspace-cris-**'
1616
pull_request:
1717

1818
permissions:
1919
contents: read # to fetch code (actions/checkout)
2020
packages: write # to write images to GitHub Container Registry (GHCR)
2121

2222
jobs:
23+
24+
####################################################
25+
# Build/Push the '4science/dspace-cris-dependencies' image.
26+
# This image is used by all other DSpace build jobs.
27+
####################################################
28+
dspace-cris-angular-dependencies:
29+
# Ensure this job never runs on forked repos. It's only executed for '4science/dspace'
30+
if: github.repository == '4science/dspace-angular'
31+
# Use the reusable-docker-build.yml script from DSpace/DSpace repo to build our Docker image
32+
uses: 4science/DSpace/.github/workflows/reusable-docker-build.yml@dspace-cris-2024_02_x
33+
with:
34+
build_id: dspace-cris-angular-dependencies
35+
image_name: 4science/dspace-cris-angular-dependencies
36+
dockerfile_path: ./Dockerfile.dependencies
37+
secrets:
38+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
39+
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}
40+
41+
2342
#############################################################
24-
# Build/Push the 'dspace/dspace-angular' image
43+
# Build/Push the '4science/dspace-cris-angular' image
2544
#############################################################
2645
dspace-angular:
2746
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
28-
if: github.repository == 'dspace/dspace-angular'
47+
if: github.repository == '4science/dspace-angular'
2948
# Use the reusable-docker-build.yml script from DSpace/DSpace repo to build our Docker image
30-
uses: DSpace/DSpace/.github/workflows/reusable-docker-build.yml@main
49+
uses: 4science/DSpace/.github/workflows/reusable-docker-build.yml@dspace-cris-2024_02_x
50+
needs: dspace-cris-angular-dependencies
3151
with:
32-
build_id: dspace-angular-dev
33-
image_name: dspace/dspace-angular
52+
build_id: dspace-cris-angular-dev
53+
image_name: 4science/dspace-cris-angular
3454
dockerfile_path: ./Dockerfile
3555
secrets:
3656
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
3757
DOCKER_ACCESS_TOKEN: ${{ secrets.DOCKER_ACCESS_TOKEN }}
3858

3959
#############################################################
40-
# Build/Push the 'dspace/dspace-angular' image ('-dist' tag)
60+
# Build/Push the '4science/dspace-cris-angular' image ('-dist' tag)
4161
#############################################################
4262
dspace-angular-dist:
4363
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
44-
if: github.repository == 'dspace/dspace-angular'
64+
if: github.repository == '4science/dspace-angular'
4565
# Use the reusable-docker-build.yml script from DSpace/DSpace repo to build our Docker image
46-
uses: DSpace/DSpace/.github/workflows/reusable-docker-build.yml@main
66+
uses: 4science/DSpace/.github/workflows/reusable-docker-build.yml@dspace-cris-2024_02_x
67+
# Must run after 'dspace-dependencies' job above
68+
needs: dspace-cris-angular-dependencies
4769
with:
48-
build_id: dspace-angular-dist
49-
image_name: dspace/dspace-angular
70+
build_id: dspace-cris-angular-dist
71+
image_name: 4science/dspace-cris-angular
5072
dockerfile_path: ./Dockerfile.dist
5173
# As this is a "dist" image, its tags are all suffixed with "-dist". Otherwise, it uses the same
5274
# tagging logic as the primary 'dspace/dspace-angular' image above.

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details
33

44
ARG NODE_VERSION=22
5-
ARG DSPACE_VERSION=2024_02_x
5+
ARG DSPACE_VERSION=dspace-cris-2024_02_x
66
ARG DOCKER_REGISTRY=docker.io
77

8-
FROM ${DOCKER_REGISTRY:-docker.io}/4science/dspace-cris-angular-dependencies:${DSPACE_VERSION:-2024_02_x} AS dev
8+
FROM ${DOCKER_REGISTRY:-docker.io}/4science/dspace-cris-angular-dependencies:${DSPACE_VERSION:-dspace-cris-2024_02_x} AS dev
99

1010
WORKDIR /app
1111
ADD . /app/

Dockerfile.dependencies

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Test build:
2-
# docker build -f Dockerfile.dependencies -t 4science/dspace-angular-dependencies:2024_02_x .
2+
# docker build -f Dockerfile.dependencies -t 4science/dspace-cris-angular-dependencies:dspace-cris-2024_02_x .
33

44
# Angular 17 + Node 22 optimized Dockerfile
55
ARG NODE_VERSION=22
6-
ARG DSPACE_VERSION=2024_02_X
6+
ARG DSPACE_VERSION=dspace-cris-2024_02_x
77
ARG DOCKER_REGISTRY=docker.io
88

9-
FROM ${DOCKER_REGISTRY:-docker.io}/node:${NODE_VERSION-22}-alpine AS dependencies
9+
FROM docker.io/node:${NODE_VERSION-22}-alpine AS dependencies
1010

1111
# Install build dependencies
1212
RUN apk add --no-cache python3 make g++
@@ -15,4 +15,4 @@ WORKDIR /app
1515

1616
# Install dependencies (use npm ci if you have package-lock.json)
1717
COPY package.json yarn.lock ./
18-
RUN yarn install --network-timeout 300000
18+
RUN yarn install --frozen-lockfile --network-timeout 300000

Dockerfile.dist

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
# syntax=docker/dockerfile:1.7-labs
22

33
# This image will be published as dspace/dspace-angular:$DSPACE_VERSION-dist
4-
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details
4+
# See https://github.com/4science/dspace-angular/tree/main/docker for usage details
55

66
# Test build:
7-
# docker build -f Dockerfile.dist -t dspace/dspace-angular:dspace-8_x-dist .
7+
# docker build -f Dockerfile.dist -t 4science/dspace-angular:dspace-cris-2024_02_x-dist .
88

99
# Angular 17 + Node 22 optimized Dockerfile
1010
ARG NODE_VERSION=22
11-
ARG DSPACE_VERSION=2024_02_x
11+
ARG DSPACE_VERSION=dspace-cris-2024_02_x
1212
ARG DOCKER_REGISTRY=docker.io
1313

14-
FROM ${DOCKER_REGISTRY:-docker.io}/4science/dspace-cris-angular-dependencies:${DSPACE_VERSION:-2024_02_x} AS build
14+
FROM ${DOCKER_REGISTRY:-docker.io}/4science/dspace-cris-angular-dependencies:${DSPACE_VERSION:-dspace-cris-2024_02_x} AS build
1515

16-
COPY --parents src/** config/** webpack/** docker/dspace-ui.json angular.json server.ts startup-message.ts tsconfig.json tsconfig.app.json tsconfig.server.json tsconfig.spec.json tsconfig.ts-node.json typedoc.json /app/
16+
COPY . /app/
1717

1818
WORKDIR /app
1919

2020
# Build Angular app
2121
RUN yarn build:prod
22+
RUN yarn build:mirador
2223

2324
# ---- Production image ----
24-
FROM ${DOCKER_REGISTRY:-docker.io}/node:${NODE_VERSION-22}-alpine AS prod
25+
FROM docker.io/node:${NODE_VERSION-22}-alpine AS prod
2526

2627
# Install pm2 globally and clean npm cache
2728
RUN npm install --global pm2 && npm cache clean --force

0 commit comments

Comments
 (0)